API Documentation
Toggle TOC panel
<access-service>/api/v1/organisations

URL structure

1 https://access-service.xy-company.com/api/v1/organisations

Supported methods and overview

  • POST - used to add a new organization to the Covata Platform.
  • GET - used to retrieve information about all organizations configured on the Covata Platform.

Detailed description

This API endpoint serves a number of purposes:

  • Adds a new organization to the Covata Platform.
  • Retrieves information about all organizations configured on the Covata Platform.

Supported roles and conditions

This API endpoint supports the following Covata user roles (as described in the Safe Share Administrator's Guide):

The Covata Platform's resources available to a Covata user meeting the criteria above is determined by the access token submitted in the header of requests to this endpoint.

Required headers

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

Required POST-request parameters

The following required parameters must be sent in the body of the POST request, each as individual members of a JSON object:

  • name - The initial name for the new organization.
  • quota - The initial quota for the organization (in MiB).
    Note: A MiB is a mebibyte, where one MiB = 1 x 1024 x 1024 bytes = 1048576 bytes.
  • adminEmail - The email address of the initial Organization administrator of this organization.
  • contactEmail - The email address of the initial Contact Person of this organization.
    Notes: Example (request):
    {
    "name": "Another Org.",
    "quota": 2094080,
    "adminEmail": "org.administrator@xy-company.com",
    "contactEmail": "org.administrator@xy-company.com"
    }

Optional POST-request parameters

The following optional parameters can be sent in the body of the POST request, each as individual members of the JSON object that includes the Required POST-request parameters above:

  • description - The initial description for the new organization.
    Note: This property appears under the name A brief description of the organization on the Configuration page in Organization Administration. However, as described in the Configuring Safe Share Organization Administration properties page of the Organization Administrator's Guide, this property is currently of limited use.
    Example (request):
    {
    "name": "Another Org.",
    "description": "The brief description for Another Org.",
    "quota": 2094080,
    "adminEmail": "org.administrator@xy-company.com",
    "contactEmail": "org.administrator@xy-company.com"
    }

Optional GET-request parameters

The following optional parameters can be sent in the URL of the GET request:

  • limit - An integer value from 0 to 100, representing the maximum number of items to be returned in the response, where an individual item is information about an organization configured on the Covata Platform. If this parameter is omitted, then its value is 0 by default, which does not apply restrictions to the number of items returned in the response.
  • offset - A value representing the count order of all retrievable items (i.e. organizations configured on the Covata Platform) returned in the response. Calls to this API endpoint may amount to potentially large numbers of items being returned from the Covata Platform. Since the order of these items in the response could differ significantly, based on the values of the orderBy and sortBy parameters below, this offset parameter provides pagination for items returned in responses, allowing items to be retrieved from any count greater than 0 (i.e. the first item returned in a response). If this parameter is omitted, then its value is 0 by default.
  • orderBy - An enumeration (enum) value representing the order in which items (i.e. organizations configured on the Covata Platform) are returned in the response. This parameter orders items according to the value of the sortBy parameter specified below. Ordering items can be in either ascending alphanumeric order (by specifying the value ASC for this parameter) or descending order (by specifying the value DESC). If this parameter is omitted, then its value is ASC by default.
  • sortBy - A value representing the field (i.e. member) of a retrieved item by which items (i.e. organizations configured on the Covata Platform) returned in the response will be sorted. Valid field values for this parameter include:
    • id - the ID of the organization,
    • name - the name of the organization,
    • contact_email - the email address of the organization's Contact Person,
    • quota - the name of the organization and
    • description - the description of the organization.
    Example (request):
    1 https://access-service.xy-company.com/api/v1/organisations?sortBy=name

Returns

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:

  • items - .
  • name - .
  • description - .
  • quota - .
  • contactEmail - .
  • enabled - .
  • id - .
  • modifiedAt - .
  • createdAt - .
  • count - .
  • offset - .
    Example (response from a POST request):
    {
    "name": "Another Org.",
    "description": "The brief description for Another Org.",
    "quota": 2094080,
    "contactEmail": "org.administrator@xy-company.com",
    "enabled": true,
    "id": "769407354122051584",
    "modifiedAt": "2016-10-24T03:50:08.120Z",
    "createdAt": "2016-10-24T03:50:08.120Z"
    }

    Example (response from a GET request):
    {
    "items": [{
    "name": "Default",
    "description": "",
    "quota": 0,
    "contactEmail": "",
    "enabled": true,
    "id": "1",
    "modifiedAt": "1970-01-01T00:00:00.000Z",
    "createdAt": "1970-01-01T00:00:00.000Z"
    }, {
    "name": "XY Company",
    "description": "",
    "quota": 4194304,
    "contactEmail": "org.administrator@xy-company.com",
    "enabled": true,
    "id": "760756644367081472",
    "modifiedAt": "2016-10-10T06:34:19.254Z",
    "createdAt": "2016-09-30T06:55:18.192Z"
    }],
    "count": "2",
    "offset": "0"
    }