|
1 | | -# API Reference |
| 1 | +# API |
| 2 | +Universal Search API |
2 | 3 |
|
| 4 | +## Version: 0.1.0 |
| 5 | + |
| 6 | +### /lineage |
| 7 | + |
| 8 | +#### GET |
| 9 | +##### Summary: |
| 10 | + |
| 11 | +lineage list api |
| 12 | + |
| 13 | +##### Description: |
| 14 | + |
| 15 | +Returns the lineage graph, optionally filtered by type. Each entry in the graph describes a resource using it's urn and type, and has `downstreams` and `upstreams` fields that declare related resources. By default, the returned graph will only show immediate and directly related resources. For instance, say that according to the lineage configuration, there exist 3 resources R1, R2 and R3 where data flows from R1 -> R2 -> R3. If the graph is requested with the filter for R1 and R3 , the returned Graph will have a Node R1 that references a downstream R2, but since it was filtered out, it won't be available in the graph. Similarly, R3 will declare a phamtom upstream R2. This can be addressed via the `collapse` feature. If we make the same request with collapse set to true, R1 will declare R3 as its downstream (using trasitive property) and R3 will also have a corresponding upstream declaration of R1. |
| 16 | + |
| 17 | +##### Parameters |
| 18 | + |
| 19 | +| Name | Located in | Description | Required | Schema | |
| 20 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 21 | +| filter.type | query | | No | string | |
| 22 | +| collapse | query | | No | boolean | |
| 23 | + |
| 24 | +##### Responses |
| 25 | + |
| 26 | +| Code | Description | Schema | |
| 27 | +| ---- | ----------- | ------ | |
| 28 | +| 200 | OK | [AdjacencyMap](#adjacencymap) | |
| 29 | +| 404 | resource not found | [Error](#error) | |
| 30 | + |
| 31 | +### /lineage/{type}/{resource} |
| 32 | + |
| 33 | +#### GET |
| 34 | +##### Summary: |
| 35 | + |
| 36 | +lineage get api |
| 37 | + |
| 38 | +##### Description: |
| 39 | + |
| 40 | +Returns lineage graph of a single resource. For BQTable to BQTable lineage, set collapse to true |
| 41 | + |
| 42 | +##### Parameters |
| 43 | + |
| 44 | +| Name | Located in | Description | Required | Schema | |
| 45 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 46 | +| collapse | query | | No | boolean | |
| 47 | + |
| 48 | +##### Responses |
| 49 | + |
| 50 | +| Code | Description | Schema | |
| 51 | +| ---- | ----------- | ------ | |
| 52 | +| 200 | OK | [AdjacencyMap](#adjacencymap) | |
| 53 | +| 404 | invalid type requested | [Error](#error) | |
| 54 | + |
| 55 | +### /types |
| 56 | + |
| 57 | +#### GET |
| 58 | +##### Summary: |
| 59 | + |
| 60 | +fetch all types |
| 61 | + |
| 62 | +##### Description: |
| 63 | + |
| 64 | +used to fetch all types |
| 65 | + |
| 66 | +##### Responses |
| 67 | + |
| 68 | +| Code | Description | Schema | |
| 69 | +| ---- | ----------- | ------ | |
| 70 | +| 200 | OK | [ [Type](#type) ] | |
| 71 | + |
| 72 | +#### PUT |
| 73 | +##### Summary: |
| 74 | + |
| 75 | +initialise a type |
| 76 | + |
| 77 | +##### Description: |
| 78 | + |
| 79 | +used for initialising/update a type. A type in columbus's nomenclature is a "collection" of documents that belong to a single named type. Type holds metadata about this collection, used when serving search requests |
| 80 | + |
| 81 | +##### Parameters |
| 82 | + |
| 83 | +| Name | Located in | Description | Required | Schema | |
| 84 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 85 | +| | body | | No | [Type](#type) | |
| 86 | + |
| 87 | +##### Responses |
| 88 | + |
| 89 | +| Code | Description | Schema | |
| 90 | +| ---- | ----------- | ------ | |
| 91 | +| 201 | OK | [Type](#type) | |
| 92 | +| 400 | invalid type | [Error](#error) | |
| 93 | + |
| 94 | +### /types/{name} |
| 95 | + |
| 96 | +#### PUT |
| 97 | +##### Summary: |
| 98 | + |
| 99 | +upload documents for a given type. |
| 100 | + |
| 101 | +##### Description: |
| 102 | + |
| 103 | +Use this API for adding records for a certain type. The document can have any number of fields, however; it must atleast have fields specified by 'title' and 'id' properties on type.record_attributes. The value of these properties must be string and they must be located at the object root. |
| 104 | + |
| 105 | +##### Parameters |
| 106 | + |
| 107 | +| Name | Located in | Description | Required | Schema | |
| 108 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 109 | +| name | path | | Yes | string | |
| 110 | +| payload | body | | No | [ [Record](#record) ] | |
| 111 | + |
| 112 | +##### Responses |
| 113 | + |
| 114 | +| Code | Description | Schema | |
| 115 | +| ---- | ----------- | ------ | |
| 116 | +| 200 | OK | [Status](#status) | |
| 117 | +| 400 | validation error | [ValidationError](#validationerror) | |
| 118 | + |
| 119 | +#### DELETE |
| 120 | +##### Summary: |
| 121 | + |
| 122 | +delete a type by its name. |
| 123 | + |
| 124 | +##### Description: |
| 125 | + |
| 126 | +Use this API to delete a type along with all of its records. This is an idempotent operation. |
| 127 | + |
| 128 | +##### Parameters |
| 129 | + |
| 130 | +| Name | Located in | Description | Required | Schema | |
| 131 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 132 | +| name | path | | Yes | string | |
| 133 | + |
| 134 | +##### Responses |
| 135 | + |
| 136 | +| Code | Description | Schema | |
| 137 | +| ---- | ----------- | ------ | |
| 138 | +| 200 | OK | string | |
| 139 | +| 422 | reserved type name error | [Error](#error) | |
| 140 | + |
| 141 | +### /types/{name}/details |
| 142 | + |
| 143 | +#### GET |
| 144 | +##### Summary: |
| 145 | + |
| 146 | +fetch a type details |
| 147 | + |
| 148 | +##### Description: |
| 149 | + |
| 150 | +used to fetch type details by its name |
| 151 | + |
| 152 | +##### Responses |
| 153 | + |
| 154 | +| Code | Description | Schema | |
| 155 | +| ---- | ----------- | ------ | |
| 156 | +| 200 | OK | [Type](#type) | |
| 157 | +| 404 | type not found | [Error](#error) | |
| 158 | + |
| 159 | +### /types/{name}/records |
| 160 | + |
| 161 | +#### GET |
| 162 | +##### Summary: |
| 163 | + |
| 164 | +list documents for the type |
| 165 | + |
| 166 | +##### Parameters |
| 167 | + |
| 168 | +| Name | Located in | Description | Required | Schema | |
| 169 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 170 | +| name | path | | Yes | string | |
| 171 | +| filter.environment | query | environment name for filtering the records only for specific environment | No | string | |
| 172 | +| select | query | comma separated list of fields to return per record (only toplevel keys are supported) | No | string | |
| 173 | + |
| 174 | +##### Responses |
| 175 | + |
| 176 | +| Code | Description | Schema | |
| 177 | +| ---- | ----------- | ------ | |
| 178 | +| 200 | OK | [ [Record](#record) ] | |
| 179 | +| 400 | bad input | [Error](#error) | |
| 180 | +| 404 | not found | [Error](#error) | |
| 181 | + |
| 182 | +### /types/{name}/records/{id} |
| 183 | + |
| 184 | +#### DELETE |
| 185 | +##### Summary: |
| 186 | + |
| 187 | +delete a record in a type by its record ID |
| 188 | + |
| 189 | +##### Parameters |
| 190 | + |
| 191 | +| Name | Located in | Description | Required | Schema | |
| 192 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 193 | +| name | path | | Yes | string | |
| 194 | +| id | path | | Yes | string | |
| 195 | + |
| 196 | +##### Responses |
| 197 | + |
| 198 | +| Code | Description | Schema | |
| 199 | +| ---- | ----------- | ------ | |
| 200 | +| 200 | OK | string | |
| 201 | +| 404 | type or record cannot be found | [Error](#error) | |
| 202 | + |
| 203 | +### /types/{name}/{id} |
| 204 | + |
| 205 | +#### GET |
| 206 | +##### Summary: |
| 207 | + |
| 208 | +get a record by id |
| 209 | + |
| 210 | +##### Parameters |
| 211 | + |
| 212 | +| Name | Located in | Description | Required | Schema | |
| 213 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 214 | +| name | path | | Yes | string | |
| 215 | +| id | path | | Yes | string | |
| 216 | + |
| 217 | +##### Responses |
| 218 | + |
| 219 | +| Code | Description | Schema | |
| 220 | +| ---- | ----------- | ------ | |
| 221 | +| 200 | OK | [Record](#record) | |
| 222 | +| 404 | document or type does not exist | [Error](#error) | |
| 223 | + |
| 224 | +### /search |
| 225 | + |
| 226 | +#### GET |
| 227 | +##### Summary: |
| 228 | + |
| 229 | +search for resources |
| 230 | + |
| 231 | +##### Description: |
| 232 | + |
| 233 | +API for querying documents. 'text' is fuzzy matched against all the available datasets, and matched results are returned. You can specify additional match criteria using 'filter.*' query parameters. You can specify each filter multiple times to specify a set of values for those filters. For instance, to specify two landscape 'vn' and 'th', the query could be `/search/?text=<text>&filter.environment=integration&filter.landscape=vn&filter.landscape=th` |
| 234 | + |
| 235 | +##### Parameters |
| 236 | + |
| 237 | +| Name | Located in | Description | Required | Schema | |
| 238 | +| ---- | ---------- | ----------- | -------- | ---- | |
| 239 | +| text | query | text to search for (fuzzy) | Yes | string | |
| 240 | +| size | query | number of results to return | No | integer | |
| 241 | +| filter.environment | query | restrict results to specified environment(s) eg, integrated, test, staging, production | No | string | |
| 242 | +| filter.landscape | query | restrict results to specified landscape(s) | No | string | |
| 243 | +| filter.entity | query | restrict results to specified organisation | No | string | |
| 244 | +| filter.type | query | restrict results to the specified types (as in a Columbus type, for instance "dagger", or "firehose") | No | string | |
| 245 | + |
| 246 | +##### Responses |
| 247 | + |
| 248 | +| Code | Description | Schema | |
| 249 | +| ---- | ----------- | ------ | |
| 250 | +| 200 | OK | [ [SearchResult](#searchresult) ] | |
| 251 | +| 400 | misconfigured request parameters | [Error](#error) | |
| 252 | + |
| 253 | +### Models |
| 254 | + |
| 255 | + |
| 256 | +#### Classifications |
| 257 | + |
| 258 | +defines the 'class' of the resource |
| 259 | + |
| 260 | +| Name | Type | Description | Required | |
| 261 | +| ---- | ---- | ----------- | -------- | |
| 262 | +| Classifications | string | defines the 'class' of the resource | | |
| 263 | + |
| 264 | +#### Record |
| 265 | + |
| 266 | +| Name | Type | Description | Required | |
| 267 | +| ---- | ---- | ----------- | -------- | |
| 268 | +| name | string | | No | |
| 269 | +| urn | string | | No | |
| 270 | +| team | string | | No | |
| 271 | +| environment | string | | No | |
| 272 | + |
| 273 | +#### Status |
| 274 | + |
| 275 | +| Name | Type | Description | Required | |
| 276 | +| ---- | ---- | ----------- | -------- | |
| 277 | +| status | string | | No | |
| 278 | + |
| 279 | +#### AdjacencyEntry |
| 280 | + |
| 281 | +| Name | Type | Description | Required | |
| 282 | +| ---- | ---- | ----------- | -------- | |
| 283 | +| urn | string | | No | |
| 284 | +| type | string | | No | |
| 285 | +| downstreams | [ string ] | | No | |
| 286 | +| upstreams | [ string ] | | No | |
| 287 | + |
| 288 | +#### AdjacencyMap |
| 289 | + |
| 290 | +| Name | Type | Description | Required | |
| 291 | +| ---- | ---- | ----------- | -------- | |
| 292 | +| <NodeLabel> | [AdjacencyEntry](#adjacencyentry) | | No | |
| 293 | + |
| 294 | +#### Type |
| 295 | + |
| 296 | +| Name | Type | Description | Required | |
| 297 | +| ---- | ---- | ----------- | -------- | |
| 298 | +| name | string | name of the type (for e.g. dagger, firehose) | No | |
| 299 | +| classification | string | defines the 'class' of the resource | No | |
| 300 | +| record_attributes | object | defines metadata for the documents that belong to this type. All properties under record_attributes define(s) a mapping of logical purpose, to the name of the key(s) in the documents that hold those information | No | |
| 301 | + |
| 302 | +#### Error |
| 303 | + |
| 304 | +| Name | Type | Description | Required | |
| 305 | +| ---- | ---- | ----------- | -------- | |
| 306 | +| reason | string | error message | No | |
| 307 | + |
| 308 | +#### SearchResult |
| 309 | + |
| 310 | +| Name | Type | Description | Required | |
| 311 | +| ---- | ---- | ----------- | -------- | |
| 312 | +| id | string | URN of the resource | No | |
| 313 | +| title | string | describes the resource in a human readable form | No | |
| 314 | +| type | string | the individual type of the resource. For example: dagger, firehose | No | |
| 315 | +| description | string | optional description of the record | No | |
| 316 | +| classification | string | defines the 'class' of the resource | No | |
| 317 | +| labels | object | key value pairs describing the labels configured for the given type of resource. Example of labels: team, created, owner etc | No | |
| 318 | + |
| 319 | +#### ValidationError |
| 320 | + |
| 321 | +| Name | Type | Description | Required | |
| 322 | +| ---- | ---- | ----------- | -------- | |
| 323 | +| ValidationError | | | | |
0 commit comments