Keboola Credentials API
The Credentials API from Keboola — 3 operation(s) for credentials.
The Credentials API from Keboola — 3 operation(s) for credentials.
openapi: 3.0.0
info:
title: AI Service Actions Credentials API
version: 1.0.0
contact:
email: devel@keboola.com
license:
name: MIT
url: https://opensource.org/licenses/MIT
tags:
- name: Credentials
paths:
/credentials:
get:
summary: Credentials list
operationId: credentialsList
tags:
- Credentials
description: 'Returns list of component credentials.
'
security:
- StorageToken: []
parameters:
- in: query
name: componentId
schema:
type: string
description: Component ID
- in: query
name: branchId
schema:
type: string
description: 'Branch ID
Use value `null` to get credentials without branchId.
'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Credentials'
'401':
$ref: '#/components/responses/401_Unauthorized'
'403':
$ref: '#/components/responses/403_Forbidden'
/credentials/{componentId}:
get:
summary: Component credentials list
operationId: componentCredentialsList
tags:
- Credentials
description: 'Returns list of component credentials.
'
security:
- StorageToken: []
parameters:
- in: path
name: componentId
schema:
type: string
required: true
description: Component ID
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Credentials'
'401':
$ref: '#/components/responses/401_Unauthorized'
'403':
$ref: '#/components/responses/403_Forbidden'
post:
summary: Create credentials
operationId: componentCredentialsCreate
tags:
- Credentials
description: 'Call the endpoint to create new credentials for given component.
'
security:
- StorageToken: []
parameters:
- in: path
name: componentId
schema:
type: string
required: true
description: Component ID
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- id
- authorizedFor
- '#data'
properties:
id:
type: string
description: Credentials ID
authorizedFor:
type: string
description: Authorization description
'#data':
type: string
description: Encrypted data, e.g. OAuth token
branchId:
type: string
nullable: true
description: 'ID of the branch where the credentials should live. If not specified, the credentials will be
considered as project-wide.
The property is not required for now, to keep compatibility with existing clients. But it will be
required in the future (but still nullable), to ensure the client has considered if they want to
create project-wide or branch-specific credentials.
'
responses:
'201':
description: Credentials created
content:
application/json:
schema:
$ref: '#/components/schemas/Credentials'
'400':
$ref: '#/components/responses/400_BadRequest'
'404':
$ref: '#/components/responses/404_NotFound'
'422':
$ref: '#/components/responses/422_UnprocessableEntity'
/credentials/{componentId}/{name}:
get:
summary: Credentials detail
operationId: credentialsDetail
tags:
- Credentials
description: 'Returns the credentials detail.
'
security:
- StorageToken: []
parameters:
- in: path
name: componentId
schema:
type: string
required: true
description: Component ID
- in: path
name: name
schema:
type: string
required: true
description: Credentials name (authorization ID)
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Credentials'
'401':
$ref: '#/components/responses/401_Unauthorized'
'403':
$ref: '#/components/responses/403_Forbidden'
delete:
summary: Delete credentials
operationId: credentialsDelete
tags:
- Credentials
description: 'Delete existing credentials.
'
security:
- StorageToken: []
parameters:
- in: path
name: componentId
schema:
type: string
required: true
description: Component ID
- in: path
name: name
schema:
type: string
required: true
description: Credentials name (authorization ID)
responses:
'204':
description: Credentials deleted
'401':
$ref: '#/components/responses/401_Unauthorized'
'404':
$ref: '#/components/responses/404_NotFound'
components:
responses:
401_Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404_NotFound:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
400_BadRequest:
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403_Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
422_UnprocessableEntity:
description: Unprocessable entity
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
required:
- error
- code
- exceptionId
- status
properties:
error:
type: string
code:
type: integer
exceptionId:
type: string
status:
enum:
- error
context:
type: object
Credentials:
type: object
required:
- id
- branchId
- authorizedFor
- creator
- created
- oauthVersion
- appKey
- '#appSecret'
- '#data'
properties:
id:
type: string
branchId:
type: string
nullable: true
authorizedFor:
type: string
creator:
type: object
required:
- id
- description
properties:
id:
type: string
description:
type: string
nullable: true
created:
type: string
format: date-time
oauthVersion:
type: string
appKey:
type: string
'#appSecret':
type: string
'#data':
type: string
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-StorageApi-Token