Help Center/ CodeArts Pipeline/ API Reference/ API/ Pipeline Management/ Querying Pipeline Permissions of a User
Updated on 2025-12-04 GMT+08:00

Querying Pipeline Permissions of a User

Function

This API is used to query whether the current user has the permissions to edit and execute pipelines based on the tenant ID.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{tenant_id}/api/pipelines/check-rights

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

tenant_id

Yes

String

Definition:

Tenant ID, that is, domain ID of a user.

Constraints:

N/A

Value range:

The value consists of 32 characters, including only digits and letters.

Default value:

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

resourceIds

No

Array of strings

Definition:

Authentication success list.

Value range:

N/A

resourceType

No

String

Definition:

Pipeline authentication resource type.

Range:

  • create: permission to create a pipeline.

  • delete: permission to delete a pipeline.

  • update: permission to update a pipeline.

  • read: permission to query a pipeline.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

query

Boolean

Definition:

Whether the query permission is granted.

Range:

  • true: The query permission is granted.

  • false: The query permission is not granted.

update

Boolean

Definition:

Whether the edit permission is granted.

Range:

  • true: The edit permission is granted.

  • false: The edit permission is not granted.

execute

Boolean

Definition:

Whether the execute permission is granted.

Range:

  • true: The execute permission is granted.

  • false: The execute permission is not granted.

delete

Boolean

Definition:

Whether the delete permission is granted.

Range:

  • true: The delete permission is granted.

  • false: The delete permission is not granted.

banned

Boolean

Definition:

Whether the disable permission is granted.

Range:

  • true: The disable permission is granted.

  • false: The disable permission is not granted.

copy

Boolean

Definition:

Whether the clone permission is granted.

Range:

  • true: The clone permission is granted.

  • false: The clone permission is not granted.

authorize

Boolean

Definition:

Whether the authorization permission is granted.

Range:

  • true: The authorization permission is granted.

  • false: The authorization permission is not granted.

tag

Boolean

Definition:

Whether the tag permission is granted.

Range:

  • true: The tag permission is granted.

  • false: The tag permission is not granted.

Example Requests

POST https://{endpoint}/v5/{tenant_id}/api/pipelines/check-rights

{
  "resource_ids" : [ "139953f68ab9419b864f7bfa8091894d" ],
  "resource_type" : "pipeline"
}

Example Responses

Status code: 200

OK

[ {
  "139953f68ab9419b864f7bfa8091894d" : {
    "query" : true,
    "update" : true,
    "execute" : true,
    "delete" : true,
    "banned" : true,
    "copy" : true,
    "authorize" : true,
    "tag" : true,
    "manual_release" : false
  }
} ]

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.