-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.yaml
407 lines (401 loc) · 12.4 KB
/
swagger.yaml
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
swagger: '2.0'
info:
title: Dendro Research Data Management Platform API
description: Integrate your research data management workflows with Dendro **(Documentation IN CONSTRUCTION)**
version: "0.2.0"
# the domain of the service
host: "127.0.0.1:3001"
# will be prefixed to all paths
basePath: "/"
# array of all schemes that your API supports
schemes:
- https
produces:
- application/json
paths:
/favicon.ico:
get:
summary: Favicon.icon
description: |
Favicon.icon
tags:
- Favicon.icon
produces:
["text/html"]
consumes:
["text/html", "application/json"]
responses:
200:
description: Favicon.icon
schema:
type: string
"":
get:
summary: Gets the Dendro Home page
description: |
Gets the Dendro Home page
tags:
- Home Page
produces:
["text/html"]
consumes:
["text/html", "application/json"]
responses:
200:
description: The Dendro home page
schema:
type: string
/analytics_tracking_code:
get:
summary: Google Analytics Tracking Code
description: |
Retrieves the Google Analytics Tracking code. Necessary for the AngularJS app to record events using the angular-google-analytics library, which connects the Dendro instance to Google Analytics for usage statistics production.
tags:
- Analytics Tracking Code
produces:
["application/json"]
consumes:
["text/html", "application/json"]
responses:
200:
description: A single string with the Google Analytics Tracking Code
schema:
type: string
/vertexes:
get:
summary: All resources in the graph database
description: |
The operation lists all resources present in the database in a web page. Mainly for testing purposes.
tags:
- Vertexes
produces:
["text/html"]
consumes:
["text/html"]
responses:
200:
description: A web page listing all the vertexes in the database
/vertexes/random:
get:
summary: A random resource in the graph database
description: |
The operation shows a random resource present in the database in a web page. Mainly for testing purposes.
tags:
- Vertexes
produces:
["text/html"]
consumes:
["text/html"]
responses:
200:
description: A web page showing a random resource in the database
/vertexes/show/:vertex:
get:
summary: Show a specific resource present in the graph database, as well as its neighbouring resources (1-level connections).
description: |
The operation shows a specific resource present in the database in a web page, provided the uri is supplied. Mainly for testing purposes. Also shows its neighbouring resources (1-level connections).
parameters:
- name: vertex
in: query
description: Full URI of the resource to be fetched.
required: true
type: string
format: uri
tags:
- Vertexes
produces:
["text/html"]
consumes:
["text/html"]
responses:
200:
description: An array of resources (Files and Folders)
schema:
type: array
items:
$ref: '#/definitions/InformationElement'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/search:
get:
summary: Free-text search
description: Search for publicly-available files and projects. Will perform a text search and return a list of matching resources.
parameters:
- name: q
in: query
description: The query string
required: true
type: string
- name: currentPage
in: query
description: The page number to fetch (for pagination)
required: true
type: integer
format: int32
- name: pageSize
in: query
description: The size of the page to fetch (for pagination)
required: true
type: integer
format: int32
tags:
- Search
responses:
200:
description: An array of resources (Files and Folders)
schema:
type: array
items:
$ref: '#/definitions/InformationElement'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/login:
post:
summary: Authenticates a user
description: |
Authenticates a user if the correct username and password are supplied
parameters:
- name: username
in: body
description: Username of the user to authenticate
required: true
type: string
format: alphanum
- name: password
in: body
description: Username of the user to authenticate
required: true
type: string
format: alphanum
tags:
- Authentication
produces:
["text/json"]
consumes:
["text/json"]
responses:
200:
description: The authentication success message
schema:
type: array
items:
$ref: '#/definitions/Success'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/logout:
post:
summary: De-authenticates a user currently logged in
description: |
De-authenticates the currently authenticated user
tags:
- Authentication
produces:
["text/json"]
consumes:
["text/json"]
responses:
200:
description: The de-authentication success message
schema:
type: object
items:
$ref: '#/definitions/Success'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/ontologies/public:
get:
summary: Provides a list of public ontologies in this Dendro
description: |
Lists the public ontologies loaded in this Dendro. A public ontology is one that can be used by users to describe datasets. A private ontology is used to represent private information (e.g the user password).
tags:
- Ontologies
produces:
["text/json"]
consumes:
["text/json"]
responses:
200:
description: A list of ontologies
schema:
type: array
items:
$ref: '#/definitions/Ontology'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/ontologies/all:
get:
summary: Provides a list of ALL ontologies in this Dendro
description: |
Lists ALL the ontologies loaded in this Dendro, regardless of their visibility.
tags:
- Ontologies
produces:
["text/json"]
consumes:
["text/json"]
responses:
200:
description: A list of ontologies
schema:
type: array
items:
$ref: '#/definitions/Ontology'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/descriptors/from_ontology/:ontology_prefix:
get:
summary: Provides a list of descriptors from a specific ontology
description: |
Lists ALL the descriptors loaded in this Dendro and from a specific ontology.
parameters:
- name: project_handle
in: query
description: The project handle identifier
required: true
type: string
format: alphanum
- name: ontology_prefix
in: query
description: The ontology prefix identifier of the ontology
required: true
type: string
format: alphanum
tags:
- Descriptors
produces:
["text/json"]
consumes:
["text/json"]
responses:
200:
description: A list of descriptors
schema:
type: array
items:
$ref: '#/definitions/Descriptor'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
###DEFINITIONS
definitions:
Success:
type: object
properties:
code:
type: integer
format: int32
result:
type: integer
format: int32
message:
type: string
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
fields:
type: string
Ontology:
type: object
properties:
prefix:
type: string
description: The prefix of an ontology. For example, for Dublin Core Terms you have 'dcterms'
uri:
type: string
description: The URI (in most cases also URL) that identifies the ontology uniquely.
elements:
type: array
description: List of descriptors included in this ontology
items:
schema:
type: array
$ref: '#/definitions/Descriptor'
InformationElement:
type: object
properties:
title:
type: string
description: The title (file or folder name) of the information resource
descriptors:
type: array
description: List of descriptors of this Information Element
items :
schema:
$ref: '#/definitions/Descriptor'
file_extension:
type: string
description: Display name of product.
hasLogicalParts:
type: array
description: Capacity of product. For example, 4 people.
items:
schema:
type: object
# properties:
# title:
# type: string
# description: The title (file or folder name) of the information resource
metadata_quality:
type: integer
format: int32
description: An estimate of the quality of the metadata in this resource. Ranges from 0 to 100.
Descriptor:
type: object
properties:
uri:
type: string
format: uri
description: The URI that identifies the descriptor
prefix:
type: string
description: The prefix of the ontology to which the descriptor belongs
ontology:
type: string
format: uri
description: The URI of the ontology to which the descriptor belongs
shortName:
type: string
format: uri
description: The element name of the descriptor, i.e. what is to the right of the ':' in the prefixed form. E.g. for the 'dcterms:title' descriptor, it is 'title'
prefixedForm:
type: string
format: uri
description: The prefixed form of the identifier of this descriptor <prefix>:<shortName>
#$ref: '#/definitions/TitleOnly'
type:
type: integer
description: Determines the type of the descriptor, for serialization in the database. (for this value, just send back what Dendro sends you)
control:
type: string
description: The type of control to present in the web interface, for this descriptor
label:
type: string
description: Human-readable label for this descriptor. It is the value of its rdf:label property
comment:
type: string
description: Human-readable comment for this descriptor. It is the value of its rdf:comment property
recommendation_types :
type: object
description: When requesting descriptor recommendations, it provides an explanation of why the descriptor was recommended
recommendationCallId:
type: string
format: uuid
description: The ID of a recommendation call where the descriptor was recommended, if getting it from the descriptor recommendations endpoint. Send it back when recording an interaction so that Dendro knows from which recommendation session it was accepted or rejectec, for example. Important for feedback gathering on the effectiveness of the descriptor recommender.