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
"Choose how you would like to view the text in the editor"
110
viewer: TextDocumentViewer!
111
viewerConfig: TextDocumentViewerConfig
112
}
113
​
114
enum TextDocumentViewer {
115
TOKEN
116
TABULAR
117
URL
118
}
119
​
120
type TextDocumentViewerConfig {
121
urlColumnNames: [String!]
122
}
123
​
124
"See [this documentation](https://datasaurai.gitbook.io/datasaur/creating-a-project#task-types)."
125
enum TextDocumentKind {
126
TOKEN_BASED
127
ROW_BASED
128
DOCUMENT_BASED
129
}
130
​
131
"It determines how media displayed in editor."
132
enum MediaDisplayStrategy {
133
"Media will be not rendered."
134
NONE,
135
"Media will be rendered as thumbnail."
136
THUMBNAIL,
137
"Media will be rendered with its original size."
138
FULL
139
}
140
​
141
input DocFileOptionsInput {
142
"Override column headers by using these values."
143
customHeaderColumns: [String!]
144
"If the csv or xlsx file has header as the first row. Datasaur will use it as the column header for Row Based Labeling."
145
firstRowAsHeader: Boolean
146
}
147
​
148
input CreateTextDocumentInput {
149
"Document Name. It affects the document title section."
150
name: String
151
"File Name. It affects the File Extension and exported file."
152
fileName: String!
153
"Specify fileUrl if you want to label document from external Datasaur without uploading the content."
154
fileUrl: String
155
settings: SettingsInput
156
"Optional. It uses the same type as in LaunchTextProjectInput."
157
type: TextDocumentType
158
"Specify file if you want to upload file. Datasaur only process one between file and fileUrl."
159
file: Upload
160
"Only used in Row Based Labeling and Document Based Labeling."
161
docFileOptions: DocFileOptionsInput
162
questionFile: Upload
163
questionFileName: String
164
}
165
​
166
input SettingsInput {
167
"Optional. Default is `en`."
168
textLang: String
169
labelSetID: ID
170
"If You don't want to create a new guideline please provide existing Guideline ID"
171
guidelineID: ID
172
"Optional. Default is 60 second."
173
autoSavePeriod: Int
174
"Optional. Default is 5 lines."
175
numberOfLinesDisplayed: Int
176
"Required for Row Based Labeling and Document Based Labeling."
177
questions: [QuestionInput]
178
}
179
​
180
​
181
input QuestionInput {
182
"Only for update."
183
id: Int
184
"Set to true to delete the question when updating the document."
185
delete: Boolean
186
bindToColumn: String
187
type: QuestionType
188
"Column name."
189
name: String
190
"Message shown to Labeler."
191
label: String
192
"This marks whether the question is required to answer or not."
193
required: Boolean
194
config: QuestionConfigInput
195
}
196
​
197
input QuestionConfigInput {
198
"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`"
199
format: String
200
"Applies for TEXT, NESTED, DROPDOWN, HIERARCHICAL_DROPDOWN. Set it as true if you want to have multiple answers for this question."
201
multiple: Boolean
202
"Applies for TEXT. Set it as true if you want to enter long text."
203
multiline: Boolean
204
"Applies for Dropdown, HIERARCHICAL_DROPDOWN."
205
options: [QuestionConfigOptionsInput!]
206
"Applies for NESTED."
207
questions: [QuestionInput!]
208
"Applies for TEXT."
209
minLength: Int
210
"Applies for TEXT."
211
maxLength: Int
212
"Applies for TEXT. This field could have contain a regex string, which the browser natively uses for validation. E.g. `[0-9]*`"
213
pattern: String
214
"Applies for SLIDER."
215
min: Int
216
"Applies for SLIDER."
217
max: Int
218
"Applies for SLIDER."
219
step: Int
220
}
221
​
222
input DocumentMetaInput {
223
id: Int!
224
delete: Boolean
225
name: String!
226
description: String
227
required: Boolean
228
multipleChoice: Boolean
229
options: [DocumentMetaOptionInput!]
230
type: QuestionType
231
width: String
232
}
233
​
234
input DocumentMetaOptionInput {
235
id: String!
236
name: String!
237
parentId: String
238
}
239
​
240
"See [this documentation](https://datasaurai.gitbook.io/datasaur/creating-a-project#question-types) for further information."
241
enum QuestionType {
242
"This type provides a dropdown with multiple options."
243
DROPDOWN,
244
"This type provides a dropdown with hierarchical options."
245
HIERARCHICAL_DROPDOWN,
246
"You can create sub questions inside a question by using this type."
247
NESTED,
248
"This type provides a text area."
249
TEXT,
250
"This type provides a slider with customizeable minimum value and maximum value."
251
SLIDER,
252
"This type provides a date picker."
253
DATE,
254
"This type provides a time picker."
255
TIME
256
}
257
​
258
"More complete explanation can be found here in [this page](https://datasaurai.gitbook.io/datasaur/creating-a-project/project-types)"
259
enum TextDocumentType {
260
"Part of Speech"
261
POS
262
"Named Entity Recognition"
263
NER
264
"Dependency"
265
DEP
266
"Document Labeling"
267
DOC
268
CONSTITUENCY
269
ABSA
270
"Coreference"
271
COREF
272
"Optical Character Recognition"
273
OCR
274
}
275
​
276
type Project {
277
id: String!
278
team: Team
279
rootDocumentId: String!
280
assignees: [ProjectAssignment!]
281
name: String!
282
type: String!
283
createdDate: String!
284
updatedDate: String!
285
isOwnerMe: Boolean!
286
isReviewByMeAllowed: Boolean!
287
settings: ProjectSettings!
288
status: ProjectStatus!
289
}
290
​
291
type ProjectAssignment {
292
teamMember: TeamMember!
293
documentIds: [String!]
294
}
295
​
296
type Team {
297
id: String!
298
logoURL: String
299
members: [TeamMember!]
300
name: String!
301
}
302
​
303
type TeamMember {
304
id: String!
305
user: User
306
role: TeamRole
307
invitationEmail: String
308
invitationStatus: String
309
invitationKey: String
310
isRemoved: Boolean!
311
joinedDate: String!
312
}
313
​
314
type TeamRole {
315
id: String!
316
name: String!
317
}
318
​
319
input GuidelineInput {
320
name: String!
321
content: String!
322
}
323
​
324
type Guideline {
325
id: String
326
name: String!
327
content: String!
328
}
329
​
330
type User {
331
id: ID
332
username: String
333
name: String
334
email: String!
335
package: Package!
336
profilePicture: String
337
displayName: String!
338
}
339
​
340
enum Package {
341
ENTERPRISE
342
FREE
343
GROWTH
344
}
Copied!
Last modified 2mo ago
Copy link