Composite datasource API schema
service.cds.graphqls
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
getFederatedDatabaseConfiguration
Description
Returns the federated database configuration for a connection.
Response
Returns an CDSConfiguration
Example
Query
query getFederatedDatabaseConfiguration(
$projectId: ID!,
$connectionId: ID!
) {
getFederatedDatabaseConfiguration(
projectId: $projectId,
connectionId: $connectionId
) {
dataSources {
...CDSDataSourceFragment
}
}
}
Variables
{"projectId": "<id>", "connectionId": "<id>"}
Response
{
"data": {
"getFederatedDatabaseConfiguration": {
"dataSources": [CDSDataSource]
}
}
}
Mutations
saveFederatedDatabaseConfiguration
Description
Saves the federated database configuration for a connection.
Response
Returns an CDSConfiguration!
Arguments
| Name | Description |
|---|---|
projectId - ID!
|
|
connectionId - ID!
|
|
configuration - CDSConfigurationInput!
|
Example
Query
mutation saveFederatedDatabaseConfiguration(
$projectId: ID!,
$connectionId: ID!,
$configuration: CDSConfigurationInput!
) {
saveFederatedDatabaseConfiguration(
projectId: $projectId,
connectionId: $connectionId,
configuration: $configuration
) {
dataSources {
...CDSDataSourceFragment
}
}
}
Variables
{
"projectId": "<id>",
"connectionId": "<id>",
"configuration": CDSConfigurationInput
}
Response
{
"data": {
"saveFederatedDatabaseConfiguration": {
"dataSources": [CDSDataSource]
}
}
}
Types
Boolean
Description
The Boolean scalar type represents true or false.
Example
"<boolean>"
CDSCatalog
CDSCatalogInput
CDSConfiguration
Fields
| Field Name | Description |
|---|---|
dataSources - [CDSDataSource!]!
|
Example
{"dataSources": [CDSDataSource]}
CDSConfigurationInput
Fields
| Input Field | Description |
|---|---|
dataSources - [CDSDataSourceInput!]!
|
Source data sources included in the federated database. |
Example
{"dataSources": [CDSDataSourceInput]}
CDSDataSource
Fields
| Field Name | Description |
|---|---|
dataSourceId - ID!
|
|
enabled - Boolean!
|
|
catalog - CDSCatalog
|
|
schemas - [CDSSchema!]!
|
Example
{
"dataSourceId": "<id>",
"enabled": "<boolean>",
"catalog": CDSCatalog,
"schemas": [CDSSchema]
}
CDSDataSourceInput
Fields
| Input Field | Description |
|---|---|
ds - ID!
|
Source data source ID (dataSourceId). |
on - Boolean!
|
Whether the source data source is enabled (enabled). |
catalog - CDSCatalogInput
|
Source catalog mapping. |
schemas - [CDSSchemaInput!]!
|
Source schema mappings. |
Example
{
"ds": "<id>",
"on": "<boolean>",
"catalog": CDSCatalogInput,
"schemas": [CDSSchemaInput]
}
CDSSchema
CDSSchemaInput
Fields
| Input Field | Description |
|---|---|
n - String
|
Source schema name (sourceName); null identifies the default schema. |
f - String!
|
Schema name in the federated database (federatedName). |
d - Boolean!
|
Whether the schema mapping is disabled (disabled). |
tables - [String!]
|
Null selects all tables; an empty list selects no tables |
Example
{"n": "<string>", "f": "<string>", "d": "<boolean>", "tables": ["<string>"]}
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>"
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>"