Open Data Catalog v2.0.0
openapi_spec.json
Go to the documentation of this file.
1 {
2  "components": {
3  "parameters": {
4  "showReferenceIds": {
5  "name": "show-reference-ids",
6  "in": "query",
7  "description": "Metastore objects often include references to other objects stored in other schemas. These references are usually hidden in responses. Some identifiers are necessary to work with other API endpoints (e.g. datastore endpoints may require the distribution identifier). Add `?show-reference-ids` to show the identifiers generated by DKAN.",
8  "schema": {
9  "type": "boolean",
10  "default": false
11  },
12  "style": "form",
13  "allowEmptyValue": true
14  },
15  "schemaId": {
16  "name": "schema_id",
17  "in": "path",
18  "description": "The name a of a specific schema. For instance, \"dataset.\"",
19  "schema": {
20  "type": "string"
21  },
22  "required": true,
23  "allowEmptyValue": false,
24  "examples": []
25  }
26  },
27  "responses": {
28  "412MetadataObjectNotFound": {
29  "description": "Missing object, usually due to incorrect identifier.",
30  "content": {
31  "application/json": {
32  "schema": { "$ref": "#/components/schemas/errorResponse" },
33  "example": {
34  "message": "No data with the identifier 00000000-0000-0000-0000-000000000000 was found.",
35  "status": 412,
36  "timestamp": "2021-06-14T13:46:06+00:00"
37  }
38  }
39  }
40  }
41 
42  },
43  "schemas": {
44  "metastoreWriteResponse": {
45  "type": "object",
46  "properties": {
47  "endpoint": {
48  "type": "string",
49  "description": "Path to the metadata from the API."
50  },
51  "identifier": {
52  "type": "string",
53  "description": "Identifier for metadata just created or modified."
54  }
55  }
56  }
57  }
58  },
59  "paths": {
60  "/api/1/metastore/schemas": {
61  "get": {
62  "operationId": "metastore-get-schemas",
63  "summary": "Get list of all schemas",
64  "tags": [ "Metastore" ],
65  "responses": {
66  "200": {
67  "description": "List of metastore schemas.",
68  "content": {
69  "application/json": {
70  "schema": {
71  "type": "object",
72  "description": "Full collection of available metastore schemas"
73  }
74  }
75  }
76  }
77  }
78  }
79  },
80  "/api/1/metastore/schemas/{schema_id}": {
81  "get": {
82  "operationId": "metastore-get-schema",
83  "summary": "Get a specific schema",
84  "tags": [ "Metastore" ],
85  "parameters": [
86  { "$ref": "#/components/parameters/schemaId" }
87  ],
88  "responses": {
89  "200": {
90  "description": "Ok",
91  "content": {
92  "application/json": {
93  "schema": {
94  "description": "A schema definition, see https://json-schema.org/",
95  "type": "object"
96  }
97  }
98  }
99  },
100  "404": {
101  "description": "Schema not found"
102  }
103  }
104  }
105  },
106  "/api/1/metastore/schemas/{schema_id}/items": {
107  "get": {
108  "operationId": "metastore-get-all",
109  "summary": "Get all items for a specific schema (e.g., \"dataset\")",
110  "tags": [ "Metastore" ],
111  "parameters": [
112  { "$ref": "#/components/parameters/schemaId" },
113  { "$ref": "#/components/parameters/showReferenceIds" }
114 
115  ],
116  "responses": {
117  "200": {
118  "description": "Ok",
119  "content": {
120  "application/json": {
121  "schema": {
122  "type": "array",
123  "description": "Array of metastore items matching the chosen schema.",
124  "items": { "type": "object"}
125  }
126  }
127  }
128  }
129  }
130  }
131  },
132  "/api/1/metastore/schemas/dataset/items/{identifier}/docs": {
133  "get": {
134  "operationId": "docs-get-dataset-specific",
135  "summary": "Dataset-specific json documentation",
136  "tags": [
137  "Metastore: documentation"
138  ],
139  "parameters": [
140  { "$ref": "#/components/parameters/datasetUuid" }
141  ],
142  "responses": {
143  "200": {
144  "description": "Ok",
145  "content": {
146  "application/json": {
147  "schema": {
148  "type": "object"
149  }
150  }
151  }
152  }
153  }
154  }
155  }
156  }
157 }