Skip to content

Commit a10602f

Browse files
committed
New release
1 parent 7725a92 commit a10602f

9 files changed

+515
-558
lines changed

datasets-catalog.apib

+344
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,344 @@
1+
# Group Datasets Catalog
2+
3+
4+
## List All Datasets [/catalog/datasets/catalog]
5+
6+
List of datasets catalog records using the DCAT vocabulary in RDF or JSON-LD.
7+
8+
Use the **showShared** header parameter to include the public datasets.
9+
10+
+ Parameters
11+
+ showShared: (optional, y|n) - defaults to `n`
12+
+ Accept: (required, mimetype) -
13+
```application/ld+json``` or ```application/rdf+xml```
14+
15+
### List users's datasets [GET]
16+
17+
+ Request
18+
+ Headers
19+
Accept: application/ld+json
20+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
21+
showShared: n
22+
23+
+ Response 200
24+
25+
{
26+
"@context": { ... }
27+
"@type": "dcat:Catalog",
28+
"dct:publisher": "Alex",
29+
"@id": "http://dapaas.eu/users/Alex/datasets",
30+
"dcat:record": [
31+
{
32+
"@type": "dcat:CatalogRecord",
33+
"foaf:primaryTopic": "http://eu.dapaas/dataset/1",
34+
"dct:issued": "2014-09-16",
35+
"dct:modified": "2014-09-17",
36+
"dct:title": "My first DaPaaS dataset"
37+
},
38+
{
39+
"@type": "dcat:CatalogRecord",
40+
"foaf:primaryTopic": "http://eu.dapaas/dataset/2",
41+
"dct:issued": "2014-09-15",
42+
"dct:modified": "2014-09-17",
43+
"dct:title": "My second DaPaaS dataset"
44+
}
45+
]
46+
}
47+
48+
## Search Datasets [/catalog/datasets/search]
49+
50+
Text search on the datasets metadata.
51+
52+
Use the **showShared** header parameter to include the public datasets.
53+
54+
+ Parameters
55+
+ q: (required, text) - The text query
56+
+ showShared: (optional, y|n) - defaults to `n`
57+
+ Accept: (required, mimetype) -
58+
```application/ld+json``` or ```application/rdf+xml```
59+
60+
### Search users's datasets [GET]
61+
+ Request
62+
+ Headers
63+
Accept: application/ld+json
64+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
65+
showShared: n
66+
q: DaPaaS
67+
68+
+ Response 200
69+
70+
{
71+
"@context": { ... }
72+
"@type": "dcat:Catalog",
73+
"dct:publisher": "Alex",
74+
"@id": "http://dapaas.eu/users/Alex/datasets",
75+
"dcat:record": [
76+
{
77+
"@type": "dcat:CatalogRecord",
78+
"foaf:primaryTopic": "http://eu.dapaas/dataset/1",
79+
"dct:issued": "2014-09-16",
80+
"dct:modified": "2014-09-17",
81+
"dct:title": "My first DaPaaS dataset"
82+
},
83+
{
84+
"@type": "dcat:CatalogRecord",
85+
"foaf:primaryTopic": "http://eu.dapaas/dataset/2",
86+
"dct:issued": "2014-09-15",
87+
"dct:modified": "2014-09-17",
88+
"dct:title": "My second DaPaaS dataset"
89+
}
90+
]
91+
}
92+
93+
## Dataset CRUD [/catalog/datasets]
94+
95+
### Create Dataset [POST]
96+
97+
If the description contains no @id, the system will generate one from the title.
98+
99+
A successfull creation returns the URI of the new dataset.
100+
101+
+ Parameters
102+
+ Content%2DType: (required, mimetype) -
103+
```application/ld+json``` or ```application/rdf+xml```
104+
105+
106+
+ Request (application/ld+json)
107+
+ Headers
108+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
109+
+ Body
110+
111+
{
112+
'@context': {...},
113+
'@type': 'dcat:Dataset',
114+
'dct:title': 'My new dataset',
115+
'dct:description': 'Example dataset for the documentation',
116+
'dcat:public': 'false'
117+
}
118+
119+
+ Response 200
120+
121+
{
122+
"@id": "http://dapaas.eu/users/15052/dataset/my-new-dataset-1"
123+
}
124+
125+
126+
### Read Dataset [GET]
127+
128+
Get the complete dataset description using the DCAT vocabulary in RDF or JSON-LD.
129+
130+
+ Parameters
131+
+ dataset%2Did: (required, URI)
132+
URI of the dataset, taken from the catalog
133+
+ Accept: (required, mimetype) -
134+
```application/ld+json``` or ```application/rdf+xml```
135+
136+
+ Request
137+
+ Headers
138+
Accept: application/ld+json
139+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
140+
dataset-id: http://dapaas.eu/users/15052/dataset/preview-1
141+
142+
+ Response 200
143+
144+
{
145+
"@context": {...},
146+
"@id": "http://dapaas.eu/users/15052/dataset/preview-1",
147+
"@type": "dcat:Dataset",
148+
"dcat:distribution": [
149+
"http://dapaas.eu/users/15052/distribution/July+-+2005-2006.csv-1",
150+
...],
151+
"dcat:keyword": [],
152+
"dct:description": "Dataset containing the previewed files from Grafterizer",
153+
"dct:public": false,
154+
"dct:publisher": "dapaas",
155+
"dct:title": "Previewed files"
156+
}
157+
158+
159+
### Update Dataset [PUT]
160+
161+
Note: The complete dataset should be included. It is not merged with the previous version.
162+
163+
+ Parameters
164+
+ Content%2DType: (required, mimetype) -
165+
```application/ld+json``` or ```application/rdf+xml```
166+
167+
168+
+ Request (application/ld+json)
169+
+ Headers
170+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
171+
+ Body
172+
173+
{
174+
'@context': {...},
175+
'@type': 'dcat:Dataset',
176+
'@id': 'http://dapaas.eu/users/15052/dataset/my-new-dataset-1',
177+
'dct:title': 'My new dataset',
178+
'dct:description': 'My dataset now public',
179+
'dcat:public': 'true'
180+
}
181+
182+
+ Response 200
183+
184+
### Delete Dataset [DELETE]
185+
186+
When deleting a dataset, the system will also delete the attached distributions.
187+
188+
+ Parameters
189+
+ dataset%2Did: (required, URI)
190+
URI of the dataset, taken from the catalog
191+
192+
+ Request
193+
+ Headers
194+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
195+
dataset-id: http://dapaas.eu/users/15052/dataset/preview-1
196+
197+
+ Response 200
198+
199+
## Distribution CRUD [/catalog/distributions]
200+
201+
### Create Distribution [POST]
202+
203+
A successfull creation returns the URI of the new dataset.
204+
205+
**Attachments**
206+
207+
**meta:** Distribution metadata as RDF or JSON-LD.
208+
209+
Use `Content-Type` to determine the metadata-format. The metadata should contain the file meta data (content-type, size, name). See the Model reference for the details.
210+
211+
If the metadata doesn't contain a distirbution id, the system will generate one.
212+
213+
**file:** The raw file content.
214+
215+
If the distribution is not a RDF distribution, the file attachment is optional.
216+
217+
218+
219+
+ Parameters
220+
+ dataset%2Did: (required, URI)
221+
URI of the dataset container
222+
+ Content%2DType: (required, mimetype) -
223+
```multipart/mixed``` or ```multipart/form-data```
224+
225+
226+
+ Request
227+
+ Headers
228+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
229+
+ Body
230+
231+
meta:  {
232+
'@context': {...},
233+
'@type': 'dcat:Distribution',
234+
'dct:title': 'my-distribution',
235+
'dct:description': 'Distribution example',
236+
'dcat:fileName': 'source.csv',
237+
'dcat:mediaType': 'text/csv'
238+
},
239+
file: <RAW>
240+
241+
+ Response 200
242+
243+
{
244+
"@id": "http://dapaas.eu/users/15052/distribution/my-distribution-1"
245+
}
246+
247+
248+
### Read Distribution [GET]
249+
250+
Get the complete distribution description.
251+
252+
+ Parameters
253+
+ distrib%2Did: (required, URI) -
254+
URI of the distribution, taken from the catalog
255+
+ Accept: (required, mimetype) -
256+
```application/ld+json``` or ```application/rdf+xml```
257+
258+
+ Request
259+
+ Headers
260+
Accept: application/ld+json
261+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
262+
distrib-id: http://dapaas.eu/users/15052/distribution/my-distribution-1
263+
264+
+ Response 200
265+
266+
{
267+
"@context": {...},
268+
"@id": "http://dapaas.eu/users/15052/distribution/my-distribution-1",
269+
"@type": "dcat:Distribution",
270+
"dct:title": "my-distribution",
271+
"dct:description": "Distribution example",
272+
"dct:fileID": "159532fa-62ec-4543-a662-fc7a081181b3.bin",
273+
"http://www.w3.org/ns/dcat#mediaType": "text/csv",
274+
"http://www.w3.org/ns/dcat#fileName": "source.csv"
275+
}
276+
277+
278+
### Update Distribution [PUT]
279+
280+
281+
**Attachments**
282+
283+
**meta:** Distribution metadata as RDF or JSON-LD.
284+
285+
Use `Content-Type` to determine the metadata-format.
286+
287+
**file:** The raw file content.
288+
289+
The file attachment is optional. If provided, it will overwrite the previous one. The metadata should also be provided to contain the updated file metadata (content-type, size, name).
290+
291+
+ Parameters
292+
+ Content%2DType: (required, mimetype) -
293+
```multipart/mixed``` or ```multipart/form-data```
294+
295+
+ Request
296+
+ Headers
297+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
298+
+ Body
299+
300+
meta:  {
301+
'@context': {...},
302+
'@type': 'dcat:Distribution',
303+
'@id': 'http://dapaas.eu/users/15052/distribution/my-distribution-1',
304+
'dct:title': 'my-distribution',
305+
'dct:description': 'Distribution example',
306+
'dcat:fileName': 'source.csv',
307+
'dcat:mediaType': 'text/csv'
308+
},
309+
file: <RAW>
310+
311+
+ Response 200
312+
313+
314+
### Delete Distribution [DELETE]
315+
316+
When deleting a distribution, the system will also release the attached RDF repositories.
317+
318+
+ Parameters
319+
+ distrib%2Did: (required, URI)
320+
URI of the distribution
321+
322+
+ Request
323+
+ Headers
324+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
325+
dataset-id: http://dapaas.eu/users/15052/dataset/preview-1
326+
327+
+ Response 200
328+
329+
330+
## Distribution raw file access [/catalog/distributions/file]
331+
332+
### Distribution Raw file access [GET]
333+
334+
+ Parameters
335+
+ distrib%2Did: (required, URI)
336+
URI of the distribution
337+
338+
+ Request
339+
+ Headers
340+
Authorization: Basic YXBpa2V5OmFwaXBhc3M=
341+
dataset-id: http://dapaas.eu/users/15052/dataset/preview-1
342+
343+
+ Response 200
344+

0 commit comments

Comments
 (0)