Introduction to the Meta API 

The Meta API provides programmatic access to your Kloudless developer account and information associated with it, such as applications. You can test requests to the API via the API Explorer.

You will need your Kloudless Meta token to make requests to this API. This key is different from your individual application API Keys, and can be obtained on your Account Settings page.

The Meta API has the API type meta, which is the Kloudless API itself. The meta API has the following object types:

  • kloudless_id: An encoded ID representing an object accessible via the Kloudless API.

  • developer: A developer who has signed up with the Kloudless Developer Portal.

  • application: An application created by a Kloudless developer.

  • apikey: An API key belonging to an application.

  • trusted_domain: A trusted domain configured for an application.

  • webhook: A webhook configured for an application.

  • service_key: A custom OAuth credential configured for an application.

  • redirect_uri: A redirect URL configured for an application’s OAuth flow.

  • fe_upload_location: An upload location configured for an application’s use of the File Picker.

  • usage_report: A summary of usage over a specified period of time.

  • license: A Kloudless Enterprise license associated with the developer’s account.

  • invoice: An invoice received from Kloudless.

  • analytics_api_request: Statistics describing an individual API request.


Authorization 

A developer can use an Authorization header to authorize requests for the Kloudless API with a Meta token:

Authorization: Bearer {token: string}

Provide an authorization token and specify the resource in your request, as shown in this cURL example:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    https://api.kloudless.com/v1/[RESOURCE]

For example, a request to the list applications endpoint looks like this:

curl -L -H 'Authorization: Bearer isgqXuDfLBOhcZzf7cO93T' \
    https://api.kloudless.com/v1/meta/applications

Developers 

Kloudless developers have the following attributes:

  • id Unique identifier for this developer.

  • first_name The developer’s first name.

  • last_name The developer’s last name.

  • email The developer’s email address.

  • organization The ID of the Kloudless Enterprise organization the developer belongs to.

  • organization_name The name of the organization whose ID is in the organization field.

  • company The developer’s company.

  • date_joined An ISO 8601 timestamp indicating when the developer signed up in the Kloudless Developer Portal.

  • admin Grants admin access and all permissions in the Kloudless Admin Portal without specifically assigning them to this developer.

  • type Always developer.

  • api Always meta.

List Developers 

list developersGET /meta/developers

The response contains the following information:

  • total Total number of objects, always 1.

  • count Number of objects in objects list, always 1.

  • objects List of developer objects. Will always contain one object for the currently authorized developer.

  • type Always object_list.

  • api Always meta.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "objects": [
        {
          "id": 4,
          "first_name": "John",
          "last_name": "Brown",
          "email": "test@test.com",
          "organization": "Test",
          "organization_name": "test.com",
          "company": "Company Name",
          "api": "meta",
          "type": "developer",
          "date_joined": "2017-05-25T14:48:08Z",
          "admin": true
        }
      ],
      "type": "object_list",
      "api": "meta"
    }

Retrieve a Developer 

retrieve a developerGET /meta/developers/{id}/

Retrieve information about a developer given a developer ID. Only information about the currently authorized developer can be retrieved.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 4,
      "first_name": "John",
      "last_name": "Brown",
      "email": "test@test.com",
      "organization": "Test",
      "organization_name": "test.com",
      "api": "meta",
      "type": "developer",
      "date_joined": "2017-05-25T14:48:08Z",
      "admin": true
    }

Update a Developer 

Update a DeveloperPATCH /meta/developers/{id}

Update information about a developer given a developer ID. Only information about the currently authorized developer can be updated.

The following properties can be updated:

  • first_name

  • last_name

The new object is returned upon success.

Example request:

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{"first_name": "J", "last_name": "B"}' \
    'https://api.kloudless.com/v1/meta/developers/4'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "first_name": "J",
      "last_name": "B"
    }
  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 4,
      "first_name": "J",
      "last_name": "B",
      "email": "test@test.com",
      "organization": "Test",
      "organization_name": "test.com",
      "api": "meta",
      "type": "developer",
      "date_joined": "2017-05-25T14:48:08Z",
      "admin": true
    }

Applications 

Kloudless application objects have the following attributes:

  • id Unique identifier for this application. Also known as the App ID.

  • name The application’s name. Will be displayed to a user connecting an account to the application.

  • description A description of the application.

  • logo_url A URL at which an image containing the application’s logo is available. The URL will be used to display the logo to the user when using Kloudless UI components.

  • active Whether the application is active or not. Deleted applications will not show up via the API and do not count as ‘inactive’.

  • implicit_grant_enabled Defaults to false. If true, allows OAuth 2.0 Implicit Grant flow for this application.

  • recent_enabled Default to false. If true, collects data on recent activity in accounts, such as information on recently modified files.

  • events_enabled If true, collects event data for accounts. Defaults to false.

  • internal_use Indicates internal development. This flag indicates that accounts connected to this application are only used internally for development, testing, and other similar purposes. This enables Kloudless to waive usage fees for these accounts.

  • created An ISO 8601 timestamp indicating when the application object was created.

  • modified An ISO 8601 timestamp indicating when the application object was last modified.

  • type Always application.

  • api Always meta.

List Applications 

