Get Relationships

Get Relationships

If the optional query parameter 'relationshipType' is specified, relations of that particular Relationship Type are returned.
Few sample URLs are shown below.
/api/resources/{resourceId}/relationships?relationshipType=CHILD
/api/resources/{resourceId}/relationships?relationshipType=PARENT

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

The UUID of the resource to set the relationships for

Query Parameters
string
relationshipType
Required

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

Possible values are : PARENT, CHILD, ALL,
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\" : \"ALL\",\n  \"resourceList\" : [ {\n    \"description\" : \"Some Virtual Machine\",\n    \"creationTime\" : 10202319,\n    \"resourceKey\" : {\n      \"name\" : \"Cloud-VM\",\n      \"resourceIdentifiers\" : [ ]\n    },\n    \"resourceStatusStates\" : [ ],\n    \"dtEnabled\" : true,\n    \"badges\" : [ ],\n    \"relatedResources\" : [ ],\n    \"identifier\" : \"bc557345-7efe-496b-bfaa-91b81cc3cad5\"\n  }, {\n    \"description\" : \"Some NFS\",\n    \"creationTime\" : 10202330,\n    \"resourceKey\" : {\n      \"name\" : \"NFS-Datastore\",\n      \"resourceIdentifiers\" : [ ]\n    },\n    \"resourceStatusStates\" : [ ],\n    \"dtEnabled\" : true,\n    \"badges\" : [ ],\n    \"relatedResources\" : [ ],\n    \"identifier\" : \"58856893-fcff-4e5d-8916-9b8d09ad1640\"\n  } ]\n}"
object
pageInfo
Optional

Represents page information for a paged result

array of object
links
Optional

Collection of links

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=v