GET
Use the GET HTTP method to retrieve (read) singular and collection resources.
Collection Resource
To retrieve a collection resource, execute the GET request on the resource URL. In this example, all the workers are retrieved.
Request
GET https://<host>:<port>/hcmRestApi/resources/11.13.18.05/workers
Response
The JSON response returns all the workers that are included in the items array property. If no workers are found, then it returns an empty collection.
HTTP/1.1: 200 OK
{
"items" : [ {
"PersonId": 300100215315227,
"PersonNumber": "960000000000900",
"CorrespondenceLanguage": null,
"BloodType": null,
"DateOfBirth": null,
"DateOfDeath": null,
"CountryOfBirth": null,
"RegionOfBirth": null,
"TownOfBirth": null,
"ApplicantNumber": null,
"CreatedBy": "VMOSS",
"CreationDate": "2019-04-23T10:25:40+00:00",
"LastUpdatedBy": "VMOSS",
"LastUpdateDate": "2019-04-23T10:25:44.457+00:00,"
...
"links" : [ {
"rel" : "self",
..
},
..
},
...
} ],
"count" : 25,
"hasMore" : true,
"limit" : 25,
"offset" : 0,
"links" : [ {
"rel" : "self",
..
} ]
Singular Resource
To retrieve a singular resource, execute the GET request on the resource URL with the unique identifier. In this example, a single worker is retrieved.
Request
GET https://<host>:<port>/hcmRestApi/resources/11.13.18.05/workers/44617465686A81014B597419030
Response
The response returns a single JSON object for the worker.
HTTP/1.1: 200 OK
{
"PersonId": 300100215315227,
"PersonNumber": "960000000000900",
"CorrespondenceLanguage": null,
"BloodType": null,
"DateOfBirth": null,
"DateOfDeath": null,
"CountryOfBirth": null,
"RegionOfBirth": null,
"TownOfBirth": null,
"ApplicantNumber": null,
"CreatedBy": "VMOSS",
"CreationDate": "2019-04-23T10:25:40+00:00",
"LastUpdatedBy": "VMOSS",
"LastUpdateDate": "2019-04-23T10:25:44.457+00:00",
...,
"links" : [ {
"rel" : "self",
...
} ]
}