AddPipelineRelations - Add pipeline associations

Updated at:

Adds resource associations to a specified pipeline through the OpenAPI.

Applicable editions

Central edition, Region edition

Endpoints and authorization information

  • Obtain the endpoint: Replace {domain} in the API request syntax.

  • Obtain a personal access token.

  • Obtain organizationId: Required for Central edition only. Go to the Basic Information page in the Organization Management console to obtain your organization ID.

Product

Resource

Required permission

Pipeline

Pipeline

Read and write

Request syntax

Central edition

POST https://{domain}/oapi/v1/flow/organizations/{organizationId}/pipelines/{pipelineId}/pipelineObjRel/add

Region edition

POST https://{domain}/oapi/v1/flow/pipelines/{pipelineId}/pipelineObjRel/add

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

The personal access token for authentication.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The organization ID.

5ebbc0228123212b59xxxxx

pipelineId

string

path

Yes

The pipeline ID.

123

relObjectType

string

query

Yes

The type of resource to associate. Only VARIABLE_GROUP is supported.

VARIABLE_GROUP

relObjectIds

string

query

Yes

The IDs of the resources to associate. Only variable group IDs are supported. Separate multiple IDs with commas.

11,22

Request examples

Central edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/pipelines/123/pipelineObjRel/add?relObjectType=VARIABLE_GROUP&relObjectIds=11,22' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/flow/pipelines/123/pipelineObjRel/add?relObjectType=VARIABLE_GROUP&relObjectIds=11,22' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

boolean

Indicates whether the operation was successful.

true

Response example

true

Error codes

For API error codes, see Error Code Center.