Inserting Span and Arrow Label into Document
cURL
curl --location --request POST '<https://app.datasaur.ai/graphql>' \\
--header 'Authorization: Bearer access_token' \\
--header 'Content-Type: application/json' \\
--data-raw '{
"operationName": "UpdateLabels",
"variables": {
"input": {
"documentId": "document-id",
"signature": "signature",
"labels": [
{
"id": "SPAN:novel:0:0:0:0:0:0:0:2:5:0:undefined:undefined",
"l": "novel",
"start": {
"sentenceId": 0,
"tokenId": 0,
"charId": 0
},
"end": {
"sentenceId": 0,
"tokenId": 2,
"charId": 5
},
"layer": 0,
"deleted": false
},
{
"id": "SPAN:male:0:0:0:14:0:0:0:18:6:0:undefined:undefined",
"l": "male",
"start": {
"sentenceId": 0,
"tokenId": 14,
"charId": 0
},
"end": {
"sentenceId": 0,
"tokenId": 18,
"charId": 6
},
"layer": 0,
"deleted": false
},
{
"id": "ARROW:author:1:0:0:0:0:0:0:18:6:0:SPAN:novel:0:0:0:0:0:0:0:2:5:0:undefined:undefined:SPAN:male:0:0:0:14:0:0:0:18:6:0:undefined:undefined",
"l": "author",
"start": {
"sentenceId": 0,
"tokenId": 0,
"charId": 0
},
"end": {
"sentenceId": 0,
"tokenId": 18,
"charId": 6
},
"layer": 1,
"deleted": false
}
],
"action": "LABEL"
}
},
"query": "mutation UpdateLabels($input: UpdateTokenLabelsInput!) { updateLabelsResult: updateLabels(input: $input) { updatedSentences { id } } }"
}'
Response
Last updated