Then I look up the field’s name in the names array to get the issue id, an then I get the field’s value by id from the fields object. This is working great, but there’s too much data returned and I’m trying to optimise. I only want to get 2 things from the API:
the issue attachments;
the value of the above custom field;
How can I achieve this? I tried using the fields query param, but I don’t know the field id. I tried using the key from manifest fields=attachments-metadata&fieldsByKeys=true, but that didn’t work either. I’m also not able to get only the attachment property. Any ideas? Ideally, I wouldn’t have to make extra API calls as that defeats the purpose.
You can get the field ID by first making a call to the GET fields API. Note that you need only to make it once in your app’s lifetime: you can then save that ID for future use with the Storage API.
Thanks @kkercz - I’ll make some measurements as to which is faster - making 2 calls (to storage & API) or just one big API call, which returns all the data.