CloudTablesApi
constructor
CloudTablesApi(key: string, subdomain: string, options?: Dictionary)
Creates a new instance of the CloudTables API libraries.
Parameters
- subdomain string Required
The application sub-domain for your CloudTables (i.e. the part before .cloudtables.com
).
- key string Required
The API key to be used
- options Dictionary Optional
Object of optional parameters
- clientId string
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 object | object[]
Condition(s) to apply to data being fetched. Please see the embedding conditions documentation for full details. Requires cloudtables-api
1.1 or newer.
- duration number
Access token’s idle time out (defaults to 20 minutes).
- roles string[]
The name of the role that should be used for the generated access token (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.
- role string
Per secure
but for a single role only.
- ssl boolean
Enable (true), or disable (false) SSL / HTTPS
Returns
CloudTablesApi
instance.
Example
api = CloudTablesApi(':apiKey', subdomain='sub-domain', options={'clientName': 'John'});