Secrets API schema

service.secret.graphqls

This API is available in Enterprise and AWS editions only.

To authenticate API requests, you’ll need an API token. Learn how to generate an access token.

See usage examples in the cloudbeaver-graphql-examples repository.

You can try queries in the built-in GraphQL console, available on your server at https://your-server-address/api/gql/console. This tool lets you test requests directly from your browser.

For a live example, see the demo GraphQL console.

API Endpoints
https://your-server-address/api/gql

Queries

secretGetManageableTeams

Description

Returns a list of teams that has access to manage secrets.

Response

Returns [TeamInfo!]!

Example

Query
query secretGetManageableTeams {
  secretGetManageableTeams {
    teamId
    teamName
  }
}
Response
{
  "data": {
    "secretGetManageableTeams": [{"teamId": "<string>", "teamName": "<string>"}]
  }
}

secretListDataSourceSecrets

Description

Returns a list of secrets for a data source in the specified project and team.

Response

Returns [AdminSecretInfo!]!

Arguments
Name Description
projectId - ID!
dataSourceId - ID!

Example

Query
query secretListDataSourceSecrets(
  $projectId: ID!,
  $dataSourceId: ID!
) {
  secretListDataSourceSecrets(
    projectId: $projectId,
    dataSourceId: $dataSourceId
  ) {
    subjectId
    authProperties {
      ...ObjectPropertyInfoFragment
    }
  }
}
Variables
{"projectId": "<id>", "dataSourceId": "<id>"}
Response
{
  "data": {
    "secretListDataSourceSecrets": [
      {
        "subjectId": "<id>",
        "authProperties": [ObjectPropertyInfo]
      }
    ]
  }
}

Mutations

secretDeleteFromTeam

Description

Deletes a secret from a data source. Returns true if the deletion was successful.

Response

Returns a Boolean!

Arguments
Name Description
teamId - ID!
projectId - ID!
dataSourceId - ID!

Example

Query
mutation secretDeleteFromTeam(
  $teamId: ID!,
  $projectId: ID!,
  $dataSourceId: ID!
) {
  secretDeleteFromTeam(
    teamId: $teamId,
    projectId: $projectId,
    dataSourceId: $dataSourceId
  )
}
Variables
{"teamId": "<id>", "projectId": "<id>", "dataSourceId": "<id>"}
Response
{
  "data": {
    "secretDeleteFromTeam": "<boolean>"
  }
}

secretSetToTeam

Description

Sets a secret (credentials) for a data source in the specified project and team. Returns the secret information.

Response

Returns an AdminSecretInfo!

Arguments
Name Description
teamId - ID!
projectId - ID!
dataSourceId - ID!
credentials - Object

Example

Query
mutation secretSetToTeam(
  $teamId: ID!,
  $projectId: ID!,
  $dataSourceId: ID!,
  $credentials: Object
) {
  secretSetToTeam(
    teamId: $teamId,
    projectId: $projectId,
    dataSourceId: $dataSourceId,
    credentials: $credentials
  ) {
    subjectId
    authProperties {
      ...ObjectPropertyInfoFragment
    }
  }
}
Variables
{
  "teamId": "<id>",
  "projectId": "<id>",
  "dataSourceId": "<id>",
  "credentials": "<object>"
}
Response
{
  "data": {
    "secretSetToTeam": {
      "subjectId": "<id>",
      "authProperties": [ObjectPropertyInfo]
    }
  }
}

Types

AdminSecretInfo

Description

Information about a secret (credentials) for a data source.

Fields
Field Name Description
subjectId - ID! ID of the subject (user or team) that owns the secret.
authProperties - [ObjectPropertyInfo!]! List of properties that contain the secret information.
Example
{
  "subjectId": "<id>",
  "authProperties": [ObjectPropertyInfo]
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
"<boolean>"

Condition

Description

Represents a dynamic condition for a property, such as visibility or read-only state

Fields
Field Name Description
expression - String! The logical expression that defines when the condition applies
conditionType - ConditionType! The type of condition (e.g., HIDE or READ_ONLY)
Example
{"expression": "<string>", "conditionType": "HIDE"}

ConditionType

Values
Enum Value Description

HIDE

hiding property condition

READ_ONLY

restriction for setting a property value
Example
"HIDE"

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"<id>"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
"<int>"

Object

Description

Any object (JSON)

Example
"<object>"

ObjectPropertyInfo

Description

Information about the object property used to generate its UI

Fields
Field Name Description
id - String Unique property identifier
displayName - String Human-readable name
description - String Property description
hint - String Usage hint for the property
category - String Property category (may be used if object has a lot of properties)
dataType - String Property data type (e.g., int, String)
value - Object Property value (can be resource-intensive for some properties, e.g., RowCount for tables)
validValues - [Object] List of allowed values (for enumerable properties)
defaultValue - Object Default property value
length - ObjectPropertyLength! Property value length
features - [String!]! List of supported features (e.g., system, hidden, inherited, foreign, expensive)
order - Int! Order position
supportedConfigurationTypes - [String!] Supported configuration types (for driver properties)
required - Boolean! Is the property required
scopes - [String!] List of preference scopes (e.g., global, user)
conditions - [Condition!] Dynamic conditions for the property (e.g., visibility or read-only)
Example
{
  "id": "<string>",
  "displayName": "<string>",
  "description": "<string>",
  "hint": "<string>",
  "category": "<string>",
  "dataType": "<string>",
  "value": "<object>",
  "validValues": ["<object>"],
  "defaultValue": "<object>",
  "length": "TINY",
  "features": ["<string>"],
  "order": "<int>",
  "supportedConfigurationTypes": ["<string>"],
  "required": "<boolean>",
  "scopes": ["<string>"],
  "conditions": [Condition]
}

ObjectPropertyLength

Values
Enum Value Description

TINY

1 character

SHORT

20 characters

MEDIUM

<= 64 characters

LONG

Full line length. The default

MULTILINE

Multi-line long text
Example
"TINY"

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"<string>"

TeamInfo

Description

Team information for managing secrets.

Fields
Field Name Description
teamId - String! ID of the team.
teamName - String! Name of the team.
Example
{"teamId": "<string>", "teamName": "<string>"}