Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
334 lines (208 sloc) 8.27 KB
FORMAT: 1A
HOST: https://gooddata-provisioning.keboola.com
# GoodData Provisioning for Keboola Connection
**This API is in Beta version and may change without prior notice.**
## Authentication
Storage API token provided to you by Keboola has to be sent in `X-StorageApi-Token` HTTP header with each api call. You have to use a master token (see https://help.keboola.com/management/project/tokens/#master-tokens) or token allowed for component `keboola.gooddata-provisioning` (see https://help.keboola.com/management/project/tokens/#limited-access-to-components).
## Pagination
Listing calls can be paginated using next page token. In that case, a link to the next page will be sent in `Link` response header with `rel="next"`.
## Projects [/projects]
### List projects [GET /projects?nextPageToken={nextPageToken}]
Lists all GoodData projects provisioned for current KBC project
+ Parameters
+ nextPageToken (optional) - Pagination token
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 200 (application/json)
+ Headers
Link: https://gooddata-provisioning.keboola.com/projects/?nextPageToken=1234; rel="next"
+ Body
[
{
"pid": "wasc4gjy5sphvlt0wjx5fqys5q6bh38j",
"createdOn": "2017-03-07T22:23:12.000Z",
"createdBy": "kbc",
"createdById": 1,
"expiresOn": "2018-04-11T12:00:00.000Z"
},
{
"pid": "xyrt8gjy5sphvltxyrt85fqys5q6bh399",
"createdOn": "2017-03-08T22:23:12.000Z",
"createdBy": "kbc",
"createdById": 1,
"expiresOn": null
}
]
### Get project detail [GET /projects/{pid}]
Lists all GoodData projects provisioned for current KBC project
+ Parameters
+ pid (required)
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 200 (application/json)
+ Body
{
"pid": "wasc4gjy5sphvlt0wjx5fqys5q6bh38j",
"token": "keboola_demo",
"createdOn": "2017-03-07T22:23:12.000Z",
"createdBy": "kbc",
"createdById": 1
}
### Create a project [POST /projects]
You can create projects under one of Keboola tokens (`demo` or `production`). Total count of allowed projects is one for production and two for demo. The limits can be increased individually according to client's contract (and set in KBC limits `goodData.demoProjectsCount` and `goodData.prodProjectsCount`). Demo projects will automatically expire after 30 days.
Otherwise, you can create projects under your own custom token without limits.
+ Attributes
+ name (required) - Name of the project
+ keboolaToken (optional, enum[string]) - Create the project under one of Keboola tokens.
+ Members
+ `demo`
+ `production`
+ customToken (optional) - Authorization Token issued by GoodData if you want to use your own
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Body
{
"name": "Project Name",
"customToken": "AuthorizationToken"
}
+ Response 201 (application/json)
+ Body
{
"pid": "jfkdsjfljkdls"
}
### Create a project with user [POST /projects?user=true]
Creates the project in the same way like the previous resource but creates also a user. But it does not add the user to the project, you have to do it on your own. It returns user's login and password along with project id.
+ Attributes
+ name (required) - Name of the project
+ keboolaToken (optional, enum[string]) - Create the project under one of Keboola tokens.
+ Members
+ `demo`
+ `production`
+ customToken (optional) - Authorization Token issued by GoodData if you want to use your own
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Body
{
"name": "Project Name",
"customToken": "AuthorizationToken"
}
+ Response 201 (application/json)
+ Body
{
"pid": "jfkdsjfljkdls",
"uid": "jfkdsjfljkdls",
"login": "test@keboola.com",
"password": "1234567",
}
### Delete a project [DELETE /projects/{pid}?user={user}&ignoreGoodDataErrors={ignoreGoodDataErrors}]
+ Parameters
+ user (optional, boolean) - flag with truthy value tries to delete a service user provisioned for this project (would have login starting with `service-{pid}-{kbc_project_id}@`)
+ ignoreGoodDataErrors (optional, boolean) - flag if GoodData errors should be ignored
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 204
## Users [/users]
### List users [GET /users?nextPageToken={nextPageToken}]
Lists all GoodData users provisioned for current KBC project
+ Parameters
+ nextPageToken (optional) - Pagination token
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 200 (application/json)
+ Headers
Link: https://gooddata-provisioning.keboola.com/projects/?nextPageToken=1234; rel="next"
+ Body
[
{
"login": "313-deltest11-57333edca7704@clients.keboola.com",
"uid": "05e201dd015be23b892a6cac85098fb0",
"createdOn": "2016-05-11T16:17:01.000Z",
"createdBy": "kbc",
"createdById": 1
}
]
### Create a user [POST /users]
+ Attributes
+ login (required)
+ password (required) - Must have at least 7 characters
+ firstName (required)
+ lastName (required)
+ email (optional)
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Body
{
"login": "test@keboola.com",
"password": "1234567",
"firstName": "Keboola",
"lastName": "Test"
}
+ Response 201 (application/json)
+ Body
{
"uid": "jfkdsjfljkdls"
}
### Delete a user [DELETE /users/{login}?ignoreGoodDataErrors={ignoreGoodDataErrors}]
+ Parameters
+ ignoreGoodDataErrors (optional, boolean) - flag if GoodData errors should be ignored
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 204
### Generate claims for SSO access [GET /users/{login}/sso]
Returns requirements for SSO Login through GoodData API (see: https://help.gooddata.com/display/developer/API+Reference#/reference/authentication/sso-pgp-login)
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 200 (application/json)
+ Body
{
"enryptedClaims": "-----BEGIN PGP MESSAGE-----\n...",
"ssoProvider": "keboola.com"
}
### Add user to a project [POST /projects/{pid}/users/{login}]
+ Attributes
+ role (required) one of: admin, dashboardOnly, editor, editorInvite, editorUserAdmin, explorer, explorerOnly, keboolaEditorPlus, readOnlyUser, readOnlyNoExport
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Body
{
"role": "admin"
}
+ Response 204
### Remove user from a project [DELETE /projects/{pid}/users/{login}]
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 204
## KBC Access [/projects/{id}/access]
### Get SSO access to project [GET /projects/{id}/access]
Returns requirements for SSO Login through GoodData API (see: https://help.gooddata.com/display/developer/API+Reference#/reference/authentication/sso-pgp-login). The access is revoked after 24 hours.
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 200 (application/json)
+ Body
{
"enryptedClaims": "-----BEGIN PGP MESSAGE-----\n...",
"ssoProvider": "keboola.com"
}
### Get user credentials to project [GET /projects/{id}/credentials]
Creates a user and adds it to the project, then returns its credentials.
+ Request
+ Headers
X-StorageApi-Token: {token}
+ Response 200 (application/json)
+ Body
{
"login": "user12345@provisioning.keboola.com",
"password": "1234"
}
You can’t perform that action at this time.