Datasaur APIs
Datasaur supports importing from and exporting to Webhooks. We also support fully programmatic project creation and export, and we will discuss how to do so in the following pages. Some notes before we begin:
Datasaur API uses the Oauth 2.0 protocol for authentication and authorization.
Datasaur grants credentials via the Client Credentials Grant.
Datasaur also uses GraphQL. See GraphQL Schemas Guideline for further information.
How to Call the API in a Nutshell
Here is the link to the API docs. Please note that the value examples from the API docs usually needs to be adjusted when making the request. Fully copy pasting may not work in some cases.
Determine the query or mutation that you want to run from the API docs above.
Specific for project creation, please refer to this page.
We are also covering some common use cases that you can see on the sub pages. Please start from there before diving directly to the API docs.
For the rest of the queries and/or mutations, try the action that you want on the app and see the which API requests are done from the Network tab on the browser developer tools. Or you can always ask us on support@datasaur.ai and we will add the explanation on this sub pages.
Make a POST HTTP call to https://app.datasaur.ai/graphql.
Add header
Authorization: Bearer <access token>
Add header
Content-Type: application/json
Construct the GraphQL request with JSON format below.
operationName
: you can fill any alphanumeric string. To organize it properly, here is a recommendation for you to follow.variables
: depends on the query/mutation parameters, fill the values properly.query
: copy and paste the example from the API docs and stringify it, the API values would be filled in via variables attribute above.
Then, you need to define the body payload for the request.
If it's not a multipart, i.e. mutation that needs to upload or reference a file, use the GraphQL request above as the body payload of the request.
If it's a multipart, here is the body payload would look like.
We also have some other Python example on this repository. You can follow the steps in the readme
. 💡 Feel free to contact us at support@datasaur.ai for further API questions.
Last updated