In this example, we will create a new document-based labeling project. We are going to label some book cover images and determine the title of the book. Additionally, we will use a Hierarchical Dropdown for our question.
operationName: you can fill any alphanumeric string in as the operationName. Refer this page for best practices on choosing an operationName .
teamId: id of the team where we want to create the project.
name: Name for the project.
kind: Use DOCUMENT_BASED as the value here since we want to create document-based labeling project.
consensus: peer review / labeler consensus. This determines how many labelers must agree in order for the system to automatically accept the label.
enableEditLabelSet: labelers will be restricted from adding or removing labels from the label set while labeling.
enableEditSentence: labelers will be able to edit the original text while labeling.
email: this refers to the user's email. Datasaur will throw an error if the email is not found on the team.
documentNames: Optional. List of document names. It refers to the field documents.fileName below. If not specified, all documents will be assigned to the team member above.
role: Optional. This determines the assignment role.
tagNames: a list of tag names to apply to a project. This parameter is optional and the type is string array.
documents: list of documents or files to be attached to this project. Every document must have the fields: name and fileName. There are optional fields, such as settings and fileUrl. Please see GraphQL schema for more information.
name: Document name.
fileName: File name. This can be used in the documentNames field above.
file: Use null.
guidelineID: Put guideline ID here.
questions: Add the list of questions here. Refer to this page for more information about questions.
query: Copy this from the cURL example.
Extract cover.zip to get sample files. You could use these images to execute cURL command above.
💡 You can check this page to see how to upload file in GraphQL.
Here is the response you can expect after issuing the cURL command.