I would like to use data from this Jira API /rest/navigation/2/project/ in my forge app.
I was wondering if you can invoke this API using requestJira(…) like in this sample:
import api, { route } from "@forge/api";
...
const url = route`/rest/navigation/2/project/MYPROJ?exclude=webItems.reports,webItems.home,webItems.gin`;
const response = await api.asUser().requestJira(url, {
headers: {
Accept: "application/json",
},
});
const result = await response.json();
When I try to do that, I am allways getting this error message and I cannot figure out what might be wrong:
‘OAuth 2.0 is not enabled for method: GET /rest/navigation/2/project/MYPROJ’
Calling this REST API outside of my forge app works as expected.
Does anyone know how to call this API propperly?
Other api calls using requestJira(…) work as expected within forge.
Any help would be much apprechiated