How do I get the Tasklist GraphQL schema from Camunda SaaS?

Nicholas: Hi, I’m trying to get the graphql schema for the Tasklist API using Camunda Cloud, but the request just seems to go on until timeout.

  1. I’ve set up a Client with Zeebe and Tasklist permissions.
  2. I’ve used the keys to obtain an jwt.
  3. Using that jwt to request the schema from:
    https://dsm-1.tasklist.camunda.io/<MY_CLUSTER_ID>/graphql
  4. Tried with and without a body:
{"query": "{tasks(query:{}){name}}"}
  1. Tried POST and GET.
  2. Header is application/json

Anyone who can help me?

Vinicius Goulart: Hi Nicolas, are you following this tutorial? https://docs.camunda.io/docs/apis-clients/tasklist-api/tasklist-api-overview/

Nicholas: Yes I am

Nicholas: When I remove the Authorization header, the API returns this.

Nicholas: And when I add the Authorization header again

Authorization: Bearer &lt;MY_JWT&gt;

It just spins forever. Regardless of what I put in the body. I’ve tried to replicate using the headers from the tasklist GUI in Camunda, but no luck.

Vinicius Goulart: I saw that you posted the URL https://dsm-1.tasklist.camunda.io/<MY_CLUSTER_ID>/graphql
could you try <https://dsm-1.tasklist.camunda.io:443/>&lt;MY_CLUSTER_ID&gt;/graphql

Nicholas: Yes I’ve tried that as well. Same problem

svetlana.dorokhova: Hi, are you sure you are not trying to use Operate token for Tasklist? (We have a bug issue, that in such case Graphql API would not return the proper error message, but rather will go in infinite redirects) The application is defined by audience field when creating the token.

Nicholas: my audience is: http://zeebe.camunda.io|zeebe.camunda.io

Nicholas: is that wrong ?

svetlana.dorokhova: try <http://tasklist.camunda.io|tasklist.camunda.io> please

svetlana.dorokhova:

{
  "client_id": "&lt;client-id&gt;",
  "client_secret": "&lt;client-secret&gt;",
  "audience": "<http://tasklist.camunda.io|tasklist.camunda.io>",
  "grant_type": "client_credentials"
}

Nicholas: That worked. Thank you!

Note: This post was generated by Slack Archivist from a conversation in the Camunda Platform 8 Slack, a source of valuable discussions on Camunda 8 (get an invite). Someone in the Slack thought this was worth sharing!

If this post answered a question for you, hit the Like button - we use that to assess which posts to put into docs.