Datatype mismatch between Jira expression and Rest API, can we expect numbers for IDs ?

julien December 4, 2019

Looking at the Jira Cloud Rest API, some of resource ids are defined as string (eg: Project.id, Version.id, Issue.id...).

Now, if I look at the Jira Expression Types, same fields are defined as number.

Can I expect always having a number converted to a string in the Rest API responses ? (in other words, can I safely cast these strings to numbers ?)

This mismatch exists also inside the Rest API, because some "reference" fields are defined as number (eg: Component.projectId, Version.projectId)

The same mismatch exists in Jira Server, where the Jira Server Rest API defines string for entity ids, but if you access entity from the managers in java, internal datatypes are numbers...

1 answer

0 votes
julien December 4, 2019

Suggest an answer

Log in or Sign up to answer