API Documentation
|
POST
- registers a new client application with the Cocoon Data Platform.GET
- retrieves a list of information for all client applications currently registered on the Cocoon Data Platform.This API endpoint serves a number of purposes:
This API endpoint supports the following Cocoon Data user roles (as described in the SafeShare Administrator's Guide):
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.
The appropriate access token as the Bearer
token:
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...
The following header is required if the body of the request has a JSON object:
Content-Type: application/json
The following required parameters must be sent in the body of the POST request, as individual members of a JSON object:
authorization_code
- An OAuth 2.0 grant type best suited for client applications that are server-side web applications, native desktop/laptop or mobile device applications. See Authorization Code in the Grant type details section/table of the SafeShare Administrator's Guide for more information. implicit
- An OAuth 2.0 grant type best suited for client applications that are user agent-based applications, such as one that runs client-side in a web browser. However, this grant type does not support the use of refresh tokens. See Implicit in the Grant type details section/table of the SafeShare Administrator's Guide for more information. password
- An OAuth 2.0 grant type best suited for client applications that are native desktop/laptop or mobile device applications, or administrator/system-run services, such as a scheduled job. See Password in the Grant type details section/table of the SafeShare Administrator's Guide for more information. refresh_token
- An option (supporting the OAuth 2.0 grant types above) that determines if the Cocoon Data Platform can issue refresh tokens to this client application, which the application can then use to request for new access tokens. mfa
- An option (supporting the OAuth 2.0 grant types above) that determines if the Cocoon Data Platform will permit this client application to support Cocoon Data users authenticating with 2FA enabled. device
- An option (supporting the OAuth 2.0 grant types above) that determines if the client application (running on a specific device - typically on a mobile device platform such as iOS or Android) can authenticate a specific Cocoon Data user with a passcode. refresh_token
) - The number of seconds that a refresh token issued by the Cocoon Data Platform to a client application is valid for. This value must be greater than the accessTokenValiditySeconds value above. authorization_code
and/or password
) - A list of one or more valid Uniform Resource Identifiers (URIs) which the Cocoon Data Platform uses to verify the value of the redirect URI (also known as a redirection endpoint) parameter sent by the client application to the Cocoon Data Platform (during an OAuth 2.0 authentication and authorization request to obtain an access token). The following optional parameters can be sent in the URL of the GET request:
ASC
or DESC
(default is ASC
). If the request succeeded, then an HTTP response status 200 OK
is returned.
For successful requests only, a JSON-formatted response containing the following members is also returned: