-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
132 lines (128 loc) · 4.11 KB
/
swagger.yaml
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
swagger: "2.0"
info:
title: "dp-cantabular-metadata-extractor-api"
description: "Supply Cantabular metadata (2021) for Florence metadata journey."
version: 1.0.0
license:
name: "Open Government Licence v3.0"
url: "http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
basePath: "/v1"
schemes:
- http
tags:
- name: "public"
paths:
/cantabular-metadata/dataset/{dataset}/lang/{lang}:
get:
parameters:
- name: dataset
type: string
in: path
required: true
description: "The name of the dataset table (aka cantabular blob), used by the cantabular metadata service, such as RM001."
- name: lang
type: string
in: path
required: true
description: "The abbreviation that refers to the language. Currently the only one accepted is en."
tags:
- public
summary: 2021 Metadata Endpoint
description: Returns all available 2021 Metadata.
produces:
- application/json
responses:
200:
description: "Successfully returned metadata, for the requested dataset and language."
500:
$ref: '#/responses/InternalError'
/health:
get:
tags:
- public
summary: "Returns API's health status"
description: "Returns health status of the API and checks on dependent services"
produces:
- application/json
responses:
200:
description: "Successfully returns OK status with checks of dependent services"
schema:
$ref: "#/definitions/Health"
429:
description: "Services warming up or degraded (at least one check in WARNING or CRITICAL status)"
500:
$ref: "#/responses/InternalError"
responses:
InternalError:
description: "Failed to process the request due to an internal error"
definitions:
Health:
type: object
properties:
status:
type: string
description: "The status of the API"
enum: ["OK", "WARNING", "CRITICAL"]
version:
type: object
properties:
build_time:
type: string
description: "The build date and time of the API"
example: "2020-06-11T12:49:20+01:00"
git_commit:
type: string
description: "The git commit hash of the API"
example: "7c2febbf2b818175112478d4ffbadbee1b654f63"
language:
type: string
description: "The programming language used to implement API"
example: "go"
language_version:
type: string
description: "The version of the programming language used to implement API"
example: "go1.14.3"
version:
type: string
description: "The version of API"
example: "1.0.0"
uptime:
type: string
description: "The uptime of API"
example: "34516"
start_time:
type: string
description: "The start date and time of API running"
example: "2020-06-11T11:49:21.520922Z"
checks:
type: array
items:
$ref: '#/definitions/HealthChecker'
HealthChecker:
type: object
properties:
name:
type: string
description: "The name of service used by API"
enum: ["dp-cantabular-metadata-service"]
status:
type: string
description: "The status of the service"
enum: ["OK", "WARNING", "CRITICAL"]
message:
type: string
description: "The message status of the service"
example: "dp-cantabular-metadata-service is ok"
last_checked:
type: string
description: "The last health check date and time of the service"
example: "2020-06-11T11:49:50.330089Z"
last_success:
type: string
description: "The last successful health check date and time of the service"
example: "2020-06-11T11:49:50.330089Z"
last_failure:
type: string
description: "The last failed health check date and time of the service"
example: "2019-09-22T11:48:51.0000001Z"