VQB queries schema
service.vqb.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
vqbGenerateQuery
Description
Generates a query based on the provided VQB query configuration input.
Response
Returns a String!
Arguments
| Name | Description |
|---|---|
projectId - ID
|
|
connectionId - ID!
|
|
contextId - ID!
|
|
queryConfig - VQBQueryConfigInput!
|
Example
Query
query vqbGenerateQuery(
$projectId: ID,
$connectionId: ID!,
$contextId: ID!,
$queryConfig: VQBQueryConfigInput!
) {
vqbGenerateQuery(
projectId: $projectId,
connectionId: $connectionId,
contextId: $contextId,
queryConfig: $queryConfig
)
}
Variables
{
"projectId": "<id>",
"connectionId": "<id>",
"contextId": "<id>",
"queryConfig": VQBQueryConfigInput
}
Response
{"data": {"vqbGenerateQuery": "<string>"}}
vqbParseQuery
Description
Parses a query and returns information about database entities. Format is not defined.
Response
Returns an Object!
Example
Query
query vqbParseQuery(
$projectId: ID,
$connectionId: ID!,
$contextId: ID!,
$query: String!
) {
vqbParseQuery(
projectId: $projectId,
connectionId: $connectionId,
contextId: $contextId,
query: $query
)
}
Variables
{
"projectId": "<id>",
"connectionId": "<id>",
"contextId": "<id>",
"query": "<string>"
}
Response
{"data": {"vqbParseQuery": "<object>"}}
vqbParseQueryExtended
Description
Parses a query and returns ERD diagram information for the specified project, connection, and context.
Response
Returns an ERDDiagramInfo!
Example
Query
query vqbParseQueryExtended(
$projectId: ID,
$connectionId: ID!,
$contextId: ID!,
$query: String!
) {
vqbParseQueryExtended(
projectId: $projectId,
connectionId: $connectionId,
contextId: $contextId,
query: $query
) {
entities {
...ERDEntityInfoFragment
}
associations {
...ERDAssociationInfoFragment
}
data {
...ERDDiagramDataFragment
}
where
orderBy
selectItems
hasComments
}
}
Variables
{
"projectId": "<id>",
"connectionId": "<id>",
"contextId": "<id>",
"query": "<string>"
}
Response
{
"data": {
"vqbParseQueryExtended": {
"entities": [ERDEntityInfo],
"associations": [ERDAssociationInfo],
"data": ERDDiagramData,
"where": "<string>",
"orderBy": ["<string>"],
"selectItems": ["<string>"],
"hasComments": "<boolean>"
}
}
}
vqbReadEntityData
Description
Reads information about database entities. Use vqbReadEntityDataExtended instead.
vqbReadEntityDataExtended
Description
Returns a ERD diagram information for the specified object node IDs.
Response
Returns an ERDDiagramInfo!
Arguments
| Name | Description |
|---|---|
objectNodeIds - [ID!]!
|
Example
Query
query vqbReadEntityDataExtended($objectNodeIds: [ID!]!) {
vqbReadEntityDataExtended(objectNodeIds: $objectNodeIds) {
entities {
...ERDEntityInfoFragment
}
associations {
...ERDAssociationInfoFragment
}
data {
...ERDDiagramDataFragment
}
where
orderBy
selectItems
hasComments
}
}
Variables
{"objectNodeIds": "<id>"}
Response
{
"data": {
"vqbReadEntityDataExtended": {
"entities": [ERDEntityInfo],
"associations": [ERDAssociationInfo],
"data": ERDDiagramData,
"where": "<string>",
"orderBy": ["<string>"],
"selectItems": ["<string>"],
"hasComments": "<boolean>"
}
}
}
vqbReconstructQuery
Description
Merges comments from the original query text into the new query text
Response
Returns a String!
Example
Query
query vqbReconstructQuery(
$projectId: ID,
$connectionId: ID!,
$originalQuery: String!,
$newQuery: String!
) {
vqbReconstructQuery(
projectId: $projectId,
connectionId: $connectionId,
originalQuery: $originalQuery,
newQuery: $newQuery
)
}
Variables
{
"projectId": "<id>",
"connectionId": "<id>",
"originalQuery": "<string>",
"newQuery": "<string>"
}
Response
{
"data": {
"vqbReconstructQuery": "<string>"
}
}
Mutations
vqbFakeFunction
Response
Returns an Object
Example
Query
mutation vqbFakeFunction {
vqbFakeFunction
}
Response
{"data": {"vqbFakeFunction": "<object>"}}
Types
Boolean
Description
The Boolean scalar type represents true or false.
Example
"<boolean>"
ERDAssociationInfo
Description
Information about an association between entities in the ERD diagram.
Fields
| Field Name | Description |
|---|---|
name - String!
|
Name of the association. |
fqn - String
|
Fully qualified name of the association. |
type - String!
|
Association type, such as 'fk' (foreign key), 'pk' (primary key) etc. |
primaryEntity - Int
|
Returns the index of the primary (source) entity if specified. |
foreignEntity - Int
|
Returns the index of the foreign (target) entity if specified. |
primaryAttributes - [String!]!
|
List of primary attributes in the association. |
foreignAttributes - [String!]!
|
List of foreign attributes in the association. |
joinType - VQBJoinType
|
Type of join operation used in the association. |
Example
{
"name": "<string>",
"fqn": "<string>",
"type": "<string>",
"primaryEntity": "<int>",
"foreignEntity": "<int>",
"primaryAttributes": ["<string>"],
"foreignAttributes": ["<string>"],
"joinType": "SIMPLE"
}
ERDDiagramData
Fields
| Field Name | Description |
|---|---|
icons - [String!]!
|
List of icon paths used in the ERD diagram. |
Example
{"icons": ["<string>"]}
ERDDiagramInfo
Description
Information about an ERD diagram, including entities, associations, and diagram data.
Fields
| Field Name | Description |
|---|---|
entities - [ERDEntityInfo!]!
|
Entities in the ERD diagram. |
associations - [ERDAssociationInfo!]
|
Associations between entities in the ERD diagram. |
data - ERDDiagramData!
|
Diagram data, including icons and other metadata. |
where - String
|
|
orderBy - [String!]!
|
|
selectItems - [String!]!
|
|
hasComments - Boolean!
|
Example
{
"entities": [ERDEntityInfo],
"associations": [ERDAssociationInfo],
"data": ERDDiagramData,
"where": "<string>",
"orderBy": ["<string>"],
"selectItems": ["<string>"],
"hasComments": "<boolean>"
}
ERDEntityAttributeInfo
Description
Information about an entity attribute in the ERD diagram (columns from table).
Fields
| Field Name | Description |
|---|---|
name - String!
|
Name of the attribute. |
alias - String
|
Alias of the attribute if it has one. |
dataKind - String
|
Data type of the attribute. |
typeName - String
|
Type name of the attribute. |
optional - Boolean
|
Indicates if the attribute is optional. |
iconIndex - Int
|
Returns the icon index for the attribute from the ERD diagram data. |
fullTypeName - String
|
Fully qualified type name of the attribute. |
defaultValue - String
|
Default value of the attribute. |
description - String
|
Description of the attribute. |
checked - Boolean!
|
Indicates if the attribute is checked. |
inPrimaryKey - Boolean
|
Indicates if the attribute is in a primary key. |
inForeignKey - Boolean
|
Indicates if the attribute is in a foreign key. |
Example
{
"name": "<string>",
"alias": "<string>",
"dataKind": "<string>",
"typeName": "<string>",
"optional": "<boolean>",
"iconIndex": "<int>",
"fullTypeName": "<string>",
"defaultValue": "<string>",
"description": "<string>",
"checked": "<boolean>",
"inPrimaryKey": "<boolean>",
"inForeignKey": "<boolean>"
}
ERDEntityInfo
Fields
| Field Name | Description |
|---|---|
id - Int!
|
Unique identifier of the entity. |
name - String!
|
Display name of the entity. |
alias - String
|
Alias of the entity if it has one. |
fqn - String
|
Fully qualified name of the entity, including its namespace. |
nodeId - ID
|
ID of the node in the ERD diagram. |
nodeUri - ID
|
URI of the node in the ERD diagram. |
attributes - [ERDEntityAttributeInfo!]!
|
List of attributes for the entity. |
Example
{
"id": "<int>",
"name": "<string>",
"alias": "<string>",
"fqn": "<string>",
"nodeId": "<id>",
"nodeUri": "<id>",
"attributes": [ERDEntityAttributeInfo]
}
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>"
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>"
VQBAssociationInput
Fields
| Input Field | Description |
|---|---|
source - VQBEntityAttributeReferenceInput
|
|
target - VQBEntityAttributeReferenceInput
|
|
type - VQBAssociationType
|
Example
{
"source": VQBEntityAttributeReferenceInput,
"target": VQBEntityAttributeReferenceInput,
"type": "WHERE"
}
VQBAssociationType
Description
Enum representing the type of association.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"WHERE"
VQBDataInput
Fields
| Input Field | Description |
|---|---|
entities - [VQBEntityInput!]!
|
|
associations - [VQBAssociationInput!]
|
|
whereString - String
|
Example
{
"entities": [VQBEntityInput],
"associations": [VQBAssociationInput],
"whereString": "<string>"
}
VQBEntityAttributeInput
VQBEntityAttributeOrderType
Description
Enum representing the order type for attributes.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
Example
"ASC"
VQBEntityAttributeReferenceInput
VQBEntityInput
Fields
| Input Field | Description |
|---|---|
id - Int!
|
|
name - String!
|
|
alias - String
|
|
fqn - String
|
|
nodeId - ID
|
|
attributes - [VQBEntityAttributeInput!]
|
|
operator - VQBLogicalOperator
|
|
joinType - VQBJoinType
|
Example
{
"id": "<int>",
"name": "<string>",
"alias": "<string>",
"fqn": "<string>",
"nodeId": "<id>",
"attributes": [VQBEntityAttributeInput],
"operator": "ALL",
"joinType": "SIMPLE"
}
VQBJoinType
Description
Enum representing the type of join operation.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"SIMPLE"
VQBLogicalOperator
Description
Enum representing the logical operators used in VQB queries.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"ALL"
VQBQueryConfigInput
Fields
| Input Field | Description |
|---|---|
data - VQBDataInput
|
Example
{"data": VQBDataInput}