1. Resources API currently support only updates to existing resource information and doesn't support addition of new resources through API. If you have a requirement for adding new resources, you can use XOG functionaity.
2. Connect using a REST API Client such as Postman.
3. Retrieving Resource Details. Note :- the retrieval uses the internal ID of the resource i.e. 5 million id. You can query your database to find this out (select id from srm_resources where unique_name='resourceid';).
Request URL :- http(s)://hostname.domain.com/ppm/rest/v1/resources (Note :- the page size is 25, so only 25 resources are retrieved.)

You can retrieve the next records i.e. in batches of 25 using the below request.
GET Request :- http(s)://hostname.domain.com/ppm/rest/v1/resources?offset=25 (this retrieves resources from 25-50).
GET Request :- http(s)://hostname.domain.com/ppm/rest/v1/resources?offset=50 (this retrieves resources from 50-75) and so on.
4. Retrieving Data of a Single Resource. We are trying to retrieve Resource information of admin user who has internal ID as 1.
Request URL :-http(s)://hostname.domain.com/ppm/rest/v1/resources/1
Attributes that are retrieved.
lastName
firstName
definedTeamId
manager
employmentType
forecastRate
inputTypeCode
isRole
fullName
openForTimeEntry
availability
isActive
primaryRole
uniqueName
trackMode
email
resourceType
5.
How to update resource information through Rest API? Resources API supports PUT and PATCH methods to perform updates, we will first demonstrate the PATCH Method.
Pre-Requisites :- You need to have the internal ID of the resource for whom you are planning to update the resource information. In this example we will use the admin user with internal id 1 and change his Firstname and Last Name.
PATCH Request URL :- http(s)://hostname.domain.com/ppm/rest/v1/resources/1
JSON Request :-
{
"lastName": "Test",
"firstName": "Resources API",
"uniqueName": "admin"
}

Status 200 is received as a success message, and application shows the updated data.

6. Using the PUT method to Update.
PUT Request URL :- http(s)://hostname.domain.com/ppm/rest/v1/resources/1
Additional Headers :- x-api-force-patch = true
JSON Request :-
{
"lastName": "Test PUT",
"firstName": "Resources API",
"uniqueName": "admin"
}
Status 200 is received as a success message, and application shows the updated data.