list applicationsGET /meta/applications{?active,page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of application objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • active
    boolean (optional) 

    Retrieves only active/inactive applications, if present.

    Choices: true false

    page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    The page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "total": 3,
        "count": 3,
        "page": 1,
        "objects": [
            {
                "id": "wSPk9y5D7p5o87k0ACGKxR",
                "name": "Test App 1",
                "description": "A test application.",
                "logo_url": "",
                "active": true,
                "internal_use": false,
                "implicit_grant_enabled": false,
                "recent_enabled": false,
                "events_enabled": false,
                "created": "2014-03-18T03:57:16.770685Z",
                "modified": "2014-06-26T04:13:45.439534Z",
                "type": "application",
                "api": "meta",
            },
            {
                "id": "osM_FF6fIWXmCLDfWVRX",
                "name": "Test App 2",
                "description": "A test application.",
                "logo_url": "",
                "active": true,
                "internal_use": false,
                "implicit_grant_enabled": false,
                "recent_enabled": false,
                "events_enabled": false,
                "created": "2014-03-26T05:51:45.725705Z",
                "modified": "2015-01-27T08:52:12.356049Z",
                "type": "application",
                "api": "meta",
            },
            {
                "id": "koiR71rFLPTdld9N-YUR",
                "name": "Demo App",
                "description": "A demo app.",
                "logo_url": "https://s3-us-west-2.amazonaws.com/static-assets.kloudless.com/webapp/sources/gdrive.png",
                "active": true,
                "internal_use": false,
                "implicit_grant_enabled": false,
                "recent_enabled": false,
                "events_enabled": false,
                "created": "2014-06-25T05:54:05.801428Z",
                "modified": "2015-05-01T06:01:39.905658Z",
                "type": "application",
                "api": "meta",
            }
        ],
        "type": "object_list",
        "api": "meta"
    }

Create an application 

create an applicationPOST /meta/applications

While application creation is usually performed via the Kloudless Developer Portal, it can be automated using this endpoint.

Here are the required parameters:

In addition, the following optional parameters may be provided:

  • description Described above.

  • logo_url Described above.

  • implicit_grant_enabled Described above.

  • recent_enabled Described above.

  • events_grant_enabled Described above.

  • source The ID of another application owned by the developer to be used as a template for the new application. If provided, values for all other optional fields will be populated from this existing application. In addition, any OAuth keys owned by the application will be copied over to be used by the new application.

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -d '{"name": "Test App 1", "description": "A test application."}' \
    'https://api.kloudless.com/v1/meta/applications/'

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -d '{"name": "Test App 2", "source": "wSPk9y5D7p5o87k0ACGKxR"}' \
    'https://api.kloudless.com/v1/meta/applications/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "name": "Test App 1",
      "description": "A test application."
    }
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "id": "osM_FF6fIWXmCLDfWVRX",
        "name": "Test App 2",
        "description": "A test application.",
        "logo_url": "",
        "active": true,
        "internal_use": false,
        "implicit_grant_enabled": false,
        "recent_enabled": false,
        "events_enabled": false,
        "created": "2015-06-01T03:57:16.770685Z",
        "modified": "2015-06-01T03:57:16.770685Z",
        "type": "application",
        "api": "meta",
    }

Retrieve an Application 

retrieve an applicationGET /meta/applications/{application_id}/

Retrieve information about an individual application.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "id": "wSPk9y5D7p5o87k0ACGKxR",
        "name": "Test App 2",
        "description": "A test application.",
        "logo_url": "",
        "active": true,
        "internal_use": false,
        "implicit_grant_enabled": false,
        "recent_enabled": false,
        "events_enabled": false,
        "created": "2015-06-01T03:57:16.770685Z",
        "modified": "2015-06-01T03:57:16.770685Z",
        "type": "application",
        "api": "meta",
    }

Update an Application 

Update an ApplicationPATCH /meta/applications/{application_id}

Here are the properties that can be updated:

  • name

  • description

  • logo_url

  • active

  • implicit_grant_enabled

  • recent_enabled

  • events_enabled

The new object will be returned on success.

The source parameter can not be used in an update.

Example request:

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{"description": "A better test application."}' \
    'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR'

Setting an application to inactive will:

  • not permit any API requests to its accounts

  • cease activity data collection for all its accounts

Tokens will continue to be refreshed to maintain connectivity for accounts connected to inactive applications.

  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "description": "A better test application."
    }
  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "id": "wSPk9y5D7p5o87k0ACGKxR",
        "name": "Test App 1",
        "description": "A better test application.",
        "logo_url": "",
        "active": true,
        "internal_use": false,
        "implicit_grant_enabled": false,
        "recent_enabled": false,
        "events_enabled": false,
        "created": "2015-06-01T03:57:16.770685Z",
        "modified": "2015-06-01T08:10:20.128361Z",
        "type": "application",
        "api": "meta",
    }

Delete an Application 

Delete an ApplicationDELETE /meta/applications/{application_id}

Example request:

curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR'
  • Response  204

API Keys 

Kloudless API key objects have the following attributes:

  • key The API key. This is unique across all applications.

  • created An ISO 8601 timestamp indicating when the API key object was created.

  • modified An ISO 8601 timestamp indicating when the API key object was last modified.

  • type Always apikey.

  • api Always meta.

List API Keys 

