Hi,
I want to build an export for insights from JPD, given the product does not offer any method of it. I found it hard to leverage the graphql API but managed to put together the components in GraphQL explorer.
Now trying this in a node app, I get the error:
Auth category: UNAUTHENTICATED is not allowed in service polaris
This is how I put together the request:
I also copy the token from https://id.atlassian.com/manage-profile/security/api-tokens
const response = await fetch('https://MYINSTANCE.atlassian.net/gateway/api/graphql', {
method: 'POST',
headers: {
Authorization:'TOKENcopiedFROM-https://id.atlassian.com/manage-profile/security/api-tokens',
'Content-Type': 'application/json',
'X-ExperimentalApi':'polaris-v0',
},
body: JSON.stringify({
query: `query myquery {
polarisInsights(project: "ari:cloud:jira:MYCLOUDID:project/PROJECTID",
container:"ari:cloud:jira:MYCLOUDID:issue/`+id+`") {
id
}
}`
}),
});
Not sure about the Token format, but from what I found this would be it.
I appreachiate any help!
I found the solution. Unfortunately the documentation is really bad for this. With the help from the support team i figured the resolution:
First, the domain you use does not matter.
'Authorization':"Basic InserTokenHere"
your@emailaddress.com:MYTOKEN-copied-from-https://id.atlassian.com/manage-profile/security/api-tokens
Hello can you please try using this URL https://api.atlassian.com/graphql
instead of
https://MYINSTANCE.atlassian.net/gateway/api/graphql
it should work :)
Cheers,
Hermance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Hermance NDounga Can you share some details o n the Aut token format, or if there is anything else to consider here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.