-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yml
199 lines (191 loc) · 5.94 KB
/
swagger.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
openapi: 3.0.0
info:
title: MOSS API
version: 0.1.1
description: API documentation for the Databus Metadata Overlay Search System
paths:
/sparql:
get:
summary: "SPARQL Query Endpoint"
description: "Endpoint for querying the SPARQL store. Accepts SPARQL queries as URL parameters."
parameters:
- name: query
in: query
required: true
schema:
type: string
description: "The SPARQL query to be executed."
- name: format
in: query
required: false
schema:
type: string
enum: [json, xml, csv, tsv]
description: "Response format. Default is JSON."
responses:
'200':
description: "Query executed successfully"
content:
application/sparql-results+json: {}
application/sparql-results+xml: {}
text/csv: {}
text/tab-separated-values: {}
'400':
description: "Invalid query"
'500':
description: "Internal server error"
post:
summary: "SPARQL Query Endpoint"
description: "Endpoint for querying the SPARQL store with a POST request. Accepts SPARQL queries in the body."
requestBody:
required: true
content:
application/sparql-query:
schema:
type: string
description: "The SPARQL query to be executed."
responses:
'200':
description: "Query executed successfully"
content:
application/sparql-results+json: {}
application/sparql-results+xml: {}
text/csv: {}
text/tab-separated-values: {}
'400':
description: "Invalid query"
'500':
description: "Internal server error"
/g/{graphPath}:
get:
summary: "Retrieve RDF Graph Document"
description: "Endpoint to access RDF documents or graphs hosted on the server. This endpoint allows retrieval of RDF resources stored under the `/g` path."
parameters:
- name: graphPath
in: path
required: true
schema:
type: string
description: "The path of the RDF graph document to retrieve. Example: `/header/databus.dbpedia.org/janfo/dbpedia-links/openenergy.jsonld`"
- name: format
in: query
required: false
schema:
type: string
enum: [jsonld, rdfxml, ttl, ntriples]
description: "Response format. Default is JSON-LD."
responses:
'200':
description: "RDF document retrieved successfully"
content:
application/ld+json: {}
application/rdf+xml: {}
text/turtle: {}
application/n-triples: {}
'404':
description: "Graph not found"
'500':
description: "Internal server error"
/file/{param}:
get:
summary: "Metadata Browse Endpoint"
description: "Endpoint to browse metadata files."
parameters:
- name: param
in: path
required: true
schema:
type: string
responses:
'200':
description: "File browsed successfully"
'404':
description: "File not found"
/api/save:
post:
summary: "Save Metadata"
description: "Protected endpoint to save metadata information."
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
data:
type: string
responses:
'200':
description: "Metadata saved successfully"
'401':
description: "Unauthorized access"
/api/search:
get:
summary: "Search Metadata"
description: "Proxy endpoint to perform metadata search."
responses:
'200':
description: "Search results returned successfully"
'400':
description: "Invalid search query"
/api/layers/list:
get:
summary: "List Layers"
description: "Endpoint to list metadata layers."
responses:
'200':
description: "Layers listed successfully"
'404':
description: "Layers not found"
/api/layers/get-shacl:
get:
summary: "Get SHACL for Layers"
description: "Endpoint to get SHACL constraints for layers."
responses:
'200':
description: "SHACL constraints retrieved successfully"
'404':
description: "SHACL constraints not found"
/api/layers/get-template:
get:
summary: "Get Template for Layers"
description: "Endpoint to get layer templates."
responses:
'200':
description: "Layer template retrieved successfully"
'404':
description: "Template not found"
/api/users/{userId}:
get:
summary: "User Management"
description: "Endpoint to manage user information."
parameters:
- name: userId
in: path
required: true
schema:
type: string
responses:
'200':
description: "User information retrieved successfully"
'404':
description: "User not found"
post:
summary: "Add/Update User Information"
description: "Endpoint to add or update user information."
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
email:
type: string
responses:
'200':
description: "User information updated successfully"
'401':
description: "Unauthorized access"