Get Relationship

Get Relationship
Get the related resources of a particular Relationship Type for a Resource

The URL path variable 'relationshipType' uses the RelationshipType.representation value.
Few sample URLs are shown below.
/api/resources/{resourceId}/relationships/children
/api/resources/{resourceId}/relationships/parents

Request
URI
GET
https://{api_host}/suite-api/api/resources/{id}/relationships/{relationshipType}
COPY
Path Parameters
string
id
Required

The UUID of the resource to set the relationships for

string
relationshipType
Required

The type of relationship of the objects; Uses the RelationshipType.representation value

Possible values are : PARENT, CHILD, ALL,
Query Parameters
integer
page
Optional
Constraints: default: 0

Page number from which data needs to be displayed (0-based)

integer
pageSize
Optional
Constraints: default: 1000

Expected number of entries per page


Authentication
This operation uses the following authentication methods.
Responses
200

All the related resources

Returns resource-relation of type(s) application/json
"{\n  \"relationshipType\" : \"CHILD\",\n  \"resourceList\" : [ {\n    \"creationTime\" : 1753426400609,\n    \"resourceKey\" : {\n      \"name\" : \"VM1\",\n      \"resourceIdentifiers\" : [ ]\n    },\n    \"credentialInstanceId\" : \"51f8f60d-4a39-4839-9924-698d022e2e10\",\n    \"resourceStatusStates\" : [ ],\n    \"dtEnabled\" : true,\n    \"badges\" : [ ],\n    \"relatedResources\" : [ ],\n    \"identifier\" : \"19464db6-8d2e-48e9-a682-642b388d453b\"\n  }, {\n    \"creationTime\" : 1753426411121,\n    \"resourceKey\" : {\n      \"name\" : \"VM2\",\n      \"resourceIdentifiers\" : [ ]\n    },\n    \"credentialInstanceId\" : \"b1f8f60d-4a39-9348-9924-068d022e2b00\",\n    \"resourceStatusStates\" : [ ],\n    \"dtEnabled\" : true,\n    \"badges\" : [ ],\n    \"relatedResources\" : [ ],\n    \"identifier\" : \"076e9396-3dfe-4cea-90ed-f0da719e3c15\"\n  } ]\n}"
array of object
links
Optional

Collection of links

object
pageInfo
Optional

Represents page information for a paged result

string
relationshipType
Required

Relationship Types between resources. All relationships are many-to-many.
Representation names are plural.

Possible values are : PARENT, CHILD, CONTAINS, CONTAINED_BY, REFERENCES, REFERENCED_BY, USES, USED_BY, SELF, DESCENDANT, ANCESTOR, TST, ALL,
array of object
resourceList
Optional

The list of resources having relation


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/suite-api/api/resources/{id}/relationships/{relationshipType}