-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5296e9e
commit f29740a
Showing
10 changed files
with
204 additions
and
0 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
6 changes: 6 additions & 0 deletions
6
specification/resources/monitoring/examples/curl/monitoring_get_appCPUPercentageMetrics.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,6 @@ | ||
lang: cURL | ||
source: |- | ||
curl -X GET \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
"https://api.digitalocean.com/v2/monitoring/metrics/apps/cpu_percentage?app_id=2db3c021-15ad-4088-bfe8-99dc972b9cf6&component_id=sample-application&start=1636051668&end=1636051668" |
6 changes: 6 additions & 0 deletions
6
...fication/resources/monitoring/examples/curl/monitoring_get_appMemoryPercentageMetrics.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,6 @@ | ||
lang: cURL | ||
source: |- | ||
curl -X GET \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
"https://api.digitalocean.com/v2/monitoring/metrics/apps/memory_percentage?app_id=2db3c021-15ad-4088-bfe8-99dc972b9cf6&component_id=sample-application&start=1636051668&end=1636051668" |
6 changes: 6 additions & 0 deletions
6
specification/resources/monitoring/examples/curl/monitoring_get_appRestartCountMetrics.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,6 @@ | ||
lang: cURL | ||
source: |- | ||
curl -X GET \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
"https://api.digitalocean.com/v2/monitoring/metrics/apps/restart_count?app_id=2db3c021-15ad-4088-bfe8-99dc972b9cf6&component_id=sample-application&start=1636051668&end=1636051668" |
39 changes: 39 additions & 0 deletions
39
specification/resources/monitoring/monitoring_get_appCPUPercentageMetrics.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,39 @@ | ||
operationId: monitoring_get_appCPUPercentageMetrics | ||
|
||
summary: Get App CPU Percentage Metrics | ||
|
||
description: >- | ||
To retrieve cpu percentage metrics for a given app, send a GET request to `/v2/monitoring/metrics/apps/cpu_percentage`. | ||
tags: | ||
- Monitoring | ||
|
||
responses: | ||
'200': | ||
$ref: 'responses/app_metric_response.yml' | ||
|
||
'401': | ||
$ref: '../../shared/responses/unauthorized.yml' | ||
|
||
'429': | ||
$ref: '../../shared/responses/too_many_requests.yml' | ||
|
||
'500': | ||
$ref: '../../shared/responses/server_error.yml' | ||
|
||
default: | ||
$ref: '../../shared/responses/unexpected_error.yml' | ||
|
||
|
||
parameters: | ||
- $ref: 'parameters.yml#/app_id' | ||
- $ref: 'parameters.yml#/component_id' | ||
- $ref: 'parameters.yml#/metric_timestamp_start' | ||
- $ref: 'parameters.yml#/metric_timestamp_end' | ||
|
||
x-codeSamples: | ||
- $ref: 'examples/curl/monitoring_get_appCPUPercentageMetrics.yml' | ||
|
||
security: | ||
- bearer_auth: | ||
- 'read' | ||
|
39 changes: 39 additions & 0 deletions
39
specification/resources/monitoring/monitoring_get_appMemoryPercentageMetrics.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,39 @@ | ||
operationId: monitoring_get_appMemoryPercentageMetrics | ||
|
||
summary: Get App Memory Percentage Metrics | ||
|
||
description: >- | ||
To retrieve memory percentage metrics for a given app, send a GET request to `/v2/monitoring/metrics/apps/memory_percentage`. | ||
tags: | ||
- Monitoring | ||
|
||
responses: | ||
'200': | ||
$ref: 'responses/app_metric_response.yml' | ||
|
||
'401': | ||
$ref: '../../shared/responses/unauthorized.yml' | ||
|
||
'429': | ||
$ref: '../../shared/responses/too_many_requests.yml' | ||
|
||
'500': | ||
$ref: '../../shared/responses/server_error.yml' | ||
|
||
default: | ||
$ref: '../../shared/responses/unexpected_error.yml' | ||
|
||
|
||
parameters: | ||
- $ref: 'parameters.yml#/app_id' | ||
- $ref: 'parameters.yml#/component_id' | ||
- $ref: 'parameters.yml#/metric_timestamp_start' | ||
- $ref: 'parameters.yml#/metric_timestamp_end' | ||
|
||
x-codeSamples: | ||
- $ref: 'examples/curl/monitoring_get_appMemoryPercentageMetrics.yml' | ||
|
||
security: | ||
- bearer_auth: | ||
- 'read' | ||
|
39 changes: 39 additions & 0 deletions
39
specification/resources/monitoring/monitoring_get_appRestartCountMetrics.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,39 @@ | ||
operationId: monitoring_get_appRestartCountMetrics.yml | ||
|
||
summary: Get App Restart Count Metrics | ||
|
||
description: >- | ||
To retrieve restart count metrics for a given app, send a GET request to `/v2/monitoring/metrics/apps/restart_count`. | ||
tags: | ||
- Monitoring | ||
|
||
responses: | ||
'200': | ||
$ref: 'responses/app_metric_response.yml' | ||
|
||
'401': | ||
$ref: '../../shared/responses/unauthorized.yml' | ||
|
||
'429': | ||
$ref: '../../shared/responses/too_many_requests.yml' | ||
|
||
'500': | ||
$ref: '../../shared/responses/server_error.yml' | ||
|
||
default: | ||
$ref: '../../shared/responses/unexpected_error.yml' | ||
|
||
|
||
parameters: | ||
- $ref: 'parameters.yml#/app_id' | ||
- $ref: 'parameters.yml#/component_id' | ||
- $ref: 'parameters.yml#/metric_timestamp_start' | ||
- $ref: 'parameters.yml#/metric_timestamp_end' | ||
|
||
x-codeSamples: | ||
- $ref: 'examples/curl/monitoring_get_appRestartCountMetrics.yml' | ||
|
||
security: | ||
- bearer_auth: | ||
- 'read' | ||
|
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
19 changes: 19 additions & 0 deletions
19
specification/resources/monitoring/responses/app_metric_response.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,19 @@ | ||
description: The response will be a JSON object with a key called `data` and `status`. | ||
|
||
headers: | ||
ratelimit-limit: | ||
$ref: '../../../shared/headers.yml#/ratelimit-limit' | ||
ratelimit-remaining: | ||
$ref: '../../../shared/headers.yml#/ratelimit-remaining' | ||
ratelimit-reset: | ||
$ref: '../../../shared/headers.yml#/ratelimit-reset' | ||
|
||
content: | ||
application/json: | ||
schema: | ||
$ref: '../models/metrics.yml' | ||
|
||
examples: | ||
Memory: | ||
$ref: './examples.yml#/app_memory_percentage' | ||
|
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