This documentation is for WSO2 Governance Registry 5.3.0. View documentation for the latest release.
||
Skip to end of metadata
Go to start of metadata

This section explains the REST operations for working with the tags 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
nameName of the tag
Array of tagsArray of tags to be added, e.g., {"tags":["wow","cool"]}
startStart page number (optional)
sizeNumber of comments to be fetched (optional)

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 tags for a resource

AttributesValues

HTTP Method                

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

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/tags?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&start=0&size=1" -i -k

 

Get all the resources tagged with a specific tag

AttributesValues

HTTP Method                

GET
Request URI/tag?name={ tag name }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionThis retrieves the paths of resources tagged with the specific tag.
Response Typeapplication/json
ResponseHTTP 200 OK
Sample request

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/tag?name=wso2" -i -k


Get all the tags in the registry 

AttributesValues

HTTP Method                

GET
Request URI/tags?path={ resource path }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionThis retrieves all the tags on the user's Registry instance.
Response Typeapplication/json
ResponseHTTP 200 OK
Sample request

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/tags?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService" -i -k

 

Add tags to a resource

AttributesValues

HTTP Method                

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

Authorization: Basic { base64encoded(username:password) }

Content-Type: application/json

Payload{"tags":["wow","cool"]}
DescriptionThis retrieves all the tags with the added tags for the given resource.
Response Typeapplication/json
ResponseHTTP 204 No Content
Sample request

curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"tags":["wow","cool"]}' "https://localhost:9443/resource/1.0.0/tags?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService" -i -k


Delete tag for a given resource

AttributesValues

HTTP Method                

DELETE
Request URI/tag?path={ resource path }&name={tag name}
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
Response Typeapplication/json
ResponseHTTP 204 No Content
Sample request

curl -X DELETE -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache"  "https://localhost:9443/resource/1.0.0/tag?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&name=wow" -i -k

 

  • No labels