Datasaur
Search…
GraphQL Schema
1
type Mutation {
2
launchTextProject(input: LaunchTextProjectInput!): Project!
3
createGuideline(input: GuidelineInput!): Guideline!
4
}
5
​
6
type Query {
7
getAllTeams: [Team!]!
8
exportTextProject(input: ExportTextProjectInput!): ExportRequestRedirectResult!
9
exportTextProjectDocument(input: ExportTextProjectDocumentInput!): ExportRequestRedirectResult!
10
}
11
​
12
input LaunchTextProjectInput {
13
"Specify teamId when you want to create project on a team. Do not specify teamId when you want to create a Personal Project."
14
teamId: ID
15
"Optional. This works for Team Project."
16
assignees: [ProjectAssignmentByNameInput!]
17
name: String!
18
"Use DOC when you want to create Doc Based Labeling or [any project template](https://datasaurai.gitbook.io/datasaur/creating-a-project/project-types)"
19
type: TextDocumentType
20
dueDate: String
21
"Optional. LabelSetId for Token Based Labeling. You can provide labelSetId when creating project or you can create LabelSet after the project is created."
22
labelSetId: ID
23
projectCreationId: String
24
projectSettings: ProjectSettingsInput
25
documentSettings: TextDocumentSettingsInput!
26
documents: [CreateTextDocumentInput!]
27
}
28
​
29
input ProjectAssignmentByNameInput {
30
"We only require one between teamMemberId and email. Use teamMember query to retrieve the teamMemberId."
31
teamMemberId: ID
32
"We only require one between teamMemberId and email. Use email for simplicity."
33
email: String
34
"Document's name to be assigned."
35
documentNames: [String!]
36
}
37
​
38
enum GqlExportMethod {
39
"Send the download link to custom webhook."
40
CUSTOM_WEBHOOK
41
"Download the file directly."
42
DOWNLOAD
43
"Send the download link to creator email."
44
EMAIL
45
"Return file url."
46
FILE_STORAGE
47
}
48
​
49
input ExportTextProjectInput {
50
projectIds: [String!]!
51
"Export project based on specified Role."
52
role: Role!
53
"See [this documentation](https://datasaurai.gitbook.io/datasaur/export-project/export-formats) for further information."
54
format: String!
55
fileName: String!
56
method: GqlExportMethod!
57
"Optional. Use this field when you choose method CUSTOM_WEBHOOK."
58
url: String
59
"Optional. Use this field when you choose method CUSTOM_WEBHOOK."
60
secret: String
61
}
62
​
63
input ExportTextProjectDocumentInput {
64
documentId: String!
65
"See [this documentation](https://datasaurai.gitbook.io/datasaur/export-project/export-formats) for further information."
66
format: String!
67
fileName: String!
68
method: GqlExportMethod!
69
"Optional. Use this field when you choose method CUSTOM_WEBHOOK."
70
url: String
71
"Optional. Use this field when you choose method CUSTOM_WEBHOOK."
72
secret: String
73
}
74
​
75
type ExportRequestRedirectResult {
76
"You should use this redirect url if you use method DOWNLOAD."
77
redirect: String
78
queued: Boolean
79
fileUrl: String
80
fileUrlExpiredAt: String
81
}
82
​
83
input ProjectSettingsInput {
84
"Labelers will be restricted from adding or removing labels from the label set while labeling."
85
enableEditLabelSet: Boolean
86
"Labelers will be able to edit the original text while labeling."
87
enableEditSentence: Boolean
88
"Peer review / labeler consensus. It determines how many consensus so that the label will be automatically accepted."
89
consensus: Int
90
}
91
​
92
input TextDocumentSettingsInput {
93
"It determines how many token that can be covered by one label."
94
textLabelMaxTokenLength: Int
95
"Optional. Every token must have at least one label in Token Based Labeling."
96
allTokensMustBeLabeled: Boolean
97
autoScrollWhenLabeling: Boolean
98
"Optional. Allow arrows to be drawn between labels in Token Based Labeling."
99
allowArcDrawing: Boolean
100
"Optional. Tokens and token spans should have at most one label. There can be no duplicate labels on a single token or token span."
101
allowMultiLabels: Boolean
102
kind: TextDocumentKind!
103
"Only works for Token Based Labeling. Possible values are `\n` and `.`"
104
sentenceSeparator: String
105
"Only works for Row Based Labeling, It determines how many rows displayed in the editor. Use -1 for show all rows at once."
106
displayedRows: Int
107
"Only works for Row Based Labeling."
108
mediaDisplayStrategy: MediaDisplayStrategy
109
}
110
​
111
"See [this documentation](https://datasaurai.gitbook.io/datasaur/creating-a-project#task-types)."
112
enum TextDocumentKind {
113
TOKEN_BASED
114
ROW_BASED
115
DOCUMENT_BASED
116
}
117
​
118
"It determines how media displayed in editor."
119
enum MediaDisplayStrategy {
120
"Media will be not rendered."
121
NONE,
122
"Media will be rendered as thumbnail."
123
THUMBNAIL,
124
"Media will be rendered with its original size."
125
FULL
126
}
127
​
128
input DocFileOptionsInput {
129
"Override column headers by using these values."
130
customHeaderColumns: [String!]
131
"If the csv or xlsx file has header as the first row. Datasaur will use it as the column header for Row Based Labeling."
132
firstRowAsHeader: Boolean
133
}
134
​
135
input CreateTextDocumentInput {
136
"Document Name. It affects the document title section."
137
name: String
138
"File Name. It affects the File Extension and exported file."
139
fileName: String!
140
"Specify fileUrl if you want to label document from external Datasaur without uploading the content."
141
fileUrl: String
142
settings: SettingsInput
143
"Optional. It uses the same type as in LaunchTextProjectInput."
144
type: TextDocumentType
145
"Specify file if you want to upload file. Datasaur only process one between file and fileUrl."
146
file: Upload
147
"Only used in Row Based Labeling and Document Based Labeling."
148
docFileOptions: DocFileOptionsInput
149
questionFile: Upload
150
questionFileName: String
151
}
152
​
153
input SettingsInput {
154
"Optional. Default is `en`."
155
textLang: String
156
labelSetID: ID
157
"If You don't want to create a new guideline please provide existing Guideline ID"
158
guidelineID: ID
159
"Optional. Default is 60 second."
160
autoSavePeriod: Int
161
"Optional. Default is 5 lines."
162
numberOfLinesDisplayed: Int
163
"Required for Row Based Labeling and Document Based Labeling."
164
questions: [QuestionInput]
165
}
166
​
167
​
168
input QuestionInput {
169
"Only for update."
170
id: Int
171
"Set to true to delete the question when updating the document."
172
delete: Boolean
173
bindToColumn: String
174
type: QuestionType
175
"Column name."
176
name: String
177
"Message shown to Labeler."
178
label: String
179
"This marks whether the question is required to answer or not."
180
required: Boolean
181
config: QuestionConfigInput
182
}
183
​
184
input QuestionConfigInput {
185
"Applies for DATE, TIME. Possible values for DATE are `DD-MM-YYYY`, `MM-DD-YYYY`, `YYYY-MM-DD` `DD/MM/YYYY`, `MM/DD/YYYY` and `YYYY/MM/DD`. Possible values for TIME are `HH:mm:ss`, `HH:mm`, `HH.mm.ss`, and `HH.mm`"
186
format: String
187
"Applies for TEXT, NESTED, DROPDOWN, HIERARCHICAL_DROPDOWN. Set it as true if you want to have multiple answers for this question."
188
multiple: Boolean
189
"Applies for TEXT. Set it as true if you want to enter long text."
190
multiline: Boolean
191
"Applies for Dropdown, HIERARCHICAL_DROPDOWN."
192
options: [QuestionConfigOptionsInput!]
193
"Applies for NESTED."
194
questions: [QuestionInput!]
195
"Applies for TEXT."
196
minLength: Int
197
"Applies for TEXT."
198
maxLength: Int
199
"Applies for TEXT. This field could have contain a regex string, which the browser natively uses for validation. E.g. `[0-9]*`"
200
pattern: String
201
"Applies for SLIDER."
202
min: Int
203
"Applies for SLIDER."
204
max: Int
205
"Applies for SLIDER."
206
step: Int
207
}
208
​
209
input DocumentMetaInput {
210
id: Int!
211
delete: Boolean
212
name: String!
213
description: String
214
required: Boolean
215
multipleChoice: Boolean
216
options: [DocumentMetaOptionInput!]
217
type: QuestionType
218
width: String
219
}
220
​
221
input DocumentMetaOptionInput {
222
id: String!
223
name: String!
224
parentId: String
225
}
226
​
227
"See [this documentation](https://datasaurai.gitbook.io/datasaur/creating-a-project#question-types) for further information."
228
enum QuestionType {
229
"This type provides a dropdown with multiple options."
230
DROPDOWN,
231
"This type provides a dropdown with hierarchical options."
232
HIERARCHICAL_DROPDOWN,
233
"You can create sub questions inside a question by using this type."
234
NESTED,
235
"This type provides a text area."
236
TEXT,
237
"This type provides a slider with customizeable minimum value and maximum value."
238
SLIDER,
239
"This type provides a date picker."
240
DATE,
241
"This type provides a time picker."
242
TIME
243
}
244
​
245
"More complete explanation can be found here in [this page](https://datasaurai.gitbook.io/datasaur/creating-a-project/project-types)"
246
enum TextDocumentType {
247
"Part of Speech"
248
POS
249
"Named Entity Recognition"
250
NER
251
"Dependency"
252
DEP
253
"Document Labeling"
254
DOC
255
CONSTITUENCY
256
ABSA
257
"Coreference"
258
COREF
259
"Optical Character Recognition"
260
OCR
261
}
262
​
263
type Project {
264
id: String!
265
team: Team
266
rootDocumentId: String!
267
assignees: [ProjectAssignment!]
268
name: String!
269
type: String!
270
createdDate: String!
271
updatedDate: String!
272
isOwnerMe: Boolean!
273
isReviewByMeAllowed: Boolean!
274
settings: ProjectSettings!
275
status: ProjectStatus!
276
}
277
​
278
type ProjectAssignment {
279
teamMember: TeamMember!
280
documentIds: [String!]
281
}
282
​
283
type Team {
284
id: String!
285
logoURL: String
286
members: [TeamMember!]
287
name: String!
288
}
289
​
290
type TeamMember {
291
id: String!
292
user: User
293
role: TeamRole
294
invitationEmail: String
295
invitationStatus: String
296
invitationKey: String
297
isRemoved: Boolean!
298
joinedDate: String!
299
}
300
​
301
type TeamRole {
302
id: String!
303
name: String!
304
}
305
​
306
input GuidelineInput {
307
name: String!
308
content: String!
309
}
310
​
311
type Guideline {
312
id: String
313
name: String!
314
content: String!
315
}
316
​
317
type User {
318
id: ID
319
username: String
320
name: String
321
email: String!
322
package: Package!
323
profilePicture: String
324
displayName: String!
325
}
326
​
327
enum Package {
328
ENTERPRISE
329
FREE
330
GROWTH
331
}
Copied!
Last modified 3mo ago
Copy link