list api keysGET /meta/applications/{application_id}/apikeys{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of API key objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "total": 1,
        "count": 1,
        "page": 1,
        "objects": [
            {
                "key": "80OdF5hXzkNqEs9DHRkiA1EXz1pbF4",
                "created": "2014-03-18T03:57:16.770685Z",
                "modified": "2014-03-18T03:57:16.770685Z",
                "type": "apikey",
                "api": "meta",
            }
        ],
        "type": "object_list",
        "api": "meta"
    }

Create an API Key 

create an api keyPOST /meta/applications/{application_id}/apikeys

API keys can be created to allow access to other Kloudless APIs.

The body of the request is empty.

curl -XPOST -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/apikeys/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "key": "80OdF5hXzkNqEs9DHRkiA1EXz1pbF4",
        "created": "2014-03-18T03:57:16.770685Z",
        "modified": "2014-03-18T03:57:16.770685Z",
        "type": "apikey",
        "api": "meta",
    }

Delete an API Key 

Delete an API KeyDELETE /meta/applications/{application_id}/apikeys/{apikey_key}

The following example request deletes an API key:

curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR/apikeys/80OdF5hXzkNqEs9DHRkiA1EXz1pbF4'
  • Response  204

Client Secrets 

Kloudless client secret object have the following attributes:

  • secret The client secret. This is unique across all applications.

  • created An ISO 8601 timestamp indicating when the client secret object was created.

  • modified An ISO 8601 timestamp indicating when the client secret object was last modified.

  • type Always client_secret.

  • api Always meta.

List Client Secrets 

list client secretsGET /meta/applications/{application_id}/client_secrets{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of client secret objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "total": 1,
        "count": 1,
        "page": 1,
        "objects": [
            {
                "secret": "T4BbIkrF5zghPBqo7oH6mmth",
                "created": "2014-03-18T03:57:16.770685Z",
                "modified": "2014-03-18T03:57:16.770685Z",
                "type": "client_secret",
                "api": "meta",
            }
        ],
        "type": "object_list",
        "api": "meta"
    }

Create a Client Secret 

create a client secretPOST /meta/applications/{application_id}/client_secrets

Client secrets can be created to impersonate the app during the OAuth 2.0 Authorization Code Grant flow.

The body of the request is empty.

Example request:

curl -XPOST -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/client_secrets/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "secret": "T4BbIkrF5zghPBqo7oH6mmth",
        "created": "2014-03-18T03:57:16.770685Z",
        "modified": "2014-03-18T03:57:16.770685Z",
        "type": "client_secret",
        "api": "meta",
    }

Delete a Client Secret 

delete a client secretDELETE /meta/applications/{application_id}/client_secrets/{secret}

The following example request deletes a client secret:

curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR/client_secrets/T4BbIkrF5zghPBqo7oH6mmth'
  • Response  204

Trusted Domains 

UI Tools such as the Authenticator and File Picker JS libraries allow users to connect accounts. Bearer tokens for accounts connected can be returned to your application’s web page in the event callback if the domain of the web page is a trusted domain. This allows subsequent API requests to be made from the web page using the bearer tokens.

Kloudless trusted domain objects have the following attributes:

  • id The id of the trusted domain. This is unique across all applications.

  • domain The trusted domain itself. Wildcards are permitted for subdomain names. A domain of the form *.domain.com will trust all subdomains, such as x.domain.com and y.x.domain.com but not domain.com itself.

  • created An ISO 8601 timestamp indicating when the trusted domain object was created.

  • modified An ISO 8601 timestamp indicating when the trusted domain object was modified.

  • type Always trusted_domain.

  • api Always meta.

List Trusted Domains 

list trusted domainsGET /meta/applications/{application_id}/trusted_domains{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of trusted domain objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
        "total": 1,
        "count": 1,
        "page": 1,
        "objects": [
            {
                "id": "1",
                "domain": "*.my-domain.com",
                "created": "2017-07-25T05:37:50.663920Z",
                "modified": "2017-07-25T05:37:50.663944Z",
                "type": "trusted_domain",
                "api": "meta",
            }
        ],
        "type": "object_list",
        "api": "meta"
    }

Create a Trusted Domain 

create a trusted domainPOST /meta/applications/{application_id}/trusted_domains

The required parameters are:

  • domain Described above.
curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -XPOST -d '{"domain": "*.my-domain.com"}' \
    'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/trusted_domains/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "domain": "*.my-domain.com"
    }
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
           "id": "1",
           "domain": "*.my-domain.com",
           "created": "2017-07-25T05:37:50.663920Z",
           "modified": "2017-07-25T05:37:50.663944Z",
           "type": "trusted_domain",
           "api": "meta",
       }

Retrieve a Trusted Domain 

retrieve a trusted domainGET /meta/applications/{application_id}/trusted_domains/{id}

Retrieve information about a trusted domain.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
           "id": "1",
           "domain": "*.my-domain.com",
           "created": "2017-07-25T05:37:50.663920Z",
           "modified": "2017-07-25T05:37:50.663944Z",
           "type": "trusted_domain",
           "api": "meta",
      }

Delete a Trusted Domain 

delete a trusted domainDELETE /meta/applications/{application_id}/trusted_domains/{id}
curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR/trusted_domains/1'
  • Response  204

Webhooks 

