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 <a href="https://api.atlassian.com/graphql" rel="noopener noreferrer nofollow" target="_blank" data-stringify-link="https://api.atlassian.com/graphql" data-sk="tooltip_parent">https://api.atlassian.com/graphql</a> instead of
<a href="https://api.atlassian.com/graphql" rel="noopener noreferrer nofollow" target="_blank" data-stringify-link="https://api.atlassian.com/graphql" data-sk="tooltip_parent">https://api.atlassian.com/graphql</a>
https://MYINSTANCE.atlassian.net/gateway/api/graphql
it should work
Cheers,
Hermance
Thanks Hermance, unfortunately it does not change a thing.
How should the Authentication be formated?
Thanks & Best
Kornelius
@Hermance NDounga Can you share some details o n the Aut token format, or if there is anything else to consider here?
It looks like you're new here. Sign in or register to get started.