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), theContent-Type
must be set toapplication/json
Cookie
: Per authentication, you must set yourACCOUNT
andJSESSIONID
in the cookie for each requestConnection
: For some more complex GraphQL requests, it may take more than 2 minutes to complete. To prevent timeouts, specifykeep-alive
.data-binary
:query
: this is the GraphQL query itself, optionally with variablesvariables
: These are variables used in the GraphQL requestsessionSecret
: Per authentication, thesessionSecret
must be set and the same as theJSESSIONID
Comments
0 comments
Article is closed for comments.