Finale Knowledge Base

Getting Started with GraphQL

Before you get started, familiarize yourself with GraphQL concepts. We are constantly working on expanding our GraphQL API’s capabilities, and we will be designing future features using GraphQL with these concepts in mind.

To make requests to our GraphQL API, you must first be authenticated. A typical GraphQL request using cURL is below:


curl 'http://app.finaleinventory.com/ACCOUNTPATHCOMPONENT/api/graphql' \
-H 'content-type: application/json' \
-H 'Cookie: ACCOUNT=demo; JSESSIONID=...' \
-H 'Connection: keep-alive' \
--data-binary '{
"query":"mutation ($jobUrl: String!, $status: String) { jobUpdate(input: {jobUrl: $jobUrl, status: $status}) { job { status } } }",
"variables":{"jobUrl":"/demo/api/job/10002","status":"Canceled"},
"sessionSecret":"..."
}'


Breaking down the request

  • Content-Type: for GraphQL Requests (and all API requests), the Content-Type must be set to application/json

  • Cookie: Per authentication, you must set your ACCOUNT and JSESSIONID in the cookie for each request

  • Connection: For some more complex GraphQL requests, it may take more than 2 minutes to complete. To prevent timeouts, specify keep-alive.

  • data-binary:

    • query: this is the GraphQL query itself, optionally with variables

    • variables: These are variables used in the GraphQL request

    • sessionSecret: Per authentication, the sessionSecret must be set and the same as the JSESSIONID

Back to top