ListWorkitemRelationWorkitemTypes - Get the list of work item types that can be associated with a work item

Updated at:

Applicable editions

Central edition, Region edition

Endpoint and authorization information

  • Get the endpoint: Replace {domain} in the API request syntax.
  • Get a personal access token.
  • Get organizationId: Required only for the Central edition. Go to the Basic Information page in the Organization Management console to obtain your organization ID.

Product

Resource

Required permission

Project Collaboration

Work item type

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitemTypes/{id}/relationWorkitemTypes

Region edition

GET https://{domain}/oapi/v1/projex/workitemTypes/{id}/relationWorkitemTypes

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example value

id

string

path

Yes

Unique identifier of the work item type.

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The organization ID.

relationType

string

query

No

Relation type. Valid values: PARENT (parent item), SUB (subkey), ASSOCIATED (associated item), DEPEND_ON (dependency), and DEPENDED_BY (dependent item).

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitemTypes/{id}/relationWorkitemTypes?relationType={relationType}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/workitemTypes/{id}/relationWorkitemTypes?relationType={relationType}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

relationType

string

Relation type. Valid values: PARENT (parent item), SUB (subkey), ASSOCIATED (associated item), DEPEND_ON (dependency), and DEPENDED_BY (dependent item).

ASSOCIATED

workitemTypeList

array

List of work item types that can be associated.

-

object

addUser

object

id

string

User ID.

674d96abd497cd558d68****

name

string

Name.

name-xxx

categoryId

string

Unique identifier of the category, such as Req, Task, or Bug.

Req

creator

object

id

string

User ID.

674d96abd497cd558d68****

name

string

Name.

name-xxx

defaultType

boolean

Indicates whether this is the default type.

true

description

string

Type description.

Type description

enable

boolean

Indicates whether the type is enabled.

true

gmtAdd

string

Time when the type was added.

gmtCreate

string

Time when the type was created.

id

string

Unique identifier of the work item type.

bca48ee2a0976d38f48****

name

string

Type name.

Technical Requirements

nameEn

string

English type name.

Technical Requirements

systemDefault

boolean

Indicates whether this is a system default type.

true

Response example

[
    {
        "relationType": "ASSOCIATED",
        "workitemTypeList": [
            {
                "addUser": {
                    "id": "674d96abd497cd558d68****",
                    "name": "name-xxx"
                },
                "categoryId": "Req",
                "creator": {
                    "id": "674d96abd497cd558d68****",
                    "name": "name-xxx"
                },
                "defaultType": true,
                "description": "Type description",
                "enable": true,
                "gmtAdd": "",
                "gmtCreate": "",
                "id": "bca48ee2a0976d38f48****",
                "name": "Technical Requirements",
                "nameEn": "Technical Requirements",
                "systemDefault": true
            }
        ]
    }
]

Error codes

For API error codes, see Error Code Center.