Access

Request a temporary and unique user access token.

POST https://sub-domain.cloudtables.io/api/1/access
curl \
	-d 'key={apiKey}' \
	https://sub-domain.cloudtables.io/api/1/access

Get an access token that can be used to securely embed a CloudTable into an HTML page. Please see the embedding documentation for details on how to make use of the retrieved token to embed the CloudTable into a page.

Query parameters

  • N/A

Body parameters

  • clientId string Recommended
    A unique id for the client accessing the table on your system. While this is optional it is a recommended parameter as it is useful for tracking requests in CloudTables' analytics.
  • clientName string Recommended
    A label that can help identify a user - e.g. a name or e-mail address. Typically the clientId will be an integer or UUID which mean you'd need to look up the user to understand who made what changes. Note that while the clientId should be unique per client and not change - the clientName can change and will be updated to reflect the latest value given (e.g. if a user modifies their name in your own system).
  • conditions array/object
    Conditions to apply to the accessed data. Only data meeting the requirements will be returned. Please see the conditional data access documentation for full details.
  • key string Required Header
    The API key which will allow access (and thus assign the roles that can be used for access). Note that this option can be also be provided as an HTTP header (also with the name key).
  • role string
    The name of the role that should be used for access (if assigned to the API key - if the role is not available for the API key no access will be granted). If not provided then all roles available to the API key will be used.
  • roles string[]
    Similar to role but allows multiple roles to be specified.

Result

The JSON result from the server will contain a token property which holds the value of the access token that should be used to securely embed the data set into a page.

{
	"token": string  // Access token
}

Example

The following is an example of a successful request for an access token:

{
	"token": "fBy2y7Bwuc4huKV81vMhcRB4XrLkpzQU".
	"success": true
}