REST API - getResource - Using Body Parameter

The table summarizes the REST API - getResource when passing GUIDs in the body.

Request

Format
POST <baseurl>/orgresource/get/<version>
Path parameters version: The major version of the organization model from which the resource’s model entity associations are to be taken. A value of -1 uses the highest major version. Can be obtained using createResource .
Body getResource element (optional): A collection of GUIDs identifying the resources to be returned. Can be obtained using listCandidateResources. You can have as many as you want. If no GUID is specified, the call returns the calling user's own details.

Response

JSON Returns a JSON representation of the content of the getResourceResponse element.
XML Returns the content of the getResourceResponse element (from the OrgResourceService schema).

Example

Request
POST <baseurl>/orgresource/get/1
Request Body
{"xml-fragment": { "@model-version": "1",
   "guid": [
    "D49BD49D-E96E-4FBB-BAA3-3E70CC162979" ,  "81B47972-0DFF-4697-814E-3B1037D00632"
 ]}}
Response
{"xml-fragment": {"resource": [
      {
      "@model-version": "1",
      "@guid": "D49BD49D-E96E-4FBB-BAA3-3E70CC162979",
      "@name": "Clint Hill",
      "@label": "Mr Clint Hill",
      "@resource-type": "HUMAN",
      "@container-id": "1",
      "@container-name": "easyAs",
      "position":       {
         "@guid": "_C9zeYM9-EeOrzMcMFETzZw",
         "@name": "Developer",
         "@label": "Developer"
      },
},
      "ldap-reference":       {
         "@ldap-alias": "easyAs",
         "@ldap-dn": "OU=Clint Hill, OU=Swindon,
OU=AllEmployees,
O=easyAsInsurance"
      }
   },
      {
      "@model-version": "1",
      "@guid": "81B47972-0DFF-4697-814E-3B1037D00632",
      "@name": "John Eustace",
      "@label": "John Eustace",
      "@resource-type": "HUMAN",
      "@container-id": "1",
      "@container-name": "easyAs",
      "position":       {
         "@guid": "_C9zeYM9-EeOrzMcMFETzZw",
         "@name": "Developer",
         "@label": "Developer"
      },
},
      "ldap-reference":       {
         "@ldap-alias": "easyAs",
"@ldap-dn": "OU=John Eustace, OU=Swindon,
OU=AllEmployees, O=easyAsInsurance"
      }
   }
]}}