Kloudless webhook objects have the attributes below:

  • id The webhook ID. This is unique across all applications.

  • url The webhook URL. See the Activity API docs for more information.

  • created An ISO 8601 timestamp indicating when the webhook object was created.

  • modified An ISO 8601 timestamp indicating when the webhook object was last modified.

  • type Always webhook.

  • api Always meta.

  • body_format This indicates the content type of the webhook request’s body. Here are the supported values:

    • json (default): The Content-Type will be application/json.
    • form: This is a legacy format for Webhooks created prior to Sept 2019. The content type will be application/x-www-form-urlencoded.
    • eventbridge: This indicates an Amazon EventBridge endpoint.
  • extra A read-only JSON object with additional data about the webhook.

List Webhooks 

list webhooksGET /meta/applications/{application_id}/webhooks{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of webhook objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "page": 1,
      "objects": [
        {
          "id": "100",
          "url": "http://localhost:5000",
          "body_format": "json",
          "created": "2015-08-10T03:34:28.273777Z",
          "modified": "2015-08-10T03:34:28.273804Z",
          "extra": {},
          "type": "webhook",
          "api": "meta",
        }
      ],
      "type": "object_list",
      "api": "meta"
    }

Create a Webhook 

create a webhookPOST /meta/applications/{application_id}/webhooks

You can create webhooks to receive notifications from Kloudless about activity occurring in accounts connected to your app. See the Activity API docs for more information.

Here are the required parameters:

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -XPOST -d '{"url": "http://localhost:5000"}' \
    'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/webhooks'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "url": "http://localhost:5000"
    }
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
           "id": "100",
           "url": "http://localhost:5000",
           "body_format": "json",
           "created": "2015-08-10T03:34:28.273777Z",
           "modified": "2015-08-10T03:34:28.273804Z",
           "extra": {},
           "type": "webhook",
           "api": "meta",
       }

Retrieve a Webhook 

retrieve a webhookGET /meta/applications/{application_id}/webhooks/{id}

Retrieve information about a webhook.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
          "id": "100",
          "url": "http://localhost:5000",
          "body_format": "json",
          "created": "2015-08-10T04:53:50.185879Z",
          "modified": "2015-08-10T04:53:50.185879Z",
          "extra": {},
          "type": "webhook",
          "api": "meta",
       }

Delete a Webhook 

delete a webhookDELETE /meta/applications/{application_id}/webhooks/{id}

The following example request shows how to delete a webhook:

curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR/webhooks/100'
  • Response  204

Service Keys 

Kloudless service keys are used when configuring OAuth credentials to authenticate users connecting a certain account. They have the attributes below:

  • id Unique identifier for this service key.

  • application ID of the Kloudless Application that this key is configured for.

  • service_name Human-friendly name of the service this key is for. e.g. Google Drive.

  • service The key’s service identifier. e.g. gdrive.

  • key Service key ID. Usually the OAuth client ID.

  • secret Service key secret. This attribute is write-only. Usually corresponds to the OAuth client secret.

  • secondary_key Secondary key for the service. Purpose varies by service, but is usually a secondary OAuth client ID if needed.

  • secondary_secret Secret for the secondary key. This attribute is write-only. Corresponds to an OAuth client secret if needed, although its purpose varies by service.

  • secondary_id The secondary ID. Purpose varies by service.

  • resource Set an optional domain here to ensure that this service key is only used when authenticating accounts connecting to this domain. End-users must first see a preliminary authentication screen prompting them to enter their email address for this to take effect.

  • deactivation An ISO 8601 timestamp indicating when the service key is deactivated.

  • admin Flag indicating whether this is an admin service key. Defaults to false.

  • created An ISO 8601 timestamp indicating when the object was created.

  • modified An ISO 8601 timestamp indicating when the object was last modified.

  • type Always service_key.

  • api Always meta.

List Service Keys 

List Service KeysGET /meta/applications/{application_id}/service_keys/{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of application objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "page": 1,
      "objects": [
        {
          "id": 4,
          "application": "koiR71rFLPTdld9N-YUR",
          "service": "evernote",
          "key": "88",
          "created": "2017-10-05T07:49:08.140717Z",
          "modified": "2017-10-05T07:49:08.140736Z",
          "admin": false,
          "secondary_key": "",
          "secondary_id": "",
          "resource": "",
          "deactivation": "9999-12-31T23:59:59.999999Z",
          "service_name": "Evernote",
          "api": "meta",
          "type": "service_key"
        }
      ],
      "type": "object_list",
      "api": "meta"
    }

Create a Service Key 

Create a Service KeyPOST /meta/applications/{application_id}/service_keys/

The required parameters are:

  • service Described above.

In addition, the following optional parameters may be provided:

  • key Described above.

  • secret Described above.

  • resource Described above.

  • secondary_id Described above.

  • secondary_key Described above.

  • secondary_secret Described above.

  • admin Described above.

Example request:

curl -X POST \
     -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' -d '{ \
   "service": "gdrive", \
   "key": "test-key" \
 }' 'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/service_keys/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "service": "gdrive",
      "key": "test-key"
    }
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 10,
      "application": "wSPk9y5D7p5o87k0ACGKxR",
      "service": "gdrive",
      "key": "test-key",
      "created": "2017-12-22T18:54:51.873276Z",
      "modified": "2017-12-22T18:54:51.873298Z",
      "admin": false,
      "secondary_key": "",
      "secondary_id": "",
      "resource": "",
      "deactivation": "9999-12-31T23:59:59.999999Z",
      "service_name": "Google Drive",
      "api": "meta",
      "type": "service_key"
    }

