2

I want to use the REST api of a locally installed MS Project Server 2013 in order to get all projects and their associations(tasks, deliverables and resources) so that I will bind them with the business model of my custom J2ee application. So, I have 2 questions:

  1. According to what I've read so far in MS Project Server documentation, I can use either ProjectData service or ProjectServer resource. What is considered more appropriate for my case?

  2. Can anyone give me a simple example of getting projects and their associations using a Jersey client? Would something like the below be correct using the ProjectData service?

String url = "http://<pwa_site>/_api/ProjectData/$metadata"; 
Client client = Client.create();
WebResource webResource = client.resource(url);
ClientResponse response=webResource.accept("application/xml")
.get(ClientResponse.class); 
String output = response.getEntity(String.class);

Any help would be appreciated.

jkonst
  • 433
  • 6
  • 20

1 Answers1

1
  1. ProjectData provides OData read-only access to the 38 entities for reporting. ProjectServer provides the main functionality of the Project Server Interface (PSI) for the primary entities.

  2. For OData service, I use Apache Olingo library: https://olingo.apache.org/doc/odata2/index.html