Is there any sample codes available to understand how to use GraphQL Atlassian JIRA APIs with Python? REST APIs have good documentation on how to use those with various programming languages.
I could find only this link which does not give many details
https://developer.atlassian.com/platform/atlassian-graphql-api/graphql/#examples
Don't know if you're still looking for this, but here's an example of a query in a python class:
import requestsimport osimport json
class AtlassianApi: username = os.getenv("JIRA_API_USERNAME") token = os.getenv("JIRA_API_TOKEN") gql_host = "https://api.atlassian.com/graphql" def graphql_call(self): graphql_query = """[your query here]""" response = requests.post(url=self.gql_host, auth=(self.username, self.token), json={'query': graphql_query}) return response
Hope this helps in case anyone stumbles on this.
You are amazing.
Hi @Stephan Brown , with your code, don't we need to pass the XRAY TOKEN to call the graphql APIs?
It looks like you're new here. Sign in or register to get started.