Retrieve a Service Key 

Retrieve a Service KeyGET /meta/applications/{application_id}/service_keys/{id}/

Retrieve information about a service key.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 10,
      "application": "wSPk9y5D7p5o87k0ACGKxR",
      "service": "gdrive",
      "key": "test-key",
      "created": "2017-12-22T18:54:51.873276Z",
      "modified": "2017-12-22T18:54:51.873298Z",
      "admin": false,
      "secondary_key": "",
      "secondary_id": "",
      "resource": "",
      "deactivation": "9999-12-31T23:59:59.999999Z",
      "service_name": "Google Drive",
      "api": "meta",
      "type": "service_key"
    }

Update a Service Key 

Update a Service KeyPATCH /meta/applications/{application_id}/service_keys/{id}/

Here are the properties that can be updated:

  • service

  • key

  • secret

  • resource

  • secondary_id

  • secondary_secret

  • secondary_key

  • admin

The new object will be returned on success.

Example request:

curl -X PATCH \
     -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
     -H 'Content-Type: application/json' \
     -d '{"key": "new key"}' \
     'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/service_keys/10/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "key": "new key"
    }
  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 10,
      "application": "koiR71rFLPTdld9N-YUR",
      "service": "gdrive",
      "key": "new key",
      "created": "2017-12-22T18:54:51.873276Z",
      "modified": "2017-12-22T19:44:01.152707Z",
      "admin": false,
      "secondary_key": "",
      "secondary_id": "",
      "resource": "",
      "deactivation": "9999-12-31T23:59:59.999999Z",
      "service_name": "Google Drive",
      "api": "meta",
      "type": "service_key"
    }

Delete a Service Key 

Delete a Service KeyDELETE /meta/applications/{application_id}/service_keys/{id}/

Example request:

curl -XDELETE \
    -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR/service_keys/10/'
  • Response  204

Redirect URIs 

Kloudless Redirect URIs have the attributes below:

  • id Unique identifier for this Redirect URI.

  • application Kloudless Application ID.

  • uri Redirect URL.

  • created An ISO 8601 timestamp indicating when the object was created.

  • modified An ISO 8601 timestamp indicating when the object was last modified.

  • type Always redirect_uri.

  • api Always meta.

List Redirect URIs 

List Redirect URIsGET /meta/applications/{application_id}/redirect_uris/{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of application objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "page": 1,
      "objects": [
        {
          "id": 4,
          "application": "wSPk9y5D7p5o87k0ACGKxR",
          "uri": "root",
          "created": "2017-12-14T08:29:45.909414Z",
          "modified": "2017-12-14T08:29:45.909444Z",
          "api": "meta",
          "type": "redirect_uri"
        }
      ],
      "type": "object_list",
      "api": "meta"
    }

Create a Redirect URI 

Create a Redirect URIPOST /meta/applications/{application_id}/redirect_uris/

The required parameter is:

curl -X POST \
   -H 'Content-Type: application/json' \
   -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
   -d '{"uri": "root"}' \
   'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/redirect_uris/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
        "uri": "root",
    }
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 6,
      "application": "wSPk9y5D7p5o87k0ACGKxR",
      "uri": "root",
      "created": "2017-12-22T07:58:03.429613Z",
      "modified": "2017-12-22T07:58:03.429642Z",
      "api": "meta",
      "type": "redirect_uri"
    }

Retrieve a Redirect URI 

Retrieve a Redirect URIGET /meta/applications/{application_id}/redirect_uris/{id}/

Retrieve information about a redirect URI.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 6,
      "application": "wSPk9y5D7p5o87k0ACGKxR",
      "uri": "root",
      "created": "2017-12-22T07:58:03.429613Z",
      "modified": "2017-12-22T07:58:03.429642Z",
      "api": "meta",
      "type": "redirect_uri"
    }

Delete a Redirect URI 

Delete a Redirect URIDELETE /meta/applications/{application_id}/redirect_uris/{id}/

Example request:

curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR/redirect_uris/3/'
  • Response  204

File Picker Upload Locations 

Kloudless File Picker upload locations (or FE upload locations) have the attributes below:

  • id Unique identifier for the FE upload location.

  • application Kloudless Application ID.

  • account ID of the Kloudless account object accessed by the API request.

  • folder_id ID of the folder.

  • folder_name Name of the folder.

  • allow_overwrites Default to false. If true, user-uploaded content will be overwritten if an uploaded file has the same name. By default, the new file is renamed if an existing file with an identical name exists in the folder that the new file is being uploaded to. Do not set this to true unless a specific sub-folder is being specified, or you deliberately want to overwrite content with the same name regardless of origin.

  • allow_specific_subfolder Defaults to false. If true, the File Picker can be configured to upload files to either the root folder or any specified sub-folder. By default, files will be uploaded to a randomly named sub-folder in the upload location to ensure uniqueness. The File Picker’s upload_location_folder configuration option should contain the ID of the folder; this folder can either be the configured upload location or any of its sub-folders.

    If setting this attribute to true, ensure users only have access to IDs of folders their content should be uploaded to in order to prevent malicious users could upload content to unexpected folders.

  • created An ISO 8601 timestamp indicating when the FE upload location object was created.

  • modified An ISO 8601 timestamp indicating when the FE upload location object was last modified.

  • type Always fe_upload_location.

  • api Always meta.

