New mutation (createProject)
Last updated
Last updated
We have updated our to send a request to the new mutation. This new version is available under the v2.0 version.
Mutation:
launchTextProjectAsync
and createProject
mutationBeside the difference in input structure - LaunchProjectInput
vs LaunchTextProjectInput
, there is one big difference in how we handle file uploads. Previously, file uploads are handled directly in the GraphQL mutation using - this seems to cause some difficulty in calling the mutation from some clients, such as Postman, as well as having a limited size and timeout limit.
The new mutation now does not handle file uploads at all. Instead, Datasaur now has a separate REST endpoint that will accept file uploads. This new endpoint is accessible at and require the same as the GraphQL endpoints. Here is a sample cURL request to upload a file, and the corresponding response:
You could then use the objectKey
as the value for the GraphQL . Below is an example document payload, along with some explanations.
each DocumentDetailInput
should have name
and one of externalUrl
and objectKey
populated.
To obtain objectKey
, please refer to the previous section
externalUrl
is any reachable URLs that serve the document directly. A good example would be Github’s raw gist link for text files, and signed URLs from object storage provides. Datasaur would download the file and create a copy to use in the created project.
extras
is used for certain types of labeling. One example is for transcription-based project, such as ASR or OCR projects, the main document would be the audio recording / image / document, and the accompanying transcription file should be added inside the extras
array.
If you are able to, migrating to use the new mutation would be as simple as running through our Project Creation Wizard once again, and clicking View Script
at the last step. We have provided the new payload structure there.
documents
is an array of CreateDocumentInput
s object. The full reference for CreateDocumentInput
is available
document
and extras
uses the same structure:
document
is where you should generally put your main file to be labeled. Most of the time, only this field would be populated. See our for more information on which file types are supported.
You can then follow our to create a project with the chosen settings.