-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(specs): add OpenAPI spec for Monitoring API #1683
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
e3086e2
feat: add OpenAPI spec for Monitoring API
kai687 e4580f6
Merge branch 'main' into feat/specs/monitoring
kai687 adb6641
Merge branch 'main' into feat/specs/monitoring
kai687 6774bc2
feat: enable monitoring specs
shortcuts 0d5a269
Apply suggestions from code review
kai687 01c0ec2
Apply suggestions from code review
kai687 49405b1
fix: spec for docs
kai687 8e1f8bc
fix: throw errors when wrong tags
kai687 0f38136
fix: spec for docs
kai687 789d099
fix: parameters
kai687 d47390f
fix: clarify
kai687 9439820
fix: textual form for globs
shortcuts f59a57d
fix: format
shortcuts 205102d
Merge branch 'main' into feat/specs/monitoring
shortcuts b49ef15
fix: add test
shortcuts 6bb3fd9
Merge branch 'main' into feat/specs/monitoring
shortcuts 911089b
feat: all tests
shortcuts a033956
fix: rename operations
kai687 10e01e6
Merge branch 'main' into feat/specs/monitoring
kai687 137fc2d
fix: titles to responses
kai687 e74da84
fix: titles in correct place
kai687 07f7d6a
fix: clusters type
kai687 3aa1bdf
fix: rename tests
kai687 d4aa8b0
fix: no monitoring for dart
kai687 9abad11
fix: json not yml here
kai687 08d9af6
Merge branch 'main' into feat/specs/monitoring
kai687 7be6970
Merge branch 'main' into feat/specs/monitoring
shortcuts b8c0a51
fix: tests
shortcuts db37952
fix: tests
shortcuts 97fdea0
fix: cts gen javascript
shortcuts d68034d
Merge branch 'main' into feat/specs/monitoring
shortcuts 8c8120c
fix: client requests
shortcuts 5736378
feat: custom requests
shortcuts 9dfe220
fix: immutable install
shortcuts 2d049d4
Merge branch 'main' into feat/specs/monitoring
shortcuts fdd0ef0
chore: cleanup cache
shortcuts f0432da
fix: generate
shortcuts d9b9e2d
fix: track new files
shortcuts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that file generated ?