fetch("<http://localhost:9002/api/graphql>", { ...
# troubleshoot
b
fetch("http://localhost:9002/api/graphql", { method: "POST", mode: 'no-cors', headers: { Accept: "application/json", "Accept-Language": "en-US,en-IN;q=0.9,en;q=0.8", Connection: "keep-alive", "Content-Type": "application/json", Cookie: "bid=2b4f6ed8-9f12-430b-baed-7116c1493c2e; PLAY_SESSION=aad7da57762b3c827347ee24fad95efda4a03127-actor=urn%3Ali%3Acorpuser%3Adatahub&token=token; actor=urnlicorpuser:datahub", DNT: "1", Origin: "http://localhost:9002", Referer: "http://localhost:9002/api/graphiql", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36", }, body: JSON.stringify({ query: "query getDatasetDetails($urn: String!) {\n dataset(urn: $urn) {\n ...getDatasetDetailsNonRecursiveDatasetFields\n }\n}\n\nfragment getDatasetDetailsNonRecursiveDatasetFields on Dataset {\n \n\n externalRoles {\n ...getExternalRoles\n }\n}\n\nfragment getExternalRoles on ExtRoles {\n extRoles {\n extRole {\n urn\n type\n id\n properties {\n name\n type\n requestLink\n description\n }\n provisionedUsers {\n urn\n\n }\n }\n associatedUrn\n }\n}\n\n", variables: { urn: "urnlidataset:(urnlidataPlatform:oracle,oracle.foobar,PROD)", }, operationName: "getDatasetDetails", }), }) hi i am trying to run fetch command and getting 401 unauthorized
l
Hey there 👋 I'm The DataHub Community Support bot. I'm here to help make sure the community can best support you with your request. Let's double check a few things first: 1️⃣ There's a lot of good information on our docs site: www.datahubproject.io/docs, Have you searched there for a solution? Yes button 2️⃣ It's not uncommon that someone has run into your exact problem before in the community. Have you searched Slack for similar issues? Yes button
g
Hi @billowy-lock-72499 In your payload you have token=token, Did you miss to put the token here ?