hello
is there a way to get issue list only in english no matter what the account language is
for example when i call this api :
https://myinstance.atlassian.net/rest/agile/1.0/sprint/{SprintId}/issue
the shown result is in french" cause my account preference language is in french"
what i want is to get the result only in english , is there a jql or something to make that possible ?
thank you .
@hamzabouallegue,
I think the answer is explained in the REST API documentation on special headers. Specifically, use X-Force-Accept-Language = true
and send an Accept-Language
header with the desired language.
For some of the history, see: REST API localized if we use impersonated requests
2 Likes
thank you for your responce , that’s work fine with Postman
but doesn’t with AP request
AP.request({
url:`/rest/agile/1.0/sprint/sprintId/issue`,
type:'get',
contentType:"application/json",
headers:{
'X-Force-Accept-Language':true,
'Accept-Language':'en-US'
}
})
@hamzabouallegue,
Indeed. AP request has a whitelist:
An object containing headers to set; supported headers are: ‘Accept’, ‘If-Match’ and ‘If-None-Match’.
I think there are some undocumented ones too but clearly not ‘X-Force-Accept-Language’ and maybe not ‘Accept-Language’. I’ve opened a bug:
https://ecosystem.atlassian.net/browse/ACJS-1168
2 Likes