-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add documentation for /event path (#61)
- Loading branch information
Showing
6 changed files
with
142 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
events: | ||
delete: | ||
summary: "Deletes all notification events" | ||
operationId: DeleteEvents | ||
tags: | ||
- event | ||
responses: | ||
200: | ||
description: "Events removed successfully." | ||
|
||
eventForTrigger: | ||
get: | ||
summary: "Gets all trigger events for current page and their count" | ||
operationId: GetTriggerEvents | ||
tags: | ||
- event | ||
parameters: | ||
- $ref: ../shared/parameters/_index.yml#/triggerID | ||
- $ref: ../shared/parameters/_index.yml#/page | ||
- $ref: ../shared/parameters/_index.yml#/size | ||
responses: | ||
$ref: ./responses.yml#/getTriggerEvents |
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 @@ | ||
getTriggerEvents: | ||
200: | ||
description: "Events fetched successfully." | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
page: | ||
type: integer | ||
description: "Current page being displayed. Pages are zero-indexed." | ||
example: 0 | ||
size: | ||
type: integer | ||
description: "Maximum number of items displayed per page." | ||
example: 100 | ||
total: | ||
type: integer | ||
description: "Total number of available events for the trigger" | ||
example: 10 | ||
list: | ||
type: array | ||
description: "List of trigger events" | ||
items: | ||
$ref: "../shared/schemas/Event.yml#/Event" | ||
400: | ||
$ref: "../shared/responses/_index.yml#/BadRequest" |
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,55 @@ | ||
Event: | ||
type: object | ||
properties: | ||
trigger_event: | ||
type: boolean | ||
timestamp: | ||
type: integer | ||
example: 1590741878 | ||
metric: | ||
type: string | ||
example: "carbon.agents.*.metricsReceived" | ||
value: | ||
type: number | ||
example: 70 | ||
state: | ||
type: string | ||
description: "State of the metric after the data point was recorded." | ||
enum: ["OK", "WARN", "ERROR", "NODATA", "EXCEPTION", "TEST"] | ||
example: "OK" | ||
trigger_id: | ||
type: string | ||
format: uuid | ||
example: "5ff37996-8927-4cab-8987-970e80d8e0a8" | ||
sub_id: | ||
type: string | ||
contactId: | ||
type: string | ||
old_state: | ||
type: string | ||
description: "State of the metric before the data point was recorded. Takes the same value as `state`." | ||
example: "ERROR" | ||
msg: | ||
type: string | ||
event_message: | ||
"$ref": "#/definitions/EventInfo" | ||
|
||
definitions: | ||
EventInfo: | ||
type: object | ||
properties: | ||
maintenance: | ||
"$ref": "#/definitions/MaintenanceInfo" | ||
interval: | ||
type: integer | ||
MaintenanceInfo: | ||
type: object | ||
properties: | ||
setup_user: | ||
type: string | ||
setup_time: | ||
type: integer | ||
remove_user: | ||
type: string | ||
remove_time: | ||
type: integer |
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,4 +1,6 @@ | ||
Contact: | ||
$ref: "./Contact.yml#/Contact" | ||
ContactRequest: | ||
$ref: "./Contact.yml#/ContactRequest" | ||
$ref: "./Contact.yml#/ContactRequest" | ||
Event: | ||
$ref: "./Event.yml#/Event" |