Revisions with REST API
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:
Parameter | Explanation |
---|---|
path | Path of the resource |
ID | Revision ID |
start | Start page number (optional) |
size | Number 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
Attributes | Values |
---|---|
HTTP Method | GET |
Request URI | /revisions?path={path of the resource}&start={ start page }&size={ number of records } |
HTTP Request Header | Authorization: Basic { base64encoded(username:password) } |
Description | Get revision paths of the resource |
Response Type | application/json |
Response | HTTP 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
Attributes | Values |
---|---|
HTTP Method | GET |
Request URI | /revision?path={path of the resource}&id={revision number} |
HTTP Request Header | Authorization: Basic { base64encoded(username:password) } |
ID | Revision ID of the resource |
Description | Get the resource for a given revision |
Response Type | application/octet-stream |
Response | HTTP 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
Attributes | Values |
---|---|
HTTP Method | POST |
Request URI | /revision?path={path of the resource} |
HTTP Request Header | Authorization: Basic { base64encoded(username:password) } |
Response Type | application/octet-stream |
Response | HTTP 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
Attributes | Values |
---|---|
HTTP method | DELETE |
Request URI | /revision?path={path of the resource}&id={revision number} |
ID | Revision ID of the resource |
Description | Delete the given revision of the resource |
Response Type | application/json |
Response | HTTP 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
Â