This section explains the following REST operations regarding the collection which has been secured with Basic Auth.
The following terms explain the meaning of the parameters passed with the below REST URIs
Parameter | Explanation |
---|---|
Collection path | Path of the resource |
When a user adds a collection to the registry, the user has to specify the Media-Type of the collection in the request (as a Header). The Media-Type for the collection is "application/atomcoll+xml". If the user specifies a different content-type for the collection, the resource to be added won't be considered as a collection.
Get the Content of a Collection
Attributes | Values |
---|---|
HTTP Method | GET |
Request URI | /artifact{ collection path } |
HTTP Request Header | Authorization: Basic { base64encoded(username:password) } |
Response | HTTP 200 OK |
Response type | application/json |
Description | Retrieves the content the paths of the requested collection |
Add a Collection
Attributes | values |
---|---|
HTTP Method | PUT |
Request URI | /artifact{ complete path of the collection to be added } |
HTTP Request Header | Authorization: Basic { base64encoded(username:password) } Content-Type: application/atomcoll+xml |
Sample request | curl -v -k -X PUT -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/atomcoll+xml" -d "https://localhost:9443/resource/1.0.0/artifact/_system/governance/permission/applications/TestSP/TestCol" |
Response | HTTP 204 No Content |
Response type | application/json |
Description | It adds the specified collection if doesn't exist. |
Delete a Collection
Attributes | values |
---|---|
HTTP Method | DELETE |
Request URI | /artifact{ collection path } |
HTTP Request Header | Authorization: Basic { base64encoded(username:password) } |
Response | HTTP 204 No Content |
Response type | application/json |
Description | It deletes the requested collection if it exists. |