Help Center/ DataArts Studio/ API Reference/ DataArts Security APIs/ Queue Permissions/ Querying Queues Allocated to the Current Workspace
Updated on 2025-11-17 GMT+08:00

Querying Queues Allocated to the Current Workspace

Function

This API is used to query the queues allocated to the current workspace.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/security/permission/queue/assigned-source

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Project ID and Account ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

String

Queue type, which can be MRS or DLI.

cluster_id

No

String

Cluster ID. For details about how to obtain the cluster ID, see Querying Information About a Single Data Connection.

limit

No

Integer

Number of items displayed on each page

offset

No

Integer

Offset, which is the position where the query starts. The value must be greater than or equal to 0.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

workspace

Yes

String

Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID.

X-Auth-Token

Yes

String

IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header). This parameter is mandatory for token authentication.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

project_id

String

Project ID

queue_sources

Array of QueueSrcAssignEntity objects

Queue resources

Table 5 QueueSrcAssignEntity

Parameter

Type

Description

id

String

Queue ID

source_type

String

Service providing queues

queue_name

String

Queue name

queue_type

String

Enumerates the queue types.

queue_attr

Integer

Queue attribute. Value 0 indicates the default queue, 1 indicates a real-time queue, and 2 indicates an offline queue. This parameter is available only for Yarn queues.

conn_id

String

Data connection ID

conn_name

String

Data connection name

cluster_id

String

Cluster ID

cluster_name

String

Cluster name.

create_time

Long

Time when the queue was added to the current workspace

create_user

String

User who added the queue to the current workspace

update_time

Long

Update time of the queues in the current workspace

update_user

String

User who updates the queues in the current workspace

project_id

String

Project ID

description

String

Description of the queue allocated to the current workspace

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

None

Example Responses

Status code: 200

OK

{
  "project_id" : "0833a5737480d53b2f25c010dc1a7b88-workspace-f7bc8f2a71524d268c4293974e3dc35b",
  "queue_sources" : [ {
    "cluster_id" : "ec26b187-626a-4e89-bd1f-6824fbcfb2b6",
    "cluster_name" : "mrs_noauth_autotest_do_not_del",
    "conn_id" : "8e2bd0e9aa24401ea1a8edf83cd50323",
    "conn_name" : "ranger_0324_noauth",
    "create_time" : 1711424611000,
    "create_user" : "ei_dayu_xxxx_01",
    "description" : "",
    "id" : "0412bf3bf03f42689c6a02d93ff8f306",
    "project_id" : "0833a5737480d53b2f25c010dc1a7b88-workspace-f7bc8f2a71524d268c4293974e3dc35b",
    "queue_attr" : 0,
    "queue_name" : "root.default",
    "queue_type" : "yarn",
    "source_type" : "mrs",
    "update_time" : null,
    "update_user" : null
  } ]
}

Status Codes

Status Code

Description

200

OK

400

Bad Request