<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ Page Language="C#" %>
<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="WebPartPageExpansion" content="full"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>测试Project Server RestAPI</title>
<meta http-equiv="X-UA-Compatible" content="IE=10"/>
<SharePoint:CssRegistration Name="default" runat="server"/>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript"> requestProjectApi("","/sites/pwa/_api/ProjectServer/Projects",function (data) {
var projectdata_html = "";
$(data).each(function (index, item) {
projectdata_html += "<tr>";
projectdata_html += "<td>"+(index+1)+"</td>";
projectdata_html += "<td>"+item.Name+"</td>";
projectdata_html += "<td>"+item.CreatedDate+"</td>";
projectdata_html += "</tr>";
});
$("#tb_projectdata").html(projectdata_html);
}) function requestProjectApi (postData,postUrl,callBack) {
$.ajax({
url: postUrl,
type: "GET",
contentType: "application/json",
data: postData,
headers: {
"Accept": "application/json; odata=verbose",
},
complete: function (xhr, textStatus) {
if (xhr.status == 200) {
var jsondata = JSON.parse(xhr.responseText).d.results;
if(callBack){
callBack(jsondata);
}
}
},
error: function (data, errorCode, errorMessage) {
}
});
}
</script>
</head>
<body>
<form id="form1" runat="server">
<table>
<thead>
<tr>
<th>序号</th>
<th>项目名称</th>
<th>创建日期</th>
</tr>
</thead>
<tbody id="tb_projectdata">
</tbody>
</table>
</form>
</body>
</html>

Project Server 2016 RestAPI调用测试的更多相关文章

  1. Project server 2016 “没有为此项目配置网站”错误处理

    问题: 没有为此项目配置网站. There is no site configured for this project 解决办法: 依次点击设置>PWA设置>连接到sharepoint网 ...

  2. Project Server 2016 部署

    问题: 手动创建网站集后,激活Project的功能时候报错 Only Administrator users can obtain the connection string for [Admin] ...

  3. project server 2016 新功能

    1.多时间轴 2.资源容量规划 3.资源请求

  4. Win server 2016 升级 Win server 2019 [测试验证]

    . 给win server 2016 挂在 win server 2019 的安装盘 2. 点击setup 直接进行安装操作  选择不下载更新, 然后到达输入序列号的界面 序列号为: WMDGN-G9 ...

  5. SQL Server 2016五大优势挖掘企业用户数据价值

    SQL Server 2016五大优势挖掘企业用户数据价值 转载自:http://soft.zdnet.com.cn/software_zone/2016/0318/3074442.shtml 3月1 ...

  6. SQL Server 2016 行级别权限控制

    背景 假如我们有关键数据存储在一个表里面,比如人员表中包含员工.部门和薪水信息.只允许用户访问各自部门的信息,但是不能访问其他部门.一般我们都是在程序端实现这个功能,而在sqlserver2016以后 ...

  7. BizTalk Server 2016配置 WCF SAP Adapter

    BizTalk Server 2016配置 WCF SAP Adapter 最近公司内部需要使用BizTalk与SAP 系统进行对接,虽然SAP/PI可以以发布WebService 的方式实现与外部系 ...

  8. SQL Server 2016 非域Aways On环境搭建

    一.优点 aways on的优点,a. 构建主从数据库,分摊单点数据库压力.b.可以减少数据同步时间,提升用户体验.c.可以实现高可用,自动平滑切换. 二.缺点 及时同步最多只能提交3台,及时同步会导 ...

  9. 设置和安装 BizTalk Server 2016 的必备组件

    设置服务器,然后安装和配置软件必备组件. 加入本地管理员组       若要安装并配置 BizTalk Server,在本地计算机上使用管理员帐户登录到服务器. 向本地管理员组添加任何管理 BizTa ...

随机推荐

  1. 【leetcode刷题笔记】Implement strStr()

    Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if need ...

  2. poj 1426 Find The Multiple 搜索进阶-暑假集训

    E - Find The Multiple Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I6 ...

  3. JsonSchema使用详解

    JSON Schema是一个用于验证JSON数据结构的强大工具, 我查看并学习了JSON Schema的官方文档, 做了详细的记录, 分享一下. 我们可以使用JSON Schema在后续做接口测试中做 ...

  4. LINQ 学习路程 -- 查询操作 let into关键字

    IList<Student> studentList = new List<Student>() { , StudentName = } , , StudentName = } ...

  5. castle windsor学习-----How components are created

  6. DIV+CSS专题:第一天 XHTML CSS基础知识

    欢迎大家学习<十天学会web标准>,也就是我们常说的DIV+CSS.不过这里的DIV+CSS是一种错误的叫法,建议大家还是称之为web标准.   学习本系列教程需有一定html和css基础 ...

  7. CSS缎带效果

    1. [代码]ribbon.html     <!DOCTYPE HTML><html><head><style type="text/css&qu ...

  8. php中session的配置

    在 php.ini 中搜  session.save_path 查看session文件保存的目录;

  9. django 实现分页功能

    分页效果: 视图代码: # -*- coding: utf-8 -*- from django.shortcuts import render,get_object_or_404 from djang ...

  10. BEC listen and translation exercise 42

    These were built for the workers towards the end of the eighteenth century, and they are still furni ...