![]() |
API Documentation
|
POST - generates a cryptographic key.This API endpoint generates a cryptographic key, which in turn is required to encrypt the data of a file object.
A file object (i.e. Secure Object) is created through the <access-service>/api/v1/organisations/{orgGroupId}/objects endpoint.
This API endpoint supports requests utilizing Cocoon Data user accounts with the following roles (as described in the Organisation Administrator's Guide) and conditions:
The Cocoon Data Platform's resources available to a Cocoon Data user meeting the criteria above is determined by the access token submitted in the header of requests to this endpoint.
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub... Bearer token is the appropriate access token.Content-Type: application/jsonIf none of the Optional parameters below are specified, then an empty JSON object must be passed in the body of the request:
{}The following optional parameters can be sent in the body of the POST request, each as individual members of a JSON object:
128, 192 or 256. If this parameter is not specified, a value of 256 is assumed. If the request succeeded, then an HTTP response status 200 OK is returned.
For successful requests only, a JSON-formatted response is also returned, which contains a keys array that has the following elements:
keyLength value submitted as part of the request's optional parameters above. AES. 256 or match the value of the keyLength submitted as part of the request's optional parameters above. modifiedAt - This value should match the createdAt value above.
Example (response):