yes, you can fetch custom field data via API. Note that there are custom fields for work packages, projects, versions, groups and spent time. Hence, the endpoint to use may differ depending on which field you want to access.
Most often custom fields for work packages are used. The API guide for that endpoint includes as section for custom fields:
Using plug-ins and custom fields a work package might contain various additional properties. A client can consult the schema information to which the work package links. The schema will contain information about all properties of the linking work package, including properties added by plug-ins and custom fields.
Custom fields are identified by a key in the form of customFieldN, where N is an integer. Depending on their type, they can occur as properties or as linked properties. A client has to consult the schema to resolve the human readable name of custom fields.
I know that, the actual value of a custom field is retrievable when getting the workpackege deatils. But I need all the possible values for a custom field.
For example:
I have custom field: name: Customers; type: List; values: Microsoft, Google, Apple; id=23.
If query a workpackage detail (GET /api/v3/work_packages/{id}), then it will return the setted value
Replies (2)
Hi Zsombor,
yes, you can fetch custom field data via API. Note that there are custom fields for work packages, projects, versions, groups and spent time. Hence, the endpoint to use may differ depending on which field you want to access.
Most often custom fields for work packages are used. The API guide for that endpoint includes as section for custom fields:
Please find the complete guide here:
https://www.openproject.org/docs/api/endpoints/work-packages/
Best,
Alexander
Hi Alexander!
I know that, the actual value of a custom field is retrievable when getting the workpackege deatils. But I need all the possible values for a custom field.
For example:
I have custom field: name: Customers; type: List; values: Microsoft, Google, Apple; id=23.
If query a workpackage detail (GET /api/v3/work_packages/{id}), then it will return the setted value
Instead of this, I need an point which returns all of the values. Something like this:
GET /api/v3/custom_field_values/23 --> Microsoft, Google, Apple
Unfortunatelly I havn't find an endpoint like this.
Zsombor