How to retrieve structure calculated fields using REST via CURL

tracker - Colin Draper April 15, 2021

I am calling the REST API for structure from a CURL based application.  I can get the forest and decode the references(formula), but when I want to retrieve values I am hitting a dead-end.

 

The /value POST method allows the specification of the id and type to be returned, the examples work fine, but I cannot figure how to retrieve a custom/calculated field.  I tried customfield_nnnnnn or just the number or even the display name, but all just return zero.

 

The documentation mentions this in the JAVA section, but not for regular REST

 

Is it possible?

1 answer

0 votes
Stepan Kholodov _ALM Works_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 19, 2021

Hello Colin,

Since we don't know all the details of what you're trying to achieve to recommend anything certain, here are some tips that can be useful:

- The value method works only in Structure versions 5.6.4 and older. If you have Structure 6.0+ you need to use the attribute subscription method. You can learn more about it in our documentation: https://wiki.almworks.com/display/structure/Attribute+Subscription+Resource
- A request for retrieving a custom field values itself should look like this: {"id":"customfield","params":{"fieldId":XXXXXX},"format":"text"} 

so you only need to change the fieldId numbers to appropriate digits of your custom field's id.

I hope this helps. If you need further assistance with this, please feel free to contact us directly at support.almworks.com and we'll get back to you shortly.

Best regards,
Stepan Kholodov
ALM Works

Suggest an answer

Log in or Sign up to answer