-
Notifications
You must be signed in to change notification settings - Fork 0
/
buda-edit-api.yml
177 lines (174 loc) · 7.27 KB
/
buda-edit-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
openapi: 3.0.0
info:
title: BUDA Editing API
version: 0.0.1
servers:
- url: http://editserv.bdrc.io/
paths:
/tasks/{taskId}:
delete:
parameters:
- in: path
name: taskId # Note the name is the same as in the path
required: true
schema:
type: string
description: The task ID
example: 2531329f-fb09-4ef7-887e-84e648214436
description: delete the task given its id
responses:
'204':
description: NO Content
get:
parameters:
- in: path
name: taskId # Note the name is the same as in the path
required: true
schema:
type: string
description: The task ID
example: 2531329f-fb09-4ef7-887e-84e648214436
description: get the requested task given its id
responses:
'200':
description: a task
content:
application/json:
schema:
description: task and sessions information (to be defined)
example:
sessions:
- date: 1560282484000
gitVersion: commit 2102b42b069558725ede92e630f720b38a6e9893 1560282484 ----sp
taskVersion: '{"message":"about the task","id":"YYYYYY","shortName":"Yoga Collection","patch":"here is one more version of the content of the patch YYY","user":"marc","saveMsg":null}'
- date: 1560282368000
gitVersion: commit d12efc84bcc762f66bef09dcd32b577d78f5b9b4 1560282368 ----sp
taskVersion: '{"message":"about the task","id":"YYYYYY","shortName":"Yoga Collection","patch":"here is the latest ver sion of the content of the patch YYY","user":"marc","saveMsg":null}'
- date: 1559006942000
gitVersion: commit 659f85760596f8cff82acdcf0ffaa5fb85c54dbe 1559006942 ----sp
taskVersion: '{"message":"about the task","id":"YYYYYY","shortName":"Yoga Collection","patch":"here is the latest version of the content of the patch YYY","user":"marc","saveMsg":null}'
task:
message: about the task
id: YYYYYY
shortName: Yoga Collection
patch: here is one more version of the content of the patch YYY
user: marc
saveMsg: null
/tasks:
put:
description: save or add an ongoing task of the current user for later edit
requestBody:
description: Optional description in *Markdown*
required: true
content:
application/json:
schema:
description: task information
properties:
id:
description: the unique identifier allows management of the task
type: string
example: 2531329f-fb09-4ef7-887e-84e648214436
user:
description: identifier of the user
type: string
example: marc
shortName:
description: a short name for the task
type: string
example: mdzöd bdun chinese titles
message:
description: reminder message if wanted
type: string
patch:
description: the patch being buit corresponding to the task
type: string
example: H id <uuid:1a2b3c4d-5e6f-7a8b-9c0d-e1f2a3b4c5r6> . H graph http://purl.bdrc.io/graph/P1524 . TX . A <http://purl.bdrc.io/resource/P1524> <http://purl.bdrc.io/ontology/core/personTeacherOf> <http://purl.bdrc.io/resource/P1583> <http://purl.bdrc.io/graph/P1524> . D <http://purl.bdrc.io/resource/P1524> <http://purl.bdrc.io/ontology/core/personTeacherOf> <http://purl.bdrc.io/resource/P1583> <http://purl.bdrc.io/graph/P1524> . TC .
saveMsg:
description: similar to a commit message
type: string
example: finished first volume titles
responses:
'204':
description: NO Content
headers:
Location:
schema:
type: string
format: url
description: URL of the newly added (or updated) task
get:
description: get the list of the tasks associated to the user
responses:
'200':
description: list of tasks
content:
application/json:
schema:
description: task information
properties:
id:
description: the unique identifier of the task
type: string
example: 2531329f-fb09-4ef7-887e-84e648214436
user:
description: identifier of the user
type: string
format: url
example: http://purl.bdrc.io/user/U0001
shortName:
description: a short name for the task
type: string
example: mdzöd bdun chinese titles
message:
description: reminder message if wanted
type: string
patch:
description: the patch being buit corresponding to the task
type: string
saveMsg:
description: similar to a commit message
type: string
example: finished first volume titles
post:
description: apply an existing task
requestBody:
description: the final version of a task
required: true
content:
application/json:
schema:
description: task information
properties:
id:
description: the unique identifier allows management of the task
type: string
example: 2531329f-fb09-4ef7-887e-84e648214436
user:
description: identifier of the user
type: string
format: url
example: http://purl.bdrc.io/user/U0001
shortName:
description: a short name for the task
type: string
example: mdzöd bdun chinese titles
message:
description: reminder message if wanted
type: string
patch:
description: the patch to be applied,corresponding to the task
type: string
saveMsg:
description: similar to a commit message
type: string
example: finished first volume titles
responses:
'200':
description: task successfully submitted and queued
headers:
Location:
schema:
type: string
format: url
description: URL of the queued Job created for this task