Using the Cloud Rest API 3 are id number or string

Hi dear reader (especially if you’re Atlassian staff),

I’m wonder why there is no common type definition around ids.

Some services are returning them as number, some other as string. (Even when referring to same object).

Is there a move toward one or the other ?

Why this is bad, you might ask. I’m using Forge and was naively thinking that all ids were strings. I had the case lately where I expected a string, it returned a number but javascript runtime doesn’t care except if you do comparison with ===

Don’t answer this thread if your sole argument is javascript is laaaaame, please.

Looking forward for your comment on this, again especially if you are staff

Magnus

All ids should be strings. If an id is a number, open a bug report with Atlassian.

Hi @MagnusAnderssen. Which method are you calling, and which value in the payload are you referring to?

Which method are you calling, and which value in the payload are you referring to?

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-field-configurations/#api-rest-api-3-fieldconfiguration-get

The id is a number but in the other services, the field configurations are referred as strings.

Also, some of the screen related APIs are returning numbers instead of strings