-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add OpenAPI spec for Monitoring API (#1683)
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com> Co-authored-by: gazconroy <gazconroyster@gmail.com>
- Loading branch information
1 parent
8827b72
commit 8765f6d
Showing
50 changed files
with
870 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.34 | ||
0.0.35 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Metric: | ||
type: string | ||
enum: | ||
- avg_build_time | ||
- ssd_usage | ||
- ram_search_usage | ||
- ram_indexing_usage | ||
- cpu_usage | ||
- '*' | ||
example: '*' | ||
|
||
Period: | ||
type: string | ||
enum: | ||
- minute | ||
- hour | ||
- day | ||
- week | ||
- month | ||
example: week | ||
|
||
Region: | ||
title: region | ||
type: string | ||
description: The region where the cluster is located. | ||
enum: | ||
- au | ||
- br | ||
- ca | ||
- de | ||
- eu | ||
- hk | ||
- in | ||
- jp | ||
- sg | ||
- uae | ||
- uk | ||
- usc | ||
- use | ||
- usw | ||
- za | ||
example: de | ||
|
||
Status: | ||
title: status | ||
type: string | ||
description: Status of the cluster. | ||
enum: | ||
- operational | ||
- degraded_performance | ||
- partial_outage | ||
- major_outage | ||
|
||
ServerStatus: | ||
title: status | ||
type: string | ||
enum: | ||
- PRODUCTION | ||
|
||
Type: | ||
title: type | ||
type: string | ||
enum: | ||
- cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# path | ||
Clusters: | ||
name: clusters | ||
in: path | ||
required: true | ||
description: Subset of clusters, separated by comma. | ||
schema: | ||
# The `correct` (?) schema should be type array/items string, | ||
# But the SDK generator expects a string, because it can't replace a list of strings in the URL. | ||
type: string | ||
example: 'c1-de,c2-de,c3-de' | ||
|
||
MetricInPath: | ||
name: metric | ||
in: path | ||
required: true | ||
description: | | ||
Metric to report. | ||
For more information about the individual metrics, see the response. | ||
To include all metrics, use `*` as the parameter. | ||
schema: | ||
$ref: './enums.yml#/Metric' | ||
|
||
PeriodInPath: | ||
name: period | ||
in: path | ||
required: true | ||
description: | | ||
Period over which to aggregate the metrics: | ||
- `minute`. Aggregate the last minute. 1 data point per 10 seconds. | ||
- `hour`. Aggregate the last hour. 1 data point per minute. | ||
- `day`. Aggregate the last day. 1 data point per 10 minutes. | ||
- `week`. Aggregate the last week. 1 data point per hour. | ||
- `month`. Aggregate the last month. 1 data point per day. | ||
schema: | ||
$ref: './enums.yml#/Period' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
description: Bad Request. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
reason: | ||
type: string | ||
examples: | ||
BadRequest: | ||
value: | ||
reason: Unknown servers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
description: Forbidden | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
reason: | ||
type: string | ||
examples: | ||
Forbidden: | ||
value: | ||
reason: invalid credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
title: IncidentsResponse | ||
type: object | ||
properties: | ||
incidents: | ||
type: object | ||
additionalProperties: | ||
x-additionalPropertiesName: cluster | ||
$ref: '../schemas/Incidents.yml' | ||
examples: | ||
success: | ||
value: | ||
incidents: | ||
m134-de: | ||
- t: 1687441685000 | ||
v: | ||
title: 'Incident on cluster m134-de: Everything operating normally.' | ||
status: operational | ||
- t: 1687441579000 | ||
v: | ||
title: >- | ||
Incident on cluster m134-de: We are encountering a major | ||
issue that impact all API calls. | ||
status: major_outage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
title: IndexingTimeResponse | ||
type: object | ||
properties: | ||
metrics: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
indexing: | ||
additionalProperties: | ||
x-additionalPropertiesName: times | ||
$ref: '../schemas/Time.yml' | ||
examples: | ||
Success: | ||
value: | ||
metrics: | ||
indexing: | ||
c16-de: | ||
- t: 1688056200000 | ||
v: 1562 | ||
- t: 1688056800000 | ||
v: 1637 | ||
- t: 1688057400000 | ||
v: 1754 |
15 changes: 15 additions & 0 deletions
15
specs/monitoring/common/responses/InfrastructureAPIUnauthorized.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
description: Unauthorized | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
reason: | ||
type: string | ||
examples: | ||
Unauthorized: | ||
value: | ||
reason: >- | ||
The infrastructure usage API is only available on Enterprise plans. | ||
Please contact enterprise@algolia.com for more detail. |
Oops, something went wrong.