Hello, I need to create GenerateAccessToken by use...
# troubleshoot
j
Hello, I need to create GenerateAccessToken by use GraphiQL in datahub and use on OpenAPI follow command below
_mutation_ {
createAccessToken(input: {type: PERSONAL, actorUrn: "urn:li:corpuser:datahub", duration: ONE_HOUR, name: "my personal token"}) {
accessToken
metadata {
id
name
description
}
}
}
and
curl --location --request POST '<http://localhost:8080/api/graphql>' \
--header 'X-DataHub-Actor: urn:li:corpuser:datahub' \
--header 'Content-Type: application/json' \
--data-raw '{ "query":"{ createAccessToken(input: { type: PERSONAL, actorUrn: \"urn:li:corpuser:datahub\", duration: ONE_HOUR, name: \"my personal token\" } ) { accessToken metadata { id name description} } }", "variables":{}}'
but it not working follow this picture. please suggest me about how to create GenerateAccessToken by use GraphiQL and OpenAPI Thanks in advance!
b
hey there! what version of datahub are you using? it looks like your graphql mutation in the GraphiQL interface is correctly formed
j
I use datahub version v0.8.35
b
could you try upgrading datahub and try again? I believe you're on a version where this endpoint isn't actually defined in the backend yet!
j
Ho thank bro!, It working when update a new version.
b
great to hear!