Get Entity
This endpoint gets a single entity in a domain.
Endpoint
GET /v1/domains/{domainKey}/maintenance/entity/get/{id}
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| domainKey | string | yes | Domain identifier used to resolve the domain context. |
| id | integer | yes | Numeric entity ID to fetch. |
Query Parameters
None
Request Body
None
Response Body
The response will return a single entity as JSON.
Status Code: 200
{
"id": 12345,
"entityDef": "kahua_AEC_RFI.RFI",
"hubPath": "Project/Reports/RFI 0042",
"attributes": [
{
"name": "Number",
"value": "RFI-0042",
"cardinality": "One",
"isReference": false
},
{
"name": "Status",
"value": "Open",
"cardinality": "One",
"isReference": false
},
{
"name": "AssignedTo",
"value": "48291035",
"cardinality": "One",
"isReference": true
}
],
"outwardReferences": [],
"action": null,
"identifier": null,
"link": null
}
Core properties in entity
| Property | Type | Description |
|---|---|---|
| id | integer | Entity id returned by the database row. |
| entityDef | string | Fully-qualified entity definition name, e.g. App.Schema. |
| hubPath | string | Optional Hub path if available from the entity metadata. |
| attributes | runEntityAttribute[] | Flat attribute values and reference metadata. |
| outwardReferences | runEntityOutwardReference[] | Entity links that point outward from the loaded record. |
Example
Fetch an entity by id
GET /v1/domains/MagsevenBuilders/maintenance/entity/get/987654
Response Body
Status Code: 200
{
"id": 987654,
"entityDef": "kahua_Project.Project",
"attributes": [
{
"name": "Name",
"value": "Northgate Redevelopment"
},
{
"name": "Number",
"value": "PRJ-1042"
}
]
}
Errors
This occurs when required information for the contact is not properly filled out in the body.
Status Code: 204
This can occur if the domainKey parameter is empty, null, or not valid.
Status Code: 400
This can occur when the ID parameter is empty or null.
Status Code: 404
Additional Information
In practical terms the entity is resolved against the domain context, not against a projectId/partition-scoped maintenance call.