Develop > Developer reference > Single record APIs

Single record API

The only API implemented for single records is the Get record by ID API.

The syntax can be in the following formats:

  • The tenant ID is directly in the URL: https://<serverAddress>/rest/<tenant-id>/ems/<entity-type>/<id>?<layout>
  • The tenant ID is in a parameter: https://<serverAddress>/rest/<tenant-id>/ems/<entity-type>/<id>?<layout>&TENANTID=<tenant-id>
  • The customer domain has a domain mapping: https://<customer domain name>/rest/<tenant-id>/ems/<entity-type>/<id>?<layout>

where:

tenant-id represents the tenant ID. To access the tenant ID, right-click the Launch button next to the required product on MyAccount, select Copy link address and paste it into a browser. The tenant ID is the number following TENANTID=.

entity-type represents the logical name of the record to return. Example: incident.

id represents the ID of the record instance.

layout represents a part of the REST query specifications. It specifies the record properties to be returned.

Note  

  • The layout parameter is mandatory. For more information about the layout parameter, see Layout.
  • You can view the available record types (for the entity-type parameter) by going to Administration > Configuration > Records and opening the drop-down list at the upper left. You can view the available properties (for the layout parameter) by selecting the required record type and going to the Fields tab.

Request structure

Enter the following request URI:

https://<serverAddress>/rest/<tenant-id>/ems/Person/10548?layout=Name,Avatar

Alternatively, you can enter the request URI using the parameter format:

https://<serverAddress>/rest/1234/ems/Person/10548?layout=Name,Avatar&TENANTID=1234

If the customer domain has a domain mapping, you can enter the request URI as follows:

https://<customer domain name>.hpe.com/rest/<tenant-id>/ems/Person/10548?layout=Name,Avatar

Return structure

The following is an example of the structure of the returned data in JSON format:

{
	"entities": [
		{
			"entity_type": "Person",
			"properties": {
				"Name": "Ivey Dillard",
				"Id": "10548",
				"LastUpdateTime": 1385656386731
			},
			"related_properties": {}
		}
	],
	"meta": {
		"completion_status": "OK"
	}
}

Related topics