Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

This section explains the following REST operations regarding the associations / association of the resource which has have 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

Table of Contents

Note

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

resource path -

ParameterExplanation
pathPath of the
source
resource.
OAuth access token
-
Authorized access token per user for an hour by default.
association
type
-
Type of association. By
Default
default, Governance Registry has three types of association.
Those
These are usedBy, ownedBy, and other.
startStart page number.
sizeNumber of associations to be fetched.
targetTarget 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.
  • Note

     

    ...

    Note

    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 }
    HTTP Request HeaderAuthorization: Bearer { OAuth access token }
    ResponseIt retrieves all the associations posted on the specific resource.
    ResponseHTTP 200 OK
    Response TypeJSONapplication/json

    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}

    ResponseDescription

    It retrieves all the associations for the specific type on of the given resource
    ResponseHTTP 200 OK
    Response TypeJSON

    ...

    application/json

    Add Associations to a

    ...

    Resource

    AttributesValues

    HTTP Method                 

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

    Authorization: Bearer {OAuth access token}

    Content-Type: application/json

    Payload[{ "targettype":"<target resource path><type of the association>","typetarget":"<association type><valid resource path>"}] 

    ResponseDescription

    It retrieves all adds the associations including the added onesarray of associations passed as the payload for the source resource
    ResponseHTTP 204 No Content.
    Response TypeJSON

    ...

    application/json

    Add Association to a Resource

    It retrieves the rest of the associations for the given resource after deletion
    AttributesValues

    HTTP Method                 

    DELETEPOST
    Request URI/associationassociations?path={resource path}&typetargetPath={association typetarget resource}&targettype={target resource pathassocation type}
    HTTP Request Header

    Authorization: Bearer {OAuth access token}

    Content-Type: application/json

    ResponseHTTP 204 No Content.
    Response TypeJSON

     

     

     

     

     

     

     

     

     

     

     

    ...

    application/json

    Delete Associations on a Given Resource

    AttributesValues

    HTTP Method                 

    DELETE
    Request URI/association?path={resource path}&targetPath={target path}&type={association type}

    Description

    It deletes the association between the source and target resources for the given association type.
    ResponseHTTP 204 No Content.
    Response Typeapplication/json