List File Picker Upload Locations 

List File Picker Upload LocationsGET /meta/applications/{application_id}/fe_upload_locations/{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of FE upload location objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "page": 1,
      "objects": [
        {
          "id": 2,
          "application": "T7W_5x_2O7k_P499EjPYL4rJ4VXS_K0JYBwpZKYGF3FEnjDB",
          "account": "12933",
          "folder_id": "folder_id_1",
          "folder_name": "folder_name 1",
          "allow_overwrites": false,
          "allow_specific_subfolder": false,
          "created": "2017-12-21T14:15:27.036803Z",
          "modified": "2017-12-21T14:15:27.036833Z",
          "api": "meta",
          "type": "fe_upload_location"
        }
      ],
      "type": "object_list",
      "api": "meta"
    }

Create a File Picker Upload Location 

Create a File Picker Upload LocationPOST /meta/applications/{application_id}/fe_upload_locations/

The required parameters are:

  • account Described above.

  • folder_id Described above.

  • folder_name Described above.

In addition, the following optional parameters may be provided:

  • allow_specific_subfolder Described above.

  • allow_overwrites Described above.

curl -X POST \
   -H 'Content-Type: application/json' \
   -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' -d '{ \
   "account": "12933", \
   "allow_specific_subfolder": true, \
   "allow_overwrites": true, \
   "folder_id": "root", \
   "folder_name": "Test Folder Name" \
 }' 'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/fe_upload_locations/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "account": "12933",
      "allow_specific_subfolder": true,
      "allow_overwrites": true,
      "folder_id": "root",
      "folder_name": "Test Folder Name"
    }
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 5,
      "application": "wSPk9y5D7p5o87k0ACGKxR",
      "account": "12933",
      "folder_id": "root",
      "folder_name": "Test Folder Name",
      "allow_overwrites": true,
      "allow_specific_subfolder": true,
      "created": "2017-12-21T14:59:43.996480Z",
      "modified": "2017-12-21T14:59:43.996506Z",
      "type": "fe_upload_location",
      "api": "meta"
    }

Retrieve a File Picker Upload Location 

Retrieve a File Picker Upload LocationGET /meta/applications/{application_id}/fe_upload_locations/{id}/

Retrieve information about a File Picker upload location.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 5,
      "application": "wSPk9y5D7p5o87k0ACGKxR",
      "account": "12933",
      "folder_id": "root",
      "folder_name": "Test Folder Name",
      "allow_overwrites": true,
      "allow_specific_subfolder": true,
      "created": "2017-12-21T14:59:43.996480Z",
      "modified": "2017-12-21T14:59:43.996506Z",
      "api": "meta",
      "type": "fe_upload_location"
    }

Update a File Picker Upload Location 

Update a File Picker Upload LocationPATCH /meta/applications/{application_id}/fe_upload_locations/{id}/

Here are the properties that can be updated:

  • account

  • folder_id

  • folder_name

  • allow_specific_subfolder

  • allow_overwrites

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{"folder_name": "Test Folder Name 2"}' \
    'https://api.kloudless.com/v1/meta/applications/wSPk9y5D7p5o87k0ACGKxR/fe_upload_locations/5/'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "folder_name": "Test Folder Name 2"
    }
  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "id": 5,
      "application": "wSPk9y5D7p5o87k0ACGKxR",
      "account": "12933",
      "folder_id": "root",
      "folder_name": "Test Folder Name 2",
      "allow_overwrites": true,
      "allow_specific_subfolder": true,
      "created": "2017-12-21T14:59:43.996480Z",
      "modified": "2017-12-21T15:12:41.936672Z",
      "api": "meta",
      "type": "fe_upload_location"
    }

Delete a File Picker Upload Location 

Delete a File Picker Upload LocationDELETE /meta/applications/{application_id}/fe_upload_locations/{id}/

Example request:

curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/applications/koiR71rFLPTdld9N-YUR/fe_upload_locations/3/'
  • Response  204

Usage Reports 

Kloudless usage reports can be retrieved via this endpoint. Each object describes the application’s API request statistics during a certain time period beginning at from (inclusive) and ending at until (exclusive): [from, until). A usage report object has the following attributes:

  • application Kloudless application ID.

  • from An ISO 8601 timestamp indicating the start of the time period (inclusive) this record contains information on.

  • until An ISO 8601 timestamp indicating the end of the time period (exclusive) this record contains information on.

  • bandwidth Bandwidth consumed by the application during the time period specified by from and until.

  • active_accounts Number of accounts accessed by the application during the specified time period.

  • requests Number of API requests processed by the application during the specified time period.

  • created An ISO 8601 timestamp indicating when the usage report record was created.

  • type Always usage_report.

  • api Always meta.

List Usage Reports 

list usage reportsGET /meta/applications/{application_id}/usage_reports/{?from,until,page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of usage report objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • from
    string (optional) 

    An ISO 8601 timestamp. Only usage reports representing periods ending at or after this time will be returned.

    until
    string (optional) 

    An ISO 8601 timestamp. Only usage reports representing periods beginning before this time will be returned.

    page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "page": 1,
      "objects": [
        {
          "id": 4732,
          "application": "7J689s6Q6CQ2TVXfH5nfBJTEkWVUXbRQhUoDNiwEmi7WSsxq",
          "from": "2017-01-01T00:00:00Z",
          "until": "2017-01-02T00:00:00Z",
          "bandwidth": 1000000,
          "active_accounts": 69,
          "requests": 1043,
          "created": "2017-01-02T12:50:35.453230Z",
          "api": "meta",
          "type": "usage_report"
        }
      ],
      "type": "object_list",
      "api": "meta"
    }

