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 11 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.

  • resource path - Path of the source resource.
  • OAuth access token - Authorized access token per user for an hour by default.
  • association type - Type of association. By Default, Governance Registry has three types of association. Those are usedBy, ownedBy, and other.
  • target resource path - The path of the target resource with which the association is established.
  • start page - start page number
  • number of  records - number of associations to be fetched.
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}&type={association type}
HTTP Request Header

Authorization: Bearer {OAuth access token}

Content-Type: application/json

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

Response

It retrieves all the associations including the added ones
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}

Response

It retrieves the rest of the associations for the given resource after deletion.
Response TypeJSON

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • No labels