Content
Project API for custom fields
Hello,
I'm wondering if there is any way to get value of custom fields for Project through API?
According to API that I found, currently it's impossible to get custom fields for Projects: http://docs.openproject.org/apiv3-doc/#projects. Compare to API for Work Packages where we can get this information (will be attached to `_links` object).
Is there any plan to support this?
Hi Alex,
for Q1/Q2 2019 we plan an API for custom fields that allows you to CRUD custom fields.
Does this help?
Best
Niels
Hi, Niels
Yes, this is exactly what I want! Thank you for prompt reply
Sincerely, Alex
Any news about that? These apis are not available yet
Niels Lindenthal wrote:
Hi Alex,
for Q1/Q2 2019 we plan an API for custom fields that allows you to CRUD custom fields.
Does this help?
Best
Niels
Hi Christian,
yes, there were some other feature prioritized. There are good chances that we will implement it as part of 12.0 (Q3 2021). It is a co-sponsorship with Deutsche Bahn.
Best
Niels
Hello,
Any news guys please about this ?
Best regards
Uzumaki Bey wrote:
Hello,
Any news guys please about this ?
Best regards
As of now in API/v3,
If you have custom fields like feeding the input directly (Example: Date, Text, Integer, etc.), you can use the custom field name in the payload.
Suppose if your custom fields are lists, then you should know the custom field name and each custom option ID.
I hope it will help you.
//To Map custom Option with it's ID
const customOptionsIdMap = {
"XXX": 1,
"YYY": 2,
"ZZZ": 3,
};
//Direct Input
payload["customField1"] = "Input";
//DropDown Input or List
payload["customField2"] = {
href: "/api/v3/custom_options/" + customOptionsIdMap[XXX],
};