1.4

1.4

post /v1/alerts

Description

Create an Alert

State ACTIVE (CURRENT)

VersionNot Before
1.4-

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

AlertCreateRequest

Responses

HTTP CodeDescriptionSchema
201CreatedAlertCreateResponse
400Bad RequestNone
401UnauthorizedNone
403ForbiddenNone

Example HTTP request

Request path

/v1/alerts

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = servicewatch 1.4"

Request body

{
    "description": "Description for Alert Test",
    "dimension": {
        "key": "resource_id",
        "value": "10bf5d24-0f20-4066-bb0b-de2b1d6ff502"
    },
    "dimensions": [],
    "evaluation_count": 3,
    "individual_items": [
        {
            "key": "VolumeID",
            "value": "45fbde15-cdd2-4891-be31-4a9de75fccda"
        }
    ],
    "level": "HIGH",
    "lower_bound": 80.0,
    "metric_id": "f13aab3b88c341b2bc73f8925a0e8cc5",
    "missing_data_option": "BREACHING",
    "name": "Alert Test",
    "namespace_id": "1d9d05af5c624f2cb80a45f2c911e2f4",
    "operator": "RANGE",
    "period": 300,
    "recipient_ids": [
        "1234da92-634a-4f8c-932e-9d650599ab1b",
        "1234da92-634a-4f8c-932e-9d650599ab1a",
        "1234da92-634a-4f8c-932e-9d650599ab1c"
    ],
    "statistic": "AVG",
    "tags": [
        {
            "key": "key01",
            "value": "value01"
        }
    ],
    "threshold": 80.0,
    "upper_bound": 90.0,
    "violation_count": 2
}

Example HTTP response

Response 201

{
    "created_at": "2024-01-15T10:30:00.000Z",
    "created_by": "f4b8a4c4017f4f8d8399f0c02582ae47",
    "id": "3234bd0f12fa4d0b97ab9feff6c09b8e"
}