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 22 Next »

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

The following terms explain the meaning of the query parameters passed with the following REST URIs.

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

Array of values

Array of values for the property e.g.: ["val1","val2","val3",......].
startStart page number.
sizeNumber of associations to be fetched.
targetTarget resource path

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 are 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 }&user={ user name }
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 }&user={ user name }
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}&user={ user name }
HTTP Request Header

Authorization: Bearer {OAuth access token}

Content-Type: application/json

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

Description

It adds 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}&user={ user name }
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