-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
192 lines (191 loc) · 5.04 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
swagger: "2.0"
info:
description: "This is the DbPedia GStore web-api documentation."
version: "1.0.0"
title: "GStore API"
basePath: "/"
schemes:
- "http"
paths:
/graph/save:
post:
summary: "Save file"
description: "Saving a graph to gstore"
operationId: "saveFile"
consumes:
- "application/ld+json"
- "text/turtle"
produces:
- "application/json"
parameters:
- in: query
name: repo
type: string
required: true
example: "testuser"
- in: query
name: path
type: string
required: true
example: "testgroup/test.jsonld"
- in: query
name: prefix
description: prefix for graphid URL if it is not default. NOTE! should be without slash in the end
type: string
required: false
example: "http://foreighhost/api"
- in: body
name: body
description: "Turtle or JSONLD."
required: true
schema:
type: string
format: binary
example: '{
"@context": "http://schema.org/",
"@type": "Person",
"name": "Jane Doe",
"jobTitle": "Professor",
"telephone": "(425) 123-4567",
"url": "http://www.janedoe.com"
}'
responses:
"200":
description: "successful operation"
schema:
$ref: "#/definitions/OperationSuccess"
"400":
description: "invalid request"
schema:
$ref: "#/definitions/OperationFailure"
/graph/delete:
delete:
summary: "Delete file"
description: "Delete a graph from gstore."
operationId: "deleteFile"
produces:
- "application/json"
parameters:
- in: query
name: repo
type: string
required: true
example: "testuser"
- in: query
name: path
type: string
required: true
example: "testgroup/test.jsonld"
- in: query
name: prefix
description: prefix for graphid URL if it is not default. NOTE! should be without slash in the end
type: string
required: false
example: "http://foreighhost/api"
responses:
"200":
description: "successful operation"
schema:
$ref: "#/definitions/OperationSuccess"
"400":
description: "graph does not exist"
schema:
$ref: "#/definitions/OperationFailure"
/graph/read:
get:
summary: "Get file"
description: "Read rdf graph from gstore."
operationId: "getFile"
produces:
- "application/ld+json"
- "text/turtle"
parameters:
- in: query
name: repo
type: string
required: true
example: "testuser"
- in: query
name: path
type: string
required: true
example: "testgroup/test.jsonld"
responses:
"200":
description: "A file"
schema:
type: string
format: binary
"404":
description: "Not found"
schema:
$ref: "#/definitions/OperationFailure"
/shacl/validate:
post:
summary: "Validate dataid with shacl"
description: ""
operationId: "shaclValidate"
consumes:
- "multipart/form-data"
produces:
- "application/ld+json"
- "text/turtle"
parameters:
- in: formData
name: graph
type: string
required: true
format: binary
description: "RDF graph contents (jsonld expected)"
- in: formData
name: shacl
type: string
required: true
format: binary
description: "Contents of a shacl file"
responses:
"200":
description: "validation result in jsonld or turtle form"
schema:
type: string
format: binary
"400":
description: "invalid input"
/dataid/tractate:
post:
summary: "Returns a subgraph of dataid for signing"
description: ""
operationId: "dataidSubgraph"
consumes:
- "application/ld+json"
produces:
- "text/plain"
parameters:
- in: "body"
name: "body"
description: "Returns dataid file tractate"
required: true
schema:
type: string
format: binary
responses:
"200":
description: "successful operation, here we can just use Base64 encoded body"
schema:
type: string
definitions:
OperationSuccess:
properties:
graphid:
type: "string"
commit_hash:
type: "string"
required:
- graphid
- commit_hash
OperationFailure:
properties:
message:
type: "string"
required:
- message