In this article
Get Entity By EntityID
This endpoint is used to get specific entity based on the entity ID. Application user has to provide the ercollectionid as part of header body to fetch entity from specific partition.
URL
https://{{HOST}}/apollo/graph/entities({entityID})?v={version}
https://{{HOST}}/apollo/graph/entities($filter={entityID})?v={version}
Method
GET
Required IMS Scopes
- apollo_read
Versions Supported
1.0 (Default)
1.1
1.2
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authorization required |
Bearer {access_token} | Authorization token |
| Content-Type required |
application/json | Content Type |
| ercollectionid required |
{ercollectionid} | Partition Key |
URL Query Parameter
| Name | Description | Example | |
|---|---|---|---|
| v optional |
Service Version | /entitytypes/{entitytype}/entities?v=1.1 | String |
| includeSystemData optional |
Flag to indicate if result should have system data field (default false) | /entities({entityID})?includeSystemData=false |
URL Path Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| entityID required |
Entity id | eType:{entityID} | string |
Example
Request
curl -X GET
'https://{{HOST}}/apollo/graph/entities(JCI-507-B1-F1)?v=1.1'
-H 'Authorization: Bearer {{access_token}}'
-H 'Content-Type: application/json'
-H 'ercollectionid: testcollection'
curl -X GET
'https://{{HOST}}/apollo/graph/entities($filter=JCI-507-B1-F1)?v=1.1'
-H 'Authorization: Bearer {{access_token}}'
-H 'Content-Type: application/json'
-H 'ercollectionid: testcollection'
-H 'first: 100'
-H 'after: 0'
Response
{
"status": {
"message": "",
"code": "200"
},
"data": [
{
"id": "JCI-507-B1-F1",
"entityType": "BRICK_0_4__Floor",
"brickEntityType": "BRICK_0_4__Location",
"entityName": "JCI 507 Michigan Street Milwaukee Building B1 Floor F1",
"brickEntitySubType": "BRICK_0_4__Floor"
}
],
"paging": {
"totalCount": 1,
"continuationToken": null
}
}
Errors
| Error | Code | Description |
|---|---|---|
| Bad Request | 400 | The request could not be understood by the server due to malformed syntax. |
| Unauthorized | 401 | The request can not be processed if token is not valid or expired. |
| Forbidden | 403 | The request can not proceed if ercollectionid is not registered or does not have any logs in ACL library. |