Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
2670 lines (2070 sloc) 74 KB
FORMAT: 1A
HOST: https://syrup.keboola.com/gooddata-writer/v2/
# Keboola GoodDataWriter API v2
Intermediary of communication between Keboola Storage API and GoodData API.
**This is new version of the API and is built step by step. Missing functionality
is still available in the old API here: http://docs.keboolagooddatawriter.apiary.io**
## HTTP Response Codes
The response from Storage API will have an HTTP status code that will help you
determine if the request was successful. In case of error HTTP status code will
help you determine the cause of the error.
### Success responses
<table>
<tr>
<td>200</td>
<td><code>OK</code></td>
<td>The request was successful.</td>
</tr>
<tr>
<td>201</td>
<td><code>Created</code></td>
<td>The request was successful and a new resource was created.</td>
</tr>
<tr>
<td>202</td>
<td><code>Accepted</code></td>
<td>Asynchrnous task. Job resource is returned.</td>
</tr>
<tr>
<td>204</td>
<td><code>No Content</code></td>
<td>The request was successful but there is nothing to return. Usually response of DELETE requests.</td>
</tr>
</table>
### Error responses
<table>
<tr>
<td>400</td>
<td><code>Bad Request</code></td>
<td>The request was invalid. Usually caused by invalid input data (missing arguments, invalid arguments values, etc.). Cause of error is described in response.</td>
</tr>
<tr>
<td>401</td>
<td><code>Unauthorized</code></td>
<td>Authentication failed.</td>
</tr>
<tr>
<td>403</td>
<td><code>Forbidden</code></td>
<td>You don't have access to resource.</td>
</tr>
<tr>
<td>404</td>
<td><code>Not Found</code></td>
<td>You're asking for something that doesn't exist.</td>
</tr>
<tr>
<td>500</td>
<td><code>Internal Server Error</code></td>
<td>Something went wrong. We are sorry, it is our fault and we will make our best to fix it!</td>
</tr>
<tr>
<td>503</td>
<td><code>Temporary Unavailable</code></td>
<td>This response is typically returned when system is under maintenance.
Maintenance reason and expected maintenance ent time are also returned in response.
</td>
</tr>
</table>
## Authentication
Storage API token provided to you by Keboola has to be sent in "X-StorageApi-Token" HTTP header with each api call.
**The token must have access to component 'gooddata-writer'.**
## Synchronous vs. Asynchronous Tasks
Tasks that are all potentially long-running actions such as all GoodData tasks
(e.g. loading data, updating model) are performed asynchronously. All asynchronous
tasks returns HTTP Response code `202` and [Job Resource](#jobs). You can monitor
job status by polling job Resource URL.
All asynchronous tasks are put to primary queue by default but you can force them
to be put in secondary queue using parameter `queue` with value `secondary`. The
parameter is accepted in all API calls generating asynchronous task.
## GoodData Maintenance
GoodData platform has regular planned maintenace usually every Saturday morning
(UTC) which lasts several hours. GoodData Writer can mostly deal with it by
waiting and postpoing jobs execution until the maintenance ends. Although it is
possible that some tasks fail because GoodData cannot guarantee their successful
finish and the only possible solution is their manual restart. Also some Writer
API calls return 503 HTTP response during this period and you have to retry the
call later.
## Configuration in Storage API
The app saves configuration to [Component Configurations](http://docs.keboola.apiary.io/#reference/component-configurations) in Storage API.
Structure of the configuration is:
```
{
"user": {
"uid": "",
"login": "",
"password": ""
},
"project": {
"pid": ""
},
"domain": {
"name":" "domain name",
"login": "login of domain admin",
"password": "encrypted admin password",
"url": "custom whitelabelled url",
"ssoProvider": "custom sso provider",
"ssoKey": "encrypted pgp key for sso",
"ssoKeyPass": "encrypted passphrase for sso key"
},
"filterColumn": "",
"addDatasetTitleToColumns": false,
"dimensions": {
"date_dimension": {
"title": "Date Dimension",
"identifier": "",
"includeTime": true,
"template": "keboola",
"isExported": true
}
},
"filters": {
"sales_filter": {
"attribute": "out.c-main.products.department_id",
"operator": "IN",
"value": [
"sales"
],
"uri": "/gdc/md/[pid]/obj/[objid]"
}
}
}
```
- **user** contains writer's GoodData credentials and is filled automatically upon writer's creation
- **project** contains pid of GoodData project which is created automatically upon writer's creation
- **domain** (optional) contains credentials of custom domain administrator, it is filled automatically
- **name** - name of custom domain
- **login** - login of domain administrator
- **password** - password of domain administrator, encrypted by Writer
- **url** (optional) - may contain custom url to whitelabelled GoodData
- **ssoProvider** (optional) - may contain custom sso provider; default sso provider will not work for whitelabelled projects
- **ssoKey** (optional) - may contain sso key for custom provider, encrypted by Writer
- **ssoKeyPass** (optional) - optional passphrase for sso key
- **filterColumn** (see Projects section for more information)
- **addDatasetTitleToColumns** (optional) - if true, automatically adds title of dataset to titles of it's attributes and facts; e.g. fact "Price" in dataset "Products" will be titled "Price (Products)" in GoodData (default: `false`)
- **dimensions** (optional) contains list of configured date dimensions
- dimension's name is in object's key
- **title** - pretty name of the dimension in GoodData
- **idenitifer** (optional) - custom identifier of dimension (default: `[date_dimension].dataset.dt`)
- **includeTime** - flag if the date contains also time dimension (default: `false`)
- **template** - name of date dimension template (default: `gooddata`)
- **isExported** - flag if the dimension is exported to the project; it is managed automatically by the Writer, change only if you know what you do
- **filters** (optional) contains list of configured filters
- filters's name is in object's key
- **attribute** - attribute to be filtered, in SAPI notation
- **operator** - operator, one of `=`,`>`,`<`,`<>`, `IN`, `NOT IN`. (Default `=`)
- **value** - value of attribute
- **over** (optional) - connection point of access dataset
- **to** (optional) - connection point of filtered dataset
#### Datasets
Single datasets are saved in configuration rows identified by table id in Storage API.
Structure of the configuration row is:
```
{
"id": "out.c-main.products",
"configuration": {
"title": "Products",
"export": true,
"isExported": true,
"incrementalLoad": 0,
"ignoreFilter": false,
"grain": null,
"columns": {
"id": {
"type": "CONNECTION_POINT",
"title": "Id"
},
"name": {
"type": "ATTRIBUTE",
"title": "Name"
},
"created": {
"type": "DATE",
"format": "yyyy-MM-dd HH:mm:ss",
"dateDimension": "created_date"
},
"category": {
"type": "REFERENCE",
"schemaReference": "out.c-main.categories"
},
"price": {
"type": "FACT",
"title": "Price",
"dataType": "DECIMAL",
"dataTypeSize": "8,2"
}
}
```
- **identifier** (optional) - custom identifier of dataset in GoodData
- **title** - pretty name of dataset in GoodData
- **export** - flag whether to export the dataset in Upload Project request or not
- **isExported** - flagh whether the dataset has been exported to GoodData or not
- **incrementalLoad** - should be empty or 0 for full load or contain number of days which are used for export of table from SAPI
- **ignoreFilter** - flag whether the filtering of data for clones should be ignored on this table
- **grain** (optional) - comma separated list of columns used as fact grain
- **anchorIdentifier** (optional) - custom GoodData identifier of implicit connection point
- **columns** - definition of columns
- name of the column from data table is in key of the object
- **type** - column type, one of: `CONNECTION_POINT`, `ATTRIBUTE`, `LABEL`, `HYPERLINK`, `FACT`, `DATE`, `REFERENCE`, `IGNORE`
- if some column is completely missing from the definition, it is considered to have type `IGNORE`
- **title** - pretty name of the column in GoodData (makes sense only for types `CONNECTION_POINT`, `ATTRIBUTE` and `FACT`)
- **dataType** - data type, one of: `BIGINT`, `DATE`, `DECIMAL`, `INT`, `VARCHAR` (makes sense only for types `CONNECTION_POINT`, `ATTRIBUTE` and `FACT`)
- **dataTypeSize** - number of characters if `dataType` is `VARCHAR` (e.g. 255) or range if `dataType` is `DECIMAL` (e.g. 15,2)
- **reference** - name of referenced column if `type` is `LABEL` or `HYPERLINK`
- **schemaReference** - Storage API id of referenced table if `type` is `REFERENCE`
- **sortLabel** - name of label column used for sorting if `type` is `ATTRIBUTE`
- **sortOrder** - order of sorting if `sortLabel` is used, one of: `ASC`, `DESC` (default: `ASC`)
- **format** - format of data in date dimension column if `type` is `DATE` (e.g. yyyy-MM-dd), supported formats are:
- `yyyy` – year (e.g. 2010)
- `MM` – month (01 - 12)
- `dd` – day (01 - 31)
- `hh` – hour (01 - 12)
- `HH` – hour 24 format (00 - 23)
- `mm` – minutes (00 - 59)
- `ss` – seconds (00 - 59)
- `kk/kkkk` – microseconds or fractions of seconds (00-99, 000-999, 0000-9999)
- `GOODDATA` - number of days since 1900-01-01
- **dateDimension** - name of referenced date dimension if `type` is `DATE`
- **identifier** - custom GoodData identifier of the column (makes sense only for types `CONNECTION_POINT`, `ATTRIBUTE` and `FACT`)
- **identifierLabel** - custom GoodData identifier of attribute's default label (makes sense only for type `ATTRIBUTE`)
- **identifierSortLabel** - custom GoodData identifier of attribute's sort label (makes sense only for type `ATTRIBUTE`)
- **identifierTimeFact** - custom GoodData identifier of time fact (makes sense only for type `DATE`)
*Please note that column definitions are cleaned-up on save to not contain nonsense configuration (e.g. dateDimension won't be saved for any other columns then those having type DATE).*
# Group Writers
Please note that writer id cannot be reused after writer's removal.
Writer has these attributes:
- **id** - writer's identifier - it may contain only unaccented letters, numbers and underscores with max length of 50
- **status** - writer's status, one of [preparing, ready, error, maintenance]
- **created**
- **time** - created time
- **token**
- **id** - id of token that created the writer
- **name** - name of token that created the writer
- **feats** - list of special features activated for the writer
- **project** - project relationship (included optionally)
- **user** - user relationship (included optionally)
## Writers [/{config}]
### Get writer [GET /{config}?include=project,user]
+ Parameters
+ config - writer id
+ include (optional) - list of included objects separated by comma
+ may contain `project` and/or `user`
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"id": "{config}",
"status": "ready",
"created": {
"time": "2015-09-22 12:08:15",
"token": {
"id": 11874,
"name": "jakub@keboola.com"
}
},
"feats": {
},
"project": {
"pid": "crwqlbhp9bewajkf54lun4nfcy0r8gi8",
"active": true,
"main": true,
"ssoAccess": false,
"authToken": "keboola_production"
},
"user": {
"uid": "fe459f87946ef8d56a77a0ab68c2da6b",
"email": "56013c1fdae32@clients.keboola.com",
"main": true,
"password": "pass"
}
}
### List All Writers [GET /?include=project,user]
+ Parameters
+ include (optional) - list of included objects separated by comma
+ may contain `project` and/or `user`
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
{
"id": "{config}",
"status": "ready",
"created": {
"time": "2015-09-22 12:08:15",
"token": {
"id": 11874,
"name": "jakub@keboola.com"
}
},
"feats": {
}
}
]
### Create Writer with Empty Project [POST /]
+ Attributes
+ config (required) - writer id
+ description (optional) - description of the writer
+ backendUrl (optional) - custom GoodData backend if you don't use default one
+ domain (optional) - name of custom domain if you don't use Keboola's
+ username (optional) - username of custom domain administrator
+ password (optional) - password of custom domain administrator
+ ssoProvider (optional) - custom sso provider if you don't want to use keboola.com (please note keboola.com provider won't work on whitelabels)
+ ssoKey (optional) - pgp key for custom sso provider, base64 encoded
+ ssoKeyPass (optional) - passphrase for sso key
+ authToken (optional) - GoodData auth token, default is Keboola's production token
+ accessToken (optional) - **deprecated**, use authToken instead
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"config": "{config}",
"description": "dfkfjdskfkds",
"authToken": "auth_token"
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "{config}",
"tasks": [
{
"name": "createWriter",
"params": {
"description": "dfkfjdskfkds",
"authToken": "auth_token"
}
}
]
},
"result": [],
"status": "waiting"
}
### Create Writer from Existing Project [POST /]
Writer will not create project for the configuration and will use provided instead.
You also have to provide username and password of GoodData user which has admin access
to the project. This project won't be deleted on writer's removal.
If you want to import project from another domain (i.e. project not accessible by
our domain admin gooddata@keboola.com), you have to provide parameter `domain` and
username and password of it's domain admin. Otherwise the import won't work.
+ Attributes
+ config (required) - writer id
+ pid (required) - id of the project in GoodData
+ username (required) - login of GoodData user with admin role in the project
+ password (required) - password of GoodData user with admin role in the project
+ domain (optional) - name of custom domain if you don't use Keboola's
+ ssoProvider (optional) - custom sso provider if you don't want to use keboola.com (please note keboola.com provider won't work on whitelabels)
+ ssoKey (optional) - pgp key for custom sso provider, base64 encoded
+ ssoKeyPass (optional) - passphrase for sso key
+ description (optional) - description of the writer
+ backendUrl (optional) - custom GoodData backend if you don't use default one
+ readModel (boolean, optional) - flag if project model should be read to writer's configuration, Default: `true`
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"config": "{config}",
"pid": "{pid}",
"username": "{username}",
"password": "password"
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "{config}",
"tasks": [
{
"name": "createWriterFromProject",
"params": {
"pid": "{pid}",
"username": "{username}",
"password": "password"
}
}
]
},
"result": [],
"status": "waiting"
}
### Delete Writer [DELETE /{config}]
Deleting writer will also delete GoodData project if it was created during writer's creation.
+ Parameters
+ config - writer id
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "deleteWriter",
"params": {}
}
]
},
"result": [],
"status": "waiting"
}
### Update writer's configuration [PATCH /{config}]
+ Parameters
+ config - writer id
+ Attributes
+ description (optional)
+ gd.backendUrl (optional)
+ {other}
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"description": "{description}"
}
+ Response 204
# Group Projects and Users Provisioning
## Users [/{config}/users]
User has these attributes:
- **id** - GoodData identifier of the user (deprecated, please use *uid* instead)
- **uid** - GoodData identifier of the user
- **email** - User email
- **main** - Flag if the user is main or not (deprected, please do not use)
+ Parameters
+ config - writer id
### Create User [POST]
+ Attributes
+ email (required) - user email
+ password (required) - user password (has to have at least seven characters)
+ firstName (required) - user first name
+ lastName (required) - user last name
+ ssoProvider (optional) - optional ssoProvider, default is keboola.com
+ login (optional) - if you need different email for user login and its emailing address
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"email": "user@test.com",
"password": "dfkfjdskfkds",
"firstName": "Test",
"lastName": "User"
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "createUser",
"params": {
"email": "user@test.com",
"password": "dfkfjdskfkds",
"firstName": "Test",
"lastName": "User"
}
}
]
},
"result": [],
"status": "waiting"
}
### List All Users [GET /{config}/users?offset={offset}&limit={limit}]
+ Parameters
+ config - writer id
+ offset (optional, number) - pagination offset
+ Default: `0`
+ limit (optional, number) - pagination limit (Maximum: `1000`)
+ Default: `1000`
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
{
"ud": "{uid}",
"email": "user@test.com"
}
]
### Get user [GET /{config}/users/{email}]
+ Parameters
+ config - writer id
+ email
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"uid": "{uid}",
"email": "user@test.com"
}
### Delete User [DELETE /{config}/users/{email}]
+ Parameters
+ config - writer id
+ email
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "deleteUser",
"params": {
"email": "email"
}
}
]
},
"result": [],
"status": "waiting"
}
### Get user projects [GET /{config}/users/{email}/projects]
See **Projects Users** section for details about API call response
+ Parameters
+ config - writer id
+ email
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"id": "jdfklsgjaklsjkls",
"pid": "{pid}",
"email": "{email}",
"role": "admin",
"action": "add",
"main": true
}
## Projects [/{config}/projects]
Main project of the writer can be cloned multiple times using this resource.
Cloned projects have the same structure as the main project but can contain
different data. Cloned projects are created under the same GoodData token as
their model.
If you specify configuration attribute `filterColumn` and perform
data load, Writer will look for a column with specified name in each table
and will upload to each cloned project only those rows which contain pid of
the project in the column. Main project will recieve all rows regardless
values of the column.
If you have a table you want to load whole to each cloned project, you can add
attribute `ignoreFilter` with non-null value to it's configuration.
API calls loading data accept optional parameter `pid` which ensures that data
are loaded only to specified project.
Each project has these attributes:
- **id** - GoodData identifier of the project. It is **deprecated**, use **pid** instead
- **pid** - GoodData identifier of the project
- **active** - Flag if the project is active or not (false means the project is not used for data loads, main project is always true)
- **main** - Flag if the project is main or not (false means the project is cloned)
- **ssoAccess** - Flag if the user has enabled access to the project
- **authToken** - GoodData authorization token, default is `keboola_production`
### Create Project by cloning [POST]
+ Parameters
+ config - writer id
+ Attributes
+ name (optional) - name of the project
+ includeData (optional) - flag whether to clone with data of main project
+ Default: 0
+ includeUsers (optional) - flag whether to clone with users of main project
+ Default: 0
+ authToken (optional) - custom auth token, default is token of main project
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"includeData": 1,
"includeUsers": 0
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "createProject",
"params": {
"includeData": 1,
"includeUsers": 0
}
}
]
},
"result": [],
"status": "waiting"
}
### List All Projects [GET /{config}/projects?offset={offset}&limit={limit}]
+ Parameters
+ config - writer id
+ offset (optional, number) - pagination offset
+ Default: `0`
+ limit (optional, number) - pagination limit (Maximum: `1000`)
+ Default: `1000`
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
{
"id": "{pid}",
"active": true,
"main": true,
"ssoAccess": true,
"authToken": "keboola_production"
}
]
### Get project [GET /{config}/projects/{pid}]
+ Parameters
+ config - writer id
+ pid - project identifier
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"id": "{pid}",
"active": true,
"main": true,
"ssoAccess": true,
"authToken": "keboola_production"
}
### Delete Project [DELETE /{config}/projects/{pid}]
Deletes cloned project. If called with pid of main project, deletes the main
project and creates new one instead.
+ Parameters
+ config - writer id
+ pid - project identifier
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "deleteProject",
"params": {
"pid": "pid"
}
}
]
},
"result": [],
"status": "waiting"
}
## Projects Users [/{config}/projects/{pid}/users]
Resource for managing access of users to projects
Each project-user relation has these attributes:
- **id** - hash computed as `sha1("$pid:$email")` serving as primary key for Storage API table containing the data.
**Note, that this is just a historical workaround and will be removed after migration of configuration to Components API. So do not let your code be dependent on this attribute.**
- **pid**
- **email**
- **role** - role of the user in project, may be: `admin`, `editor`, `readOnly` or `dashboardOnly`
- **action** - tells how the user was added to project, **add** means direct addition, **invite** means addition by email invitation
+ Parameters
+ config - writer id
+ pid
### List Users in Project [GET /{config}/projects/{pid}/users?offset={offset}&limit={limit}]
+ Parameters
+ config - writer id
+ pid
+ offset (optional, number) - pagination offset
+ Default: `0`
+ limit (optional, number) - pagination limit (Maximum: `1000`)
+ Default: `1000`
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
{
"id": "hash",
"pid": "{pid}",
"email": "{email}",
"role": "admin",
"action": "add"
}
]
### Add User to Project [PUT /{config}/projects/{pid}/users/{email}]
User will be directly added to the project if he exists in our domain (or in your
custom domain if set). Otherwise he will be invited by email. However you can
force email invitation using parameter `invite`
+ Parameters
+ config - writer id
+ pid
+ email
+ Attributes
+ role - role of user in the project, see resource description for allowed values
+ invite (boolean, optional) - force email invitation of the user instead of direct addition
+ filters (array[string], optional) - array of filters defined by their uris added to users on adding to project. Works only for email invitations
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"role": "editor"
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "addUserToProject",
"params": {
"pid": "{pid}",
"email": "{email}",
"role": "editor"
}
}
]
},
"result": [],
"status": "waiting"
}
### Check if User is in Project [GET /{config}/projects/{pid}/users/{email}]
+ Parameters
+ config - writer id
+ pid
+ email
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"id": "hash",
"pid": "{pid}",
"email": "{email}",
"role": "admin",
"action": "add"
}
### Remove User from Project [DELETE /{config}/projects/{pid}/users/{email}]
+ Parameters
+ config - writer id
+ pid - project identifier
+ email
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "removeUserFromProject",
"params": {
"pid": "pid",
"email": "email"
}
}
]
},
"result": [],
"status": "waiting"
}
## SSO Project Access [/{config}/projects/{pid}/users/{email}/sso]
Resource providing SSO access for writer's users and projects.
**Works only for users created by the writer itself via Users Management API (won't work for already existing users with sso provider other then keboola.com)**
### Get SSO link to Project [GET /{config}/projects/{pid}/users/{email}/sso?validity=86400&targetUrl={targetUrl}]
+ Parameters
+ config - writer id
+ pid
+ email
+ validity (optional)
+ Default: 86400
+ targetUrl (optional) - link
+ Default: /#s=/gdc/projects/{pid}
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"link": "https://secure.gooddata.com/gdc/account/customerlogin?sessionId=-----BEGIN+PGP+MESSAGE-----...-----END+PGP+MESSAGE-----%0A&serverURL=keboola.com&targetURL=%2F%23s%3D%2Fgdc%2Fprojects%{pid}"
}
## Project Access For KBC Users [/{config}/projects/{pid}/access]
Resource providing instant SSO access to projects. Each user is automatically provisioned with
GoodData user created according to his KBC account. Access to each project must be explicitly
enabled first and can be disabled when it is no longer needed.
+ Parameters
+ config - writer id
+ pid - project identifier
### Enable Access to Project [POST]
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 204 (application/json)
### Disable Access to Project [DELETE]
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 204
### Get Access to Project [GET]
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"link": "https://secure.gooddata.com/gdc/account/customerlogin?sessionId=-----BEGIN+PGP+MESSAGE-----...-----END+PGP+MESSAGE-----%0A&serverURL=keboola.com&targetURL=%2F%23s%3D%2Fgdc%2Fprojects%{pid}"
}
# Group User Filters
User filters (in GoodData currently called "data permissions", formerly Mandatory User Filters or MUFs) are used to filter specific data for a user. A filter is based on attribute value identifiers, and affect dashboard objects that use that data. Filters can be assigned to multiple users.
*Feature works only for main project and not for it's clones and only for users created by the writer. It can't be used by already existing users.*
## Filters [/{config}/filters]
### List filters [GET /{config}/filters]
+ Parameters
+ config - writer id
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
{
"name": "filter_test",
"attribute": "out.c-main.products.id",
"operator": "IN",
"value": [
"p1"
],
"over": "",
"to": "",
"uri": "/gdc/md/xleqlbhp9bewajkf54lun4nfcy0r8gi8/obj/624"
}
]
### Create filter [POST /{config}/filters]
+ Parameters
+ config - writer id
+ Attributes
+ name
+ attribute - attribute on which the filter should be set. Use Storage API notation, i.e. `out.c-main.products.name`
+ operator (optional) - should be one of: =,>,<,<>, IN, NOT IN
+ Default: =
+ value - value of the attribute, can be array in combination with operators "IN" or "NOT IN"
+ over (optional) - connection point of access dataset in Storage API notation (e.g. `out.c-main.users.id`)
+ to (optional) - connection point of filtered dataset in Storage API notation (e.g. `out.c-main.products.id`)
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"name": "filter_test",
"attribute": "out.c-main.products.id",
"operator": "IN",
"value": [
"p1"
]
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "createFilter",
"params": {
"name": "filter_test",
"attribute": "out.c-main.products.id",
"operator": "IN",
"value": [
"p1"
]
}
}
]
},
"result": [],
"status": "waiting"
}
### Get filter [GET /{config}/filters/{name}]
+ Parameters
+ config - writer id
+ name - filter name
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"name": "filter_test",
"attribute": "out.c-main.products.id",
"operator": "IN",
"value": [
"p1"
],
"over": "",
"to": "",
"uri": "/gdc/md/xleqlbhp9bewajkf54lun4nfcy0r8gi8/obj/624"
}
### Delete filter [DELETE /{config}/filters/{name}]
+ Parameters
+ config - writer id
+ name - filter name
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "deleteFilter",
"params": {
"name": "filter_test"
}
}
]
},
"result": [],
"status": "waiting"
}
## Assigning of Filters to Users [/{config}/users/{email}/filters]
### Assign filters to user [PUT /{config}/users/{email}/filters]
+ Parameters
+ config - writer id
+ email - user email
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
[
"first_filter",
"second_filter"
]
+ Response 200 (application/json)
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "assignFiltersToUser",
"params": {
"filters": [
"first_filter",
"second_filter"
]
}
}
]
},
"result": [],
"status": "waiting"
}
### Get user's assigned filters [GET /{config}/users/{email}/filters]
+ Parameters
+ config - writer id
+ email - user email
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
"first_filter",
"second_filter"
]
# Group Project Model
Resource for configuration of Storage API tables to GoodData datasets
## Tables [/{config}/tables]
### List tables [GET /{config}/tables?include=columns]
+ Parameters
+ config - writer id
+ include (optional) - list of included objects separated by comma
+ may contain `columns`
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
{
"tableId": "out.c-main.products",
"identifier": "",
"title": "Products",
"export": true,
"isExported": false,
"incrementalLoad": 0,
"columns": {
"id": {
"name": "id",
"title": "Id",
"type": "CONNECTION_POINT"
}
}
}
]
### List referenceable tables [GET /{config}/referenceable-tables]
List of tables having connection point in format `tableId:title`
+ Parameters
+ config - writer id
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"out.c-main.products": "Products",
"out.c-main.categories": "Categories"
}
### Get configured table [GET /{config}/tables/{tableId}?include=columns]
+ Parameters
+ config - writer id
+ tableId - id of table in Storage API
+ include (optional) - list of included objects separated by comma
+ may contain `columns`
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"tableId": "out.c-main.products",
"identifier": "",
"title": "Products",
"export": true,
"isExported": false,
"incrementalLoad": 0,
"columns": {
"id": {
"name": "id",
"title": "Id",
"type": "CONNECTION_POINT"
}
}
}
### Add table to configuration [POST /{config}/tables]
+ Parameters
+ config - writer id
+ Attributes
+ tableId - id of table in Storage API
+ title (optional) - GoodData title of dataset
+ identifier (optional) - custom GoodData identifier
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"title": "Products",
"identifier": ""
}
+ Response 204
### Delete table from configuration [DELETE /{config}/tables/{tableId}]
+ Parameters
+ config - writer id
+ tableId - id of table in Storage API
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 204
### Update table's configuration [PATCH /{config}/tables/{tableId}]
+ Parameters
+ config - writer id
+ tableId - id of table in Storage API
+ Attributes
+ title (optional)
+ export (optional)
+ isExported (optional)
+ incrementalLoad (optional)
+ ignoreFilter (optional)
+ columns (optional) - replaces whole configuration of columns
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"title": "Products",
"identifier": "",
"columns": {
"id": {
"type": "CONNECTION_POINT",
"title": "Id"
}
}
}
+ Response 204
### Update model of dataset in project [POST /{config}/projects/{pid}/datasets/{tableId}/update]
+ Parameters
+ config - writer id
+ pid
+ tableId
+ Attributes
+ dryRun (optional) - does not execute any changes, just returns list of changes which would be executed
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"dryRun": true
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "updateModel",
"params": {
"pid": "pid",
"tableId": "tableId"
}
}
]
},
"result": [],
"status": "waiting"
}
### Update whole project model [POST /{config}/projects/{pid}/update]
+ Parameters
+ config - writer id
+ pid
+ Attributes
+ dryRun (optional) - does not execute any changes, just returns list of changes which would be executed
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"dryRun": true
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "updateModel",
"params": {
"pid": "pid"
}
}
]
},
"result": [],
"status": "waiting"
}
### Delete dataset from project [DELETE /{config}/projects/{pid}/datasets/{tableId}]
Dataset will be removed from GoodData but data table and it's configuration in Storage API will remain.
+ Parameters
+ config - writer id
+ pid
+ tableId
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "deleteDataset",
"params": {
"pid": "pid",
"tableId": "out.c-main.products"
}
}
]
},
"result": [],
"status": "waiting"
}
## Date Dimensions [/{config}/date-dimensions]
Resource for configuration of GoodData date dimensions
+ Parameters
+ config - writer id
### List dimensions [GET]
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
[
{
"name": "New Date Dimension",
"identifier": "",
"includeTime": true,
"template": "keboola",
"isExported": true
}
]
### Get dimension [GET /{config}/date-dimensions/{name}]
+ Parameters
+ config - writer id
+ name
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"name": "New Date Dimension",
"identifier": "",
"includeTime": true,
"template": "keboola",
"isExported": true
}
### Add dimension [POST /{config}/date-dimensions]
+ Parameters
+ config - writer id
+ Attributes
+ name
+ identifier (optional) - custom GoodData identifier
+ includeTime (optional) - flag whether to create connected time dimension
+ template (optional) - template of date dimension, empty value means `goodddata`,
other supported value is `keboola`
+ isExported (optional) - flag whether the dimension is in GoodData
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"includeTime": 1,
"template": "keboola"
}
+ Response 204
### Delete dimension [DELETE /{config}/date-dimensions/{name}]
+ Parameters
+ config - writer id
+ name
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "deleteDateDimension",
"params": {
"pid": "pid",
"name": "name"
}
}
]
},
"result": [],
"status": "waiting"
}
### Update dimension's configuration [PATCH /{config}/date-dimensions/{name}]
+ Parameters
+ config - writer id
+ name
+ Attributes
+ identifier (optional) - custom GoodData identifier
+ includeTime (optional) - flag whether to create connected time dimension
+ template (optional) - template of date dimension, empty value means `goodddata`,
other supported value is `keboola`
+ isExported (optional) - flag whether the dimension is in GoodData
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"includeTime": 0,
"template": "keboola"
}
+ Response 204
### Upload dimension to project [POST /{config}/date-dimensions/{name}/upload/{pid}]
+ Parameters
+ config - writer id
+ name
+ pid
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "uploadDateDimension",
"params": {
"pid": "pid",
"name": "name"
}
}
]
},
"result": [],
"status": "waiting"
}
# Group Data Load
Resource for loading data to projects
### Load Data to table [POST /{config}/projects/{pid}/datasets/{tableId}/load]
+ Parameters
+ config - writer id
+ pid
+ tableId
+ Attributes
+ incrementalLoad (optional) - if you want data not older then X days (add number of days to the parameter)
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"incrementalLoad": 3
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "loadData",
"params": {
"pid": "pid",
"tableId": "tableId"
}
}
]
},
"result": [],
"status": "waiting"
}
### Load Data to more tables [POST /{config}/projects/{pid}/load]
API call will create single load data task for every table in parameters
+ Parameters
+ config - writer id
+ pid
+ Attributes
+ tables (array) - array of tables to load. Non-existing tables and tables with `export` flag set to `0` will be ignored
+ incrementalLoad (optional) - if you want data not older then X days (add number of days to the parameter)
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"tables": ["out.c-main.products", "out.c-main.categories"]
"incrementalLoad": 3
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "loadData",
"params": {
"pid": "pid",
"tableId": "tableId"
},
"definition": null
}
]
},
"result": [],
"status": "waiting"
}
### Load Data to more tables at once [POST /{config}/projects/{pid}/load-multi]
API call will create one load data task and will load data at once.
This is sutiable for bigger amount of tables loaded incrementally.
+ Parameters
+ config - writer id
+ pid
+ Attributes
+ tables (array) - array of tables to load. Non-existing tables and tables with `export` flag set to `0` will be ignored
+ incrementalLoad (optional) - if you want data not older then X days (add number of days to the parameter)
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"incrementalLoad": 3,
"tables": ["out.c-main.products", "out.c-main.categories"]
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "loadDataMulti",
"params": {
"pid": "pid",
"tables": ["out.c-main.products", "out.c-main.categories"]
},
"definition": null
}
]
},
"result": [],
"status": "waiting"
}
# Group Reports
## Reports Execution [/{config}/projects/{pid}/reports/execute]
### Execute Reports [POST]
+ Parameters
+ config - writer id
+ pid
+ Attributes
+ reports - array of report uris
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"reports": ["uri"]
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "executeReports",
"params": {
"pid": "pid",
"reports": ["uri"]
}
}
]
},
"result": [],
"status": "waiting"
}
## Reports Export [/{config}/projects/{pid}/reports/export]
### Export Report to Storage API table [POST]
+ Parameters
+ config - writer id
+ pid
+ Attributes
+ report - uri of the report
+ table - Storage API table id where result of the report should be saved
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"report": "uri",
"tableId": "{tableId}"
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "exportReport",
"params": {
"pid": "pid",
"report": "uri",
"tableId": "{tableId}"
}
}
]
},
"result": [],
"status": "waiting"
}
# Group Proxy
Simple proxy for direct calls to GoodData API
## Without payload [/{config}/proxy?uri={uri}]
### Make synchronous GET request [GET]
+ Parameters
+ uri (required) - Uri to GoodData API resource (without protocol and domain)
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 200 (application/json)
{
"..."
}
### Make asynchronous DELETE request [DELETE]
+ Parameters
+ uri (required) - Uri to GoodData API resource (without protocol and domain)
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "proxy",
"params": {
"uri": "/dfs",
"method": "DELETE",
"payload": {}
}
}
]
},
"result": [],
"status": "waiting"
}
## With payload [/{config}/proxy]
### Make asynchronous POST request [POST]
+ Attributes
+ uri (required) - Uri to GoodData API resource (without protocol and domain)
+ payload (optional) - Body of the POST request to GD
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"uri": "/gdc/md/{pid}/obj",
"payload": { ... }
}
+ Response 202 (application/json)
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "proxy",
"params": {
"uri": "/dfs",
"method": "POST",
"payload": {}
}
}
]
},
"result": [],
"status": "waiting"
}
### Make asynchronous PUT request [PUT]
+ Attributes
+ uri (required) - Uri to GoodData API resource (without protocol and domain)
+ payload (optional) - Body of the POST request to GD
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
{
"uri": "/gdc/md/{pid}/obj",
"payload": { ... }
}
+ Response 202 (application/json)
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "proxy",
"params": {
"uri": "/dfs",
"method": "PUT",
"payload": {}
}
}
]
},
"result": [],
"status": "waiting"
}
# Group Additional Tools
### Define a multi-task job [POST /{config}/jobs]
+ Parameters
+ config
+ Attributes
+ tasks (required, array) - List of tasks
+ (object)
+ name (required, enum[string]) - name of the task
+ Members
+ `addUserToProject` - required params: `email`, `role`, optional: `pid`, `filters`
+ `assignFiltersToUserProxy` - required params: `uid`, `filters`, optional: `pid`
+ `createFiltersProxy` - required params: `name`, `attribute`, `value`, optional: `pid`, `operator`, `over`, `to`
+ `createProject` - optional params: `authToken`, `name`, `includeData`, `includeUsers`
+ `createUser` - required params: `firstName`, `lastName`, `email`, `password`, optional: `ssoProvider`, `login`
+ `deleteDataset` - required params: `tableId`, optional: `pid`
+ `deleteDateDimension` - required params: `name`, optional: `pid`
+ `deleteFiltersProxy` - required params: `uri`
+ `deleteProject` - optional param: `pid`
+ `deleteUser` - required params: `email`
+ `executeReports` - optional: `pid`, `reports`
+ `exportReport` - required params: `report`, `table`, optional: `pid`
+ `loadData` - optional: `pid`, `tables`, `incrementalLoad`
+ `loadDataMulti` - optional: `pid`, `tables`, `incrementalLoad`
+ `proxy` - required params: `uri`, `method`, optional: `payload`
+ `removeUserFromProject` - required params: `email`, optional: `pid`
+ `synchronize` - optional: `pid`, `tables`, `full`
+ `updateModel` - optional: `pid`, `tableId`, `dryRun`
+ `uploadDateDimension` - required params: `name`, optional: `pid`
+ params (required, array) - array of parameters
+ Request (application/json)
+ Headers
X-StorageApi-Token: {your_token}
+ Body
[
{
"name": "createUser",
"params": ["name": "John Doe", "email": "john@doe.org"]
},
{
"name": "createUser",
"params": ["name": "Jane Doe", "email": "jane@doe.org"]
}
}
+ Response 202 (application/json)
+ Headers
Content-Location: {jobUrl}
+ Body
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "createUser",
"params": {
"name": "John Doe",
"email": "john@doe.org"
}
},
{
"name": "createUser",
"params": {
"name": "Jane Doe",
"email": "jane@doe.org"
}
}
]
},
"result": [],
"status": "waiting"
}
### Optimize SLI hash [POST /{config}/projects/{pid}/optimize-sli-hash]
+ Parameters
+ config (required) - writer id
+ pid (required) - project id
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "optimizeSliHash",
"params": {
"pid": "{pid}"
}
}
]
},
"result": [],
"status": "waiting"
}
### Synchronize dataset [POST /{config}/tables/{tableId}/synchronize/{pid}?full=1]
+ Parameters
+ config (required) - writer id
+ tableId - id of configured table
+ pid (required) - project id
+ full (optional) - Flag if the sync should be full (without data preservation)
+ Default: false
+ Request
+ Headers
X-StorageApi-Token: {your_token}
+ Response 202 (application/json)
{
"id": "{jobId}",
"url": {jobUrl},
"runId": 12323,
"queue": "queueId",
"token": {
"id": 33232,
"description": "jakub@keboola.com"
},
"createdTime": "2015-11-01T12:34:00+01:00",
"startTime": null,
"endTime": null,
"command": "run",
"params": {
"config": "writerId",
"tasks": [
{
"name": "synchronize",
"params": {
"pid": "{pid}",
"tableId": "{tableId}"
}
}
]
},
"result": [],
"status": "waiting"
}