Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

This section explains the following REST operations regarding the associations of the resource which has been secured with OAuth 2.0.

  • Get all the associations on a resource.
  • Get an association of specific type on a given resource.
  • Add the associations to a resource.
  • Delete an association on a given resource

The following terms explains the meaning of the parameters passed with the below REST URIs.

ParameterExplanation
resource pathPath of the resource
OAuth access tokenAuthorized access token per user for an hour by default
association typeType of association. By Default, Governance Registry has three types of association. Those are usedBy, ownedBy, and other.

array of values

Array of values for the property eg: ["val1","val2","val3",......]
arget resource pathstart page number
number of recordsnumber of associations to be fetched

The {start page} and {number of records} parameters can take any value greater than or equal to 0. The {start page} and {number of records} begins with 1. If both of them are 0, then all the associations will be retrieved.

Get all the associations on a resource
AttributesValues

HTTP Method                

GET
Request URI/associations?path={ resource path }&start={ start page }&size={ number of records }
HTTP Request HeaderAuthorization: Bearer { OAuth access token }
ResponseIt retrieves all the associations posted on the specific resource.
Response TypeJSON
Get associations of specific type on a given resource
AttributesValues

HTTP Method                 

GET
Request URI/associations?path={ resource path }&type={ association type }
HTTP Request HeaderAuthorization: Bearer {OAuth access token}

Response

It retrieves all the associations for the specific type on the given resource
Response TypeJSON
Add  associations to a resource
AttributesValues

HTTP Method                 

POST
Request URI/association?path={resource path}
HTTP Request Header

Authorization: Bearer {OAuth access token}

Content-Type: application/json

Payload[ {"target":"<target resource path>","type":"<association type>" } ]

Description

It add the array of associations passed as the payload for the source resource
Response TypeJSON
Delete an association on a given resource
AttributesValues

HTTP Method                 

DELETE
Request URI/association?path={resource path}&type={association type}&target={target resource path}
HTTP Request HeaderAuthorization: Bearer {OAuth access token}

Description

It deletes the association between the source and target resources for the given association type.
Response TypeJSON

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • No labels