Metadata queries schema
service.rm.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
rmListProjectGrantedPermissions
Description
Returns project permissions for the specified project. Can be read only by users with admin permissions
Response
Returns [AdminObjectGrantInfo!]!
Arguments
| Name | Description |
|---|---|
projectId - String!
|
Example
Query
query rmListProjectGrantedPermissions($projectId: String!) {
rmListProjectGrantedPermissions(projectId: $projectId) {
subjectId
subjectType
objectPermissions {
...AdminObjectPermissionsFragment
}
}
}
Variables
{"projectId": "<string>"}
Response
{
"data": {
"rmListProjectGrantedPermissions": [
{
"subjectId": "<id>",
"subjectType": "user",
"objectPermissions": AdminObjectPermissions
}
]
}
}
rmListProjectPermissions
Description
Returns available project permissions. Can be read only by users with admin permissions
Response
Returns [AdminPermissionInfo!]!
Example
Query
query rmListProjectPermissions {
rmListProjectPermissions {
id
label
description
provider
category
}
}
Response
{
"data": {
"rmListProjectPermissions": [
{
"id": "<id>",
"label": "<string>",
"description": "<string>",
"provider": "<string>",
"category": "<string>"
}
]
}
}
rmListProjects
Description
List accessible projects for a current user
Response
Returns [RMProject!]!
Example
Query
query rmListProjects {
rmListProjects {
id
name
description
shared
global
createTime
creator
projectPermissions
resourceTypes {
...RMResourceTypeFragment
}
}
}
Response
{
"data": {
"rmListProjects": [
{
"id": "<id>",
"name": "<string>",
"description": "<string>",
"shared": "<boolean>",
"global": "<boolean>",
"createTime": "<datetime>",
"creator": "<string>",
"projectPermissions": ["<string>"],
"resourceTypes": [RMResourceType]
}
]
}
}
rmListResources
Description
Returns resources in the specified project and folder. If folder is not specified, returns resources in the root folder
Response
Returns [RMResource!]!
Example
Query
query rmListResources(
$projectId: String!,
$folder: String,
$nameMask: String,
$readProperties: Boolean,
$readHistory: Boolean
) {
rmListResources(
projectId: $projectId,
folder: $folder,
nameMask: $nameMask,
readProperties: $readProperties,
readHistory: $readHistory
) {
name
folder
length
properties
}
}
Variables
{
"projectId": "<string>",
"folder": "<string>",
"nameMask": "<string>",
"readProperties": "<boolean>",
"readHistory": "<boolean>"
}
Response
{
"data": {
"rmListResources": [
{
"name": "<string>",
"folder": "<boolean>",
"length": "<int>",
"properties": "<object>"
}
]
}
}
rmListSubjectProjectsPermissionGrants
Description
Returns all project grants bysubjectId. Can be read only by users with admin permissions
Response
Returns [AdminObjectGrantInfo!]!
Arguments
| Name | Description |
|---|---|
subjectId - String!
|
Example
Query
query rmListSubjectProjectsPermissionGrants($subjectId: String!) {
rmListSubjectProjectsPermissionGrants(subjectId: $subjectId) {
subjectId
subjectType
objectPermissions {
...AdminObjectPermissionsFragment
}
}
}
Variables
{"subjectId": "<string>"}
Response
{
"data": {
"rmListSubjectProjectsPermissionGrants": [
{
"subjectId": "<id>",
"subjectType": "user",
"objectPermissions": AdminObjectPermissions
}
]
}
}
rmProject
Description
Returns project information by projectId
Response
Returns an RMProject!
Arguments
| Name | Description |
|---|---|
projectId - String!
|
Example
Query
query rmProject($projectId: String!) {
rmProject(projectId: $projectId) {
id
name
description
shared
global
createTime
creator
projectPermissions
resourceTypes {
...RMResourceTypeFragment
}
}
}
Variables
{"projectId": "<string>"}
Response
{
"data": {
"rmProject": {
"id": "<id>",
"name": "<string>",
"description": "<string>",
"shared": "<boolean>",
"global": "<boolean>",
"createTime": "<datetime>",
"creator": "<string>",
"projectPermissions": ["<string>"],
"resourceTypes": [RMResourceType]
}
}
}
rmReadResourceAsString
Description
Reads resource contents as string in UTF-8
Example
Query
query rmReadResourceAsString(
$projectId: String!,
$resourcePath: String!
) {
rmReadResourceAsString(
projectId: $projectId,
resourcePath: $resourcePath
)
}
Variables
{"projectId": "<string>", "resourcePath": "<string>"}
Response
{
"data": {
"rmReadResourceAsString": "<string>"
}
}
Mutations
rmAddProjectsPermissions
Description
Adds project permissions to the specified projects based on subject IDs and permissions. Returns true if permissions were added successfully.
Response
Returns a Boolean
Arguments
| Name | Description |
|---|---|
projectIds - [ID!]!
|
|
subjectIds - [ID!]!
|
|
permissions - [String!]!
|
Example
Query
mutation rmAddProjectsPermissions(
$projectIds: [ID!]!,
$subjectIds: [ID!]!,
$permissions: [String!]!
) {
rmAddProjectsPermissions(
projectIds: $projectIds,
subjectIds: $subjectIds,
permissions: $permissions
)
}
Variables
{"projectIds": "<id>", "subjectIds": "<id>", "permissions": "<string>"}
Response
{
"data": {
"rmAddProjectsPermissions": "<boolean>"
}
}
rmCreateProject
Description
Creates a new project with the specified projectId and projectName.
Response
Returns an RMProject!
Example
Query
mutation rmCreateProject(
$projectId: ID,
$projectName: String!,
$description: String
) {
rmCreateProject(
projectId: $projectId,
projectName: $projectName,
description: $description
) {
id
name
description
shared
global
createTime
creator
projectPermissions
resourceTypes {
...RMResourceTypeFragment
}
}
}
Variables
{"projectId": "<id>", "projectName": "<string>", "description": "<string>"}
Response
{
"data": {
"rmCreateProject": {
"id": "<id>",
"name": "<string>",
"description": "<string>",
"shared": "<boolean>",
"global": "<boolean>",
"createTime": "<datetime>",
"creator": "<string>",
"projectPermissions": ["<string>"],
"resourceTypes": [RMResourceType]
}
}
}
rmCreateResource
Description
Creates a new resource in the specified project and folder. If isFolder is true then creates a folder, otherwise creates a file
Response
Returns a String!
Example
Query
mutation rmCreateResource(
$projectId: String!,
$resourcePath: String!,
$isFolder: Boolean!
) {
rmCreateResource(
projectId: $projectId,
resourcePath: $resourcePath,
isFolder: $isFolder
)
}
Variables
{"projectId": "<string>", "resourcePath": "<string>", "isFolder": "<boolean>"}
Response
{"data": {"rmCreateResource": "<string>"}}
rmDeleteProject
Description
Deletes project by projectId. Returns true if project was deleted, false if project not found
rmDeleteProjectsPermissions
Description
Deletes project permissions from the specified projects based on subject IDs and permissions. Returns true if permissions were deleted successfully.
Response
Returns a Boolean
Arguments
| Name | Description |
|---|---|
projectIds - [ID!]!
|
|
subjectIds - [ID!]!
|
|
permissions - [String!]!
|
Example
Query
mutation rmDeleteProjectsPermissions(
$projectIds: [ID!]!,
$subjectIds: [ID!]!,
$permissions: [String!]!
) {
rmDeleteProjectsPermissions(
projectIds: $projectIds,
subjectIds: $subjectIds,
permissions: $permissions
)
}
Variables
{"projectIds": "<id>", "subjectIds": "<id>", "permissions": "<string>"}
Response
{
"data": {
"rmDeleteProjectsPermissions": "<boolean>"
}
}
rmDeleteResource
Description
Deletes resource by path in the specified project. If recursive is true then deletes all sub-resources in the folder
Response
Returns a Boolean
Example
Query
mutation rmDeleteResource(
$projectId: String!,
$resourcePath: String!,
$recursive: Boolean!
) {
rmDeleteResource(
projectId: $projectId,
resourcePath: $resourcePath,
recursive: $recursive
)
}
Variables
{"projectId": "<string>", "resourcePath": "<string>", "recursive": "<boolean>"}
Response
{"data": {"rmDeleteResource": "<boolean>"}}
rmMoveResource
Description
Moves resource to the specified new path in the same project. Can be used to rename a resource
Response
Returns a String!
Example
Query
mutation rmMoveResource(
$projectId: String!,
$oldResourcePath: String!,
$newResourcePath: String
) {
rmMoveResource(
projectId: $projectId,
oldResourcePath: $oldResourcePath,
newResourcePath: $newResourcePath
)
}
Variables
{
"projectId": "<string>",
"oldResourcePath": "<string>",
"newResourcePath": "<string>"
}
Response
{"data": {"rmMoveResource": "<string>"}}
rmSetProjectPermissions
Response
Returns a Boolean!
Arguments
| Name | Description |
|---|---|
projectId - String!
|
|
permissions - [RMSubjectProjectPermissions!]!
|
Example
Query
mutation rmSetProjectPermissions(
$projectId: String!,
$permissions: [RMSubjectProjectPermissions!]!
) {
rmSetProjectPermissions(
projectId: $projectId,
permissions: $permissions
)
}
Variables
{
"projectId": "<string>",
"permissions": [RMSubjectProjectPermissions]
}
Response
{
"data": {
"rmSetProjectPermissions": "<boolean>"
}
}
rmSetResourceProperty
Description
Sets resource property by name. If value is null then removes the property (e.g., sets relation between resource and connection).
Response
Returns a Boolean!
Example
Query
mutation rmSetResourceProperty(
$projectId: String!,
$resourcePath: String!,
$name: ID!,
$value: String
) {
rmSetResourceProperty(
projectId: $projectId,
resourcePath: $resourcePath,
name: $name,
value: $value
)
}
Variables
{
"projectId": "<string>",
"resourcePath": "<string>",
"name": "<id>",
"value": "<string>"
}
Response
{
"data": {
"rmSetResourceProperty": "<boolean>"
}
}
rmSetSubjectProjectPermissions
Response
Returns a Boolean!
Arguments
| Name | Description |
|---|---|
subjectId - String!
|
|
permissions - [RMProjectPermissions!]!
|
Example
Query
mutation rmSetSubjectProjectPermissions(
$subjectId: String!,
$permissions: [RMProjectPermissions!]!
) {
rmSetSubjectProjectPermissions(
subjectId: $subjectId,
permissions: $permissions
)
}
Variables
{
"subjectId": "<string>",
"permissions": [RMProjectPermissions]
}
Response
{
"data": {
"rmSetSubjectProjectPermissions": "<boolean>"
}
}
rmUpdateProject
Description
Updates project with the specified projectId. If projectName is not specified then does not change it.
Response
Returns an RMProject!
Example
Query
mutation rmUpdateProject(
$projectId: ID!,
$projectName: String,
$description: String
) {
rmUpdateProject(
projectId: $projectId,
projectName: $projectName,
description: $description
) {
id
name
description
shared
global
createTime
creator
projectPermissions
resourceTypes {
...RMResourceTypeFragment
}
}
}
Variables
{"projectId": "<id>", "projectName": "<string>", "description": "<string>"}
Response
{
"data": {
"rmUpdateProject": {
"id": "<id>",
"name": "<string>",
"description": "<string>",
"shared": "<boolean>",
"global": "<boolean>",
"createTime": "<datetime>",
"creator": "<string>",
"projectPermissions": ["<string>"],
"resourceTypes": [RMResourceType]
}
}
}
rmWriteResourceStringContent
Description
Writes string content to the resource. If forceOverwrite is true then overwrites existing resource, otherwise throws an error if resource already exists
Response
Returns a String!
Example
Query
mutation rmWriteResourceStringContent(
$projectId: String!,
$resourcePath: String!,
$data: String!,
$forceOverwrite: Boolean!
) {
rmWriteResourceStringContent(
projectId: $projectId,
resourcePath: $resourcePath,
data: $data,
forceOverwrite: $forceOverwrite
)
}
Variables
{
"projectId": "<string>",
"resourcePath": "<string>",
"data": "<string>",
"forceOverwrite": "<boolean>"
}
Response
{
"data": {
"rmWriteResourceStringContent": "<string>"
}
}
Types
AdminObjectGrantInfo
Description
Information about a subject's (user or team) permissions on an object
Fields
| Field Name | Description |
|---|---|
subjectId - ID!
|
Subject identifier (user or team) |
subjectType - AdminSubjectType!
|
Subject type (user or team) |
objectPermissions - AdminObjectPermissions!
|
Subject permissions on the object |
Example
{
"subjectId": "<id>",
"subjectType": "user",
"objectPermissions": AdminObjectPermissions
}
AdminObjectPermissions
Description
Set of permissions assigned to an object
Fields
| Field Name | Description |
|---|---|
objectId - ID!
|
Object identifier |
permissions - [String!]!
|
List of permissions for the object |
Example
{"objectId": "<id>", "permissions": ["<string>"]}
AdminPermissionInfo
Description
Information about a permission
Example
{
"id": "<id>",
"label": "<string>",
"description": "<string>",
"provider": "<string>",
"category": "<string>"
}
AdminSubjectType
Description
Describes the type of the administrative subject (user or team)
Values
| Enum Value | Description |
|---|---|
|
|
User |
|
|
Team |
Example
"user"
Boolean
Description
The Boolean scalar type represents true or false.
Example
"<boolean>"
DateTime
Description
Date/Time
Example
"<datetime>"
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>"
RMProject
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
name - String!
|
|
description - String
|
|
shared - Boolean!
|
|
global - Boolean!
|
|
createTime - DateTime!
|
|
creator - String!
|
|
projectPermissions - [String!]!
|
|
resourceTypes - [RMResourceType!]!
|
Example
{
"id": "<id>",
"name": "<string>",
"description": "<string>",
"shared": "<boolean>",
"global": "<boolean>",
"createTime": "<datetime>",
"creator": "<string>",
"projectPermissions": ["<string>"],
"resourceTypes": [RMResourceType]
}
RMProjectPermissions
Fields
| Input Field | Description |
|---|---|
projectId - String!
|
|
permissions - [String!]!
|
Example
{"projectId": "<string>", "permissions": ["<string>"]}
RMResource
RMResourceType
Fields
| Field Name | Description |
|---|---|
id - String!
|
|
displayName - String!
|
|
icon - String
|
|
fileExtensions - [String!]!
|
|
rootFolder - String
|
Example
{
"id": "<string>",
"displayName": "<string>",
"icon": "<string>",
"fileExtensions": ["<string>"],
"rootFolder": "<string>"
}
RMSubjectProjectPermissions
Fields
| Input Field | Description |
|---|---|
subjectId - String!
|
|
permissions - [String!]!
|
Example
{"subjectId": "<string>", "permissions": ["<string>"]}
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>"