Invoices 

An invoice object represents an invoice received frmo Kloudlessa and has the following attributes:

  • created An ISO 8601 timestamp indicating when the invoice was created.

  • amount Total amount of the invoice in USD.

  • description The invoice’s description.

  • status The invoice’s status, one of paid or unpaid.

  • pdf_url A URL to download a PDF representation of the invoice from.

  • url A URL to a web page with invoice details and an option to pay the invoice.

  • type Always invoice.

  • api Always meta.

List Invoices 

list invoicesGET /meta/invoices/{?page_size,page}

The response contains the following information:

  • objects List of invoice objects.

  • count Number of objects on this page.

  • page Current page identifier.

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • previous_page The value to provide in the request’s page query parameter for the previous page. This will be null if there are no prior pages.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 100.

    page
    string (optional) 

    Identifier of the page to return. If unspecified, the first page is returned and the previous_page property of the response will be null. The next_page property contains the identifier for the next page of invoices. The next_page or previous_page identifiers can be passed into the page parameter of subsequent API requests to retrieve the next or previous page of invoices, respectively.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "objects": [
        {
          "created": "2018-11-13T07:22:14Z",
          "amount": 1000,
          "description": "Developer: Oct, 2018",
          "status": "paid",
          "pdf_url": "https://pay.stripe.com/invoice/invst_test_url/pdf",
          "url": "https://pay.stripe.com/invoice/invst_test_url",
          "api": "meta",
          "type": "invoice"
        }
      ],
      "count": 1,
      "page": null,
      "next_page": "cD1pbl8xRFZ3RHhBSjM3N2J5dHU0eU1KZEhvSFA=",
      "previous_page": null,
      "type": "object_list",
      "api": "meta"
    }

API Request Analytics 

Each API request analytics object contains information describing an API request and has the following attributes:

  • application Kloudless application ID.

  • account ID of the Kloudless account accessed by the API request.

  • duration Duration of the API request in seconds.

  • ip IP address the API request originated from.

  • method HTTP method used in the API request.

  • path Path component of the URL accessed.

  • query Query component of the URL accessed.

  • request_id Unique ID of the API request.

  • rx_bytes Bytes in the HTTP request received by the Kloudless server.

  • tx_bytes Bytes in the HTTP response sent by the Kloudless server.

  • start_time An ISO 8601 timestamp indicating when the API request started.

  • created An ISO 8601 timestamp indicating when the analytics object for the request was recorded.

  • status HTTP response status code.

  • type Always analytics_api_request.

  • api Always meta.

List API Request Analytics 

list api request analyticsGET /meta/analytics/requests/{?application,until,from,page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of API request analytics objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • application
    string (optional) 

    Specify the ID of the application to retrieve API requests for. The currently authorized developer must be the owner of application. If application is not specified, request analytics from all applications owned by the currently authorized developer will be returned.

    from
    string (optional) 

    An ISO 8601 timestamp. Only information on API requests with a created timestamp at or after this time will be returned.

    until
    string (optional) 

    An ISO 8601 timestamp. Only information on API requests with a created timestamp before this time will be returned.

    page_size
    number (optional) Default: 100 

    The number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    The page to return. page_size number of objects will be returned on each page. By default, the first page is returned. The page parameter can be used to request additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "page": 1,
      "objects": [
        {
          "created": "2017-11-16T12:06:45.203391787Z",
          "application": "WA5IgJ3b_REULZOWR9NJeOYBg5NQm_i1CnEK7fVBvf2EOyhW",
          "account": 12389,
          "duration": 72.448015213,
          "method": "GET",
          "path": "/v1/accounts/",
          "query": "",
          "ip": "203.0.113.81",
          "request_id": "bc872beb-a266-4d22-afc9-a7174a745097",
          "rx_bytes": 0,
          "start_time": "2017-11-16T12:04:51.580000Z",
          "tx_bytes": 436,
          "status": 200,
          "api": "meta",
          "type": "analytics_api_request"
        }
      ],
      "type": "object_list",
      "api": "meta"
    }

Licenses 

Kloudless License objects represent individual licenses used to run Kloudless Enterprise Docker containers and virtual machines.

Kloudless Licenses have the following attributes:

  • id The license identifier. This is unique across all applications.

  • org_id The organization identifier. This is unique across all applications.

  • org_name The organization name. This is the human-readable name of the organization that owns this license.

  • description A description of the license.

  • release Kloudless Enterprise release channel, e.g., prod for production releases and test for QA releases.

  • active A boolean value indicating whether this license is active.

  • expiry An ISO 8601 timestamp indicating when the license expires.

  • scope A string delimited by whitespaces listing the scopes of this license.

  • apis_available A list of the Kloudless unified APIs available.

  • services_available A list of third-party service IDs corresponding to connectors supported by this license. An empty list implies that all services are supported.

  • support_clustering A boolean value indicating whether clustering is supported.

  • created An ISO 8601 timestamp indicating when the license was created.

  • modified An ISO 8601 timestamp indicating when the license was last updated.

  • type Always license.

  • api Always meta.

