Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section explains the following REST operations regarding the collection which have has been secured with OAuth 2.0.

Table of Contents

Note

The following terms explains explain the meaning of the parameters passed with the below REST URIs

username of the user
ParameterExplanation
collection Collection pathPath of the resource
OAuth access tokenAuthorized access token per user for an hour by defaultuser

When a user adds a collection to the registry, the user has to specify the ContentMedia-Type of the collection in the request (as a Header). The ContentMedia-Type for the collection is "application/atomcoll+xml". If the user specifies a different content-type for the collection, the resource  to be added wont won't be considered as a collection.

...

AttributesValues
HTTP MethodGET
Request URI/artifact/{ collection path }?user={ user name }
HTTP Request HeaderAuthorization: Bearer { OAuth access token }
ResponseHTTP 200 OK
Response typeapplication/json
Description                 Retrieves the content the paths of the requested collection

Add a Collection

Attributesvalues
HTTP MethodPUT
Request URI/artifact/{ complete path of the collection to be added }?user={ user name }
HTTP Request Header

Authorization: Bearer { OAuth access token }

Request

Content-Type: application/atomcoll+xml

Sample requestcurl -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"
ResponseHTTP 204 No Content
Response typeapplication/json
DescriptionIt adds the specified collection if doesn't exist.

Delete a Collection

Attributesvalues
HTTP MethodDELETE
Request URI/artifact/{ collection path }?user={ user name }
HTTP Request HeaderAuthorization: Bearer { OAuth access token }
ResponseHTTP 204 No Content
Response typeapplication/json
DescriptionIt deletes the requested collection if it exists.

...