com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Associations with REST API

This section describes the REST URIs for working with the associations of resources that have been secured with Basic Auth.

Query parameters

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

ParameterExplanation
pathPath of the resource
typeType of association. By default, Governance Registry has three types of associations: usedBy, ownedBy, and other.
startStart page number (optional)
sizeNumber of comments to be fetched (optional)
targetTarget resource path

The {start page} and {number of records} can be any value greater than or equal to 0. The {start page} and {number of records} begin with 1. If both of them are 0, then all the records are retrieved. Note that start and size are optional parameters and will default to 0 by default.

For details on security (the authorization header) and the URI syntax (port, context, etc.), see Registry REST API.

Get all the associations for a resource

AttributesValues

HTTP Method                

GET
Request URI/associations?path={ resource path }&start={ start page }&size={ number of records }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
ResponseIt retrieves all the associations posted on the specific resource.
ResponseHTTP 200 OK
Response Typeapplication/json

Get associations of specific type for a resource

AttributesValues

HTTP Method                 

GET
Request URI/associations?path={ resource path }&type={ association type }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }

Description

It retrieves all the associations for the specific type of the given resource
ResponseHTTP 200 OK
Response Typeapplication/json

Add associations to a resource

AttributesValues

HTTP Method                 

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

Authorization: Basic { base64encoded(username:password) }

Content-Type: application/json

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

Description

It adds the array of associations passed as the payload for the source resource
ResponseHTTP 204 No Content.
Response Typeapplication/json

Add association to a resource

AttributesValues

HTTP Method                 

POST
Request URI/associations?path={resource path}&targetPath={target resource}&type={assocation type}
HTTP Request Header

Authorization: Basic { base64encoded(username:password) }

Content-Type: application/json

DescriptionAdds an association between the source and target resources
ResponseHTTP 204 No Content.
Response Typeapplication/json

Delete associations for a 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

 

 

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.