GetProjectTemplateFieldConfig - Get project template field configuration

Updated at:

Retrieves the field configuration of a specified project template.

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 for Central edition only. Go to the Basic Information page in the Organization Management console to obtain your organization ID.

Product

Resource

Required permission

Project Collaboration

Project template

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/projectTemplates/{id}/fields

Region edition

GET https://{domain}/oapi/v1/projex/projectTemplates/{id}/fields

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

Project template ID.

a5c253d622cc8521793e08****

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

Organization ID.

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/projectTemplates/a5c253d622cc8521793e08****/fields' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/projectTemplates/a5c253d622cc8521793e08****/fields' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

defaultValue

string

Default value.

test

description

string

Description.

test

id

string

Field ID.

id

name

string

Name.

test

options

array

Available options for this field.

-

object

Available options for this field.

displayValue

string

Display value of the option.

Test

id

string

ID.

1

value

string

Option value.

Test

valueEn

string

English option value.

test

required

boolean

Indicates whether this field is required.

true

type

string

Field type. Differentiates between system fields (NativeField) and user-defined fields (CustomField).

NativeField

Response example

[
    {
        "defaultValue": "test",
        "description": "test",
        "id": "id",
        "name": "test",
        "options": [
            {
                "displayValue": "test",
                "id": "1",
                "value": "test",
                "valueEn": "test"
            }
        ],
        "required": true,
        "type": "NativeField"
    }
]

Error codes

For API error codes, see Error Code Center.