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 versions 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
IDRevision ID
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 revision paths of a resource

AttributesValues
HTTP MethodGET
Request URI/revisions?path={path of the resource}&start={ start page }&size={ number of records }
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
DescriptionGet revision paths of the resource
Response Typeapplication/json
ResponseHTTP 200 OK
Sample request

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

 

Get revision of a resource

AttributesValues
HTTP MethodGET
Request URI/revision?path={path of the resource}&id={revision number}
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
IDRevision ID of the resource
DescriptionGet the resource for a given revision
Response Typeapplication/octet-stream
ResponseHTTP 200 OK
Sample request

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" "https://localhost:9443/resource/1.0.0/revision?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&id=1" -i -k

 

Create revision of a resource

AttributesValues
HTTP MethodPOST
Request URI/revision?path={path of the resource}
HTTP Request HeaderAuthorization: Basic { base64encoded(username:password) }
Response Typeapplication/octet-stream
ResponseHTTP 204 No Content.
Sample request

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

 

Delete revision of a resource

AttributesValues
HTTP methodDELETE
Request URI/revision?path={path of the resource}&id={revision number}
IDRevision ID of the resource
DescriptionDelete the given revision of the resource
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/revision?path=/_system/governance/trunk/soapservices/com/amazon/soap/1.0.0/AmazonSearchService&id=2" -i -k

 

  • No labels