Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. List custom field value via API

List custom field value via API

Added by Zsombor Varga 3 months ago

Hi!

I've a List type custom field.

Is there a way to list theese values via API?

I didn't find a resource for this.


Thanks

Zsombor


Replies (2)

RE: List custom field value via API - Added by Alexander Stock 3 months ago

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:

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.

Please find the complete guide here:
https://www.openproject.org/docs/api/endpoints/work-packages/

Best,

Alexander

RE: List custom field value via API - Added by Zsombor Varga 3 months ago

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

"customField23": {
            "title": "Google",
            "href": "/api/v3/custom_options/187"
       }

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


  • (1 - 2/2)
Loading...