List Licenses 

list licensesGET /meta/licenses{?page_size,page}

The response contains the following information:

  • total Total number of objects.

  • count Number of objects on this page.

  • page Page number.

  • objects List of license objects.

  • type Always object_list.

  • api Always meta.

  • Parameters
  • page_size
    number (optional) Default: 100 

    Number of objects in each page. The page_size must be between 1 and 1000.

    page
    number (optional) 

    Page to return. By default, only the first page is returned, containing page_size objects. Specify a value for page to retrieve additional objects.

    page must be greater than 0.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
      "total": 1,
      "count": 1,
      "page": 1,
      "objects": [
          {
              "id": "1",
              "description": "",
              "release": "prod",
              "major_version": 1,
              "active": true,
              "expiry": "2018-10-04T00:00:00Z",
              "apis_available": [
                "storage",
                "events"
              ],
              "services_available": [
                "gdrive"
              ],
              "scope": "gdrive:normal.storage.default:kloudless
                        gdrive:admin.storage.default:kloudless
                        gdrive:normal.events.default:kloudless
                        gdrive:admin.events.default:kloudless",
              "support_clustering": false,
              "created": "2017-10-04T03:03:46.779451Z",
              "modified": "2017-10-04T03:28:44.947599Z",
              "api": "meta",
              "type": "license"
          }
      ],
      "type": "object_list",
      "api": "meta"
    }

Create a License 

create a licensePOST /meta/licenses

Licenses can be added to your organization, however, not all of the fields can be specified and configured. Therefore, Kloudless allows you to create a license by using an existing one as a template. The existing license’s field values will be used to generate the new license.

Here are the required parameters:

  • id Identifier of the license to be copied.

  • description License description.

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' -X POST \
    -d '{"id": 1, "description": "New license for kloudless development."}' \
    'https://api.kloudless.com/v1/meta/licenses'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "id": 1,
      "description": "New license for kloudless development."
    }
  • Response  201Toggle
  • Headers

    Content-Type: application/json

    Body

    {
           "id": "5",
           "description": "New license for kloudless development.",
           "release": "prod",
           "active": true,
           "expiry": "2020-01-30T00:00:00Z",
           "apis_available": [
               "storage",
               "events"
           ],
           "services_available": [
               "gdrive",
           ],
           "support_clustering": false,
           "created": "2019-01-30T13:40:35.747196Z",
           "modified": "2019-01-30T13:40:35.747221Z",
           "api": "meta",
           "type": "license",
           "scope": "any:normal.basic",
           "admin_available": false,
           "events_available": true
       }

Retrieve a License 

retrieve a licenseGET /meta/licenses/{id}

Retrieve information about a license.

  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
          "id": "1",
          "description": "",
          "release": "prod",
          "major_version": 1,
          "active": true,
          "expiry": "2018-10-04T00:00:00Z",
          "apis_available": [
            "storage",
            "events"
          ],
          "services_available": [
            "gdrive"
          ],
          "scope": "gdrive:normal.storage.default:kloudless
                    gdrive:admin.storage.default:kloudless
                    gdrive:normal.events.default:kloudless
                    gdrive:admin.events.default:kloudless",
          "support_clustering": false,
          "created": "2017-10-14T03:03:46.779451Z",
          "modified": "2017-10-14T03:28:44.947599Z",
          "type": "license",
          "api": "meta",
       }

Download a License 

get binary file contentGET /meta/licenses/{id}/contents

This is a direct download of the encrypted license.

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    'https://api.kloudless.com/v1/meta/licenses/1/contents'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
  • Response  200Toggle
  • Headers

    Content-Type: [mimetype]

    Body

    [license data binary]
    

Update a License 

Update a LicensePATCH /meta/licenses/{id}

Update information about a license given a license ID. Only licenses belonging to the currently authorized developer’s organization can be updated.

Here are the properties that can be updated:

  • description

The new object will be returned if successful.

Example request:

curl -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{"description": "New license description."}' \
    'https://api.kloudless.com/v1/meta/licenses/4'
  • RequestToggle
  • Headers

    Authorization: Bearer [TOKEN]
    Content-Type: application/json

    Body

    {
      "description": "New license description."
    }
  • Response  200Toggle
  • Headers

    Content-Type: application/json

    Body

    {
           "id": "4",
           "description": "New license description.",
           "release": "prod",
           "active": true,
           "expiry": "2020-01-30T00:00:00Z",
           "apis_available": [
               "storage",
               "events"
           ],
           "services_available": [
               "gdrive",
           ],
           "support_clustering": false,
           "created": "2019-01-30T13:40:35.747196Z",
           "modified": "2019-01-30T13:40:35.747221Z",
           "api": "meta",
           "type": "license",
           "scope": "any:normal.basic",
           "admin_available": false,
           "events_available": true
       }

Delete a License 

delete a licenseDELETE /meta/licenses/{id}

The following example request shows how to delete a license:

curl -L -H 'Authorization: Bearer S4i5EG5ViEAVmMaCilB5' \
    -XDELETE 'https://api.kloudless.com/v1/meta/licenses/1'
  • Response  204

Other Information 

For more information such as error codes, SDKs and support, please refer to the Core API docs.