Open Inventory / Docs
EndpointsInventory structureResourcesIdRelations

List relationships touching an inventory item

The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.

GET
/resources/{id}/relations

Returns incoming and outgoing directed relationships with both endpoint summaries and the relationship definition.

Authorization

bearerAuth
headerAuthorizationBearer <inv_ token>

Path Parameters

id*string
Formatuuid

Header Parameters

X-Organization-ID?string

Organization membership selected for this request. User-bound credentials may select any active membership; standalone tokens may only repeat their pinned organization ID.

Formatuuid

Response Body

Resource relationships

application/json
  1. response
relations*array<>
Example Request
curl -X GET 'https://inventory.example.com/api/v1/resources/497f6eca-6276-4993-bfeb-53cbbbba6f08/relations'
Example Response
{  "relations": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "sourceResourceId": "481dd929-1ef7-4b4f-8c71-b35f932f1b65",      "targetResourceId": "8b52d9f4-692a-4d1f-8c9f-c36bd283d92e",      "relationTypeKey": "string",      "origin": "manual",      "sourceFeatureId": "string",      "targetFeatureId": "string",      "attributes": {},      "createdBy": "string",      "createdAt": "2019-08-24T14:15:22Z",      "source": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "type": "string",        "status": "available"      },      "target": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "type": "string",        "status": "available"      },      "relationType": {        "key": "string",        "label": "string",        "inverseLabel": "string",        "description": "string",        "allowManual": true,        "spatial": true,        "position": 0,        "isSystem": true,        "createdBy": "string",        "updatedBy": "string",        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "archivedAt": "2019-08-24T14:15:22Z"      }    }  ]}