GetProjectFieldConfig - Get project custom field configurations

Updated at:

Applicable editions

Central edition, Region edition

Endpoints and authorization information

  • Get the endpoint: Replace {domain} in the API request syntax.
  • Obtain a personal access token。
  • Obtain an organization ID:Required only for the Central edition. Go to theorganization management consoleand obtain the organization ID from thebasic informationpage.

Product

Resource

Required permission

Project Collaboration

Project

Read-only

Request syntax

Central edition

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

Region edition

GET https://{domain}/oapi/v1/projex/projects/{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

Unique project identifier.

589c53d622cc8521793e08****

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}/projects/589c53d622cc8521793e08****/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/projects/589c53d622cc8521793e08****/fields' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

The fields configured for the current project. For built-in fields such as name, description, customCode, scope, and status, see UpdateProject.

className

string

The value type, such as string, user, date, dateTime, int, or float.

date

defaultValue

string

The default value.

test

description

string

Description.

test

format

string

The field format, such as input, list, or multiList. For the write protocol, see UpdateProject.

input

id

string

Field ID.

id

name

string

Name.

test

options

array

The available option value.

-

object

The available option value.

displayValue

string

The display value of the option.

Test

id

string

ID.

1

value

string

The available option value.

Test

valueEn

string

The English value of the option.

test

required

boolean

Whether the field is required.

true

type

string

The field category. For example, NativeField indicates a system field and CustomField indicates a user-defined field.

NativeField

Response example

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

Error codes

Visit the Error Code Center to view API error codes.