Client-side object model (CSOM) for Project 2013
Solutions for Project Online must use the CSOM. However, on-premises apps can use either the CSOM or the Project Server Interface (PSI). If the CSOM includes the functionality you plan to use, we recommend that you use the CSOM for new apps.
Apps and the security model Apps must use the CSOM for CRUD (create, read, update, delete) operations with Project Server 2013 and Project Online. Project apps do not use the app-only authentication model in SharePoint 2013. A Project Server app requires a specific permission request scope that specifies on whose behalf commands are being run.
REST queries You can create REST queries of the CSOM OData service without consuming the metadata. Some third-party tools enable using the .NET assemblies for the CSOM to develop apps for other devices. For example, search the Internet for "cross-platform .NET development tools for iOS or Android."
$metadata option for the ProjectData reporting service is valid (
To see the entities available in the CSOM through the REST interface, you can use the
https://ServerName/pwaName/_api/ProjectServer query. For REST queries, the ProjectServer entity closely mirrors properties of the ProjectContext object in the Microsoft.ProjectServer.Client.dll managed assembly and the PS.ProjectContext object in the JSOM. For example, you can use your browser to get information from the CSOM about projects in Project Web App, the assignments in a specified project, and the task name of a specified assignment for a specified resource, by using the following queries (each query uses the same
https://ServerName/pwaName/_api URL prefix). The GUIDs are sample values for Project.Id, EnterpriseResource.Id, and Assignment.Id.
/ProjectServer/Projects /ProjectServer/Projects('263fc8d7-427c-e111-92fc-00155d3ba208')/Assignments /ProjectServer/EnterpriseResources('28eeb2b5-fe74-4efc-aa35-6a64514d1526')/Assignments('a2eafeb5-437c-e111-92fc-00155d3ba208')/Task?$select=Name
Table 1 lists the ProjectContext properties that represent Project Server objects. You can use these objects to retrieve other Project Server 2013 entities, such as assignments and tasks.
Table 1. ProjectContext properties that provide access to Project Server objects in the CSOM and JSOM
|CSOM (.NET, Silverlight, and Windows Phone)||JSOM|
In this section
Getting started with the Project Server CSOM and .NET provides overview information about the Project Server CSOM and .NET, instructions about how to create a simple .NET CSOM extension in Visual Studio 2012, and supporting code examples.
Also, check out these articles that show how to use the CSOM:
You can also use Visual Studio 2010 for .NET Framework 4 development with the CSOM.
Send feedback about: