Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,714
Community Members
 
Community Events
168
Community Groups

api request error status:404, statusText:Not Found

Edited
Hi.
I am using forge api to get infomation about creen schemes in Forge custom UI development.
With the code below, I get error code 404, status text says 'Not Found'.
let paramStr = '';
if (screenSchemeIds.length < 2) {
    paramStr = screenSchemeIds[0];
} else {
    paramStr = screenSchemeIds.join('&id=');
}
// paramStr should be like '10004&id=10005'

// getting new screen schemes based on the parameters defined above
const screenResponse = await api.asApp().requestJira(route`/rest/api/3/screenscheme?id=${paramStr}`, {
    headers: {
        'Accept': 'application/json'
    }
});

return screenResponse.status + screenResponse.statusText;
When I just hard-code like the code below, I receive an expected result.
const screenResponse = await api.asApp().requestJira(route`/rest/api/3/screenscheme?id=10004&id=10005`, {
    headers: {
        'Accept': 'application/json'
    }
});

return screenResponse.status + screenResponse.statusText;
Could anyone tell me how to fix the first code?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS

Atlassian Community Events