Open Data Catalog v2.0.0
openapi_spec.json
Go to the documentation of this file.
1 {
2  "components": {
3  "schemas": {
4  "facets": {
5  "type": "array",
6  "description": "Array of facet values.",
7  "items": {
8  "type": "object",
9  "properties": {
10  "type": {
11  "type": "string",
12  "description": "Machine name for the metastore property to filter on."
13  },
14  "name": {
15  "type": "string",
16  "description": "The facet filter value, for instance, the tet of a keyword to filter by"
17  },
18  "total": {
19  "type": "integer",
20  "description": "Number of results in the current result set that match this filter."
21  }
22  }
23  }
24  }
25  }
26  },
27  "paths": {
28  "/api/1/search": {
29  "get": {
30  "operationId": "search",
31  "summary": "Search the DKAN catalog",
32  "description": "Search description.\n",
33  "tags": [
34  "Search"
35  ],
36  "parameters": [
37  {
38  "name": "fulltext",
39  "in": "query",
40  "description": "Full-text search to run against any metadata fields indexed for fulltext searches.",
41  "schema": {
42  "type": "string",
43  "default": ""
44  },
45  "allowEmptyValue": true,
46  "style": "form"
47  },
48  {
49  "name": "page",
50  "in": "query",
51  "description": "The page of the result set.",
52  "schema": {
53  "type": "integer",
54  "default": 1
55  },
56  "example": 1,
57  "style": "form"
58  },
59  {
60  "name": "page-size",
61  "in": "query",
62  "description": "How many results per page.",
63  "schema": {
64  "type": "integer",
65  "default": 10,
66  "minimum": 1,
67  "maximum": 100
68  },
69  "example": 20,
70  "style": "form"
71  },
72  {
73  "name": "sort",
74  "in": "query",
75  "description": "Which property to sort results on.",
76  "schema": {
77  "type": "string"
78  },
79  "style": "form"
80  },
81  {
82  "name": "sort-order",
83  "in": "query",
84  "description": "Sort results in ascending or descending order.",
85  "schema": {
86  "type": "string",
87  "default": "asc",
88  "enum": [ "asc", "desc"]
89  },
90  "example": "desc",
91  "style": "form"
92  },
93  {
94  "name": "facets",
95  "in": "query",
96  "required": false,
97  "allowEmptyValue": true,
98  "description": "Request information on facets. Pass a comma-separated list to get specific facets. Pass an empty value or \"0\" for no facet infrmation. Omit this parameter to get all facet information.",
99  "schema": {
100  "type": "string"
101  },
102  "style": "form",
103  "explode": false
104  }
105  ],
106  "responses": {
107  "200": {
108  "description": "Ok",
109  "content": {
110  "application/json": {
111  "schema": {
112  "type": "object",
113  "properties": {
114  "total": {
115  "type": "integer",
116  "description": "Total search results for query."
117  },
118  "results": {
119  "type": "object",
120  "description": "An object with keys following the format \"dkan_dataset/[uuid]\", containing full dataset objects from the DKAN metastore."
121  },
122  "facets": {
123  "$ref": "#/components/schemas/facets"
124  }
125  }
126  }
127  }
128  }
129  },
130  "400": {
131  "description": "Bad request",
132  "content": {
133  "application/json": {
134  "schema": { "$ref": "#/components/schemas/errorResponse" }
135  }
136  }
137  }
138  }
139  }
140  },
141  "/api/1/search/facets": {
142  "get": {
143  "operationId": "search-facets",
144  "summary": "Retrieve search facet information",
145  "tags": [
146  "Search"
147  ],
148  "responses": {
149  "200": {
150  "description": "Ok",
151  "content": {
152  "application/json": {
153  "schema": {
154  "type": "object",
155  "properties": {
156  "facets": {
157  "$ref": "#/components/schemas/facets"
158  },
159  "time": {
160  "type": "number",
161  "description": "Execution time."
162  }
163  }
164  }
165  }
166  }
167  }
168  }
169  }
170  }
171 
172  }
173 }