v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Downtimes

Schedule a downtime

Schedule a downtime.

post/api/v2/downtime

Request body

Example request

{
  "data": {
    "attributes": {
      "display_timezone": "America/New_York",
      "message": "Message about the downtime",
      "monitor_identifier": {
        "monitor_id": 123
      },
      "notify_end_states": [
        "alert",
        "warn"
      ],
      "notify_end_types": [
        "canceled",
        "expired"
      ],
      "schedule": {
        "recurrences": [
          {
            "duration": "123d",
            "rrule": "FREQ=MONTHLY;BYSETPOS=3;BYDAY=WE;INTERVAL=1",
            "start": "2020-01-02T03:04"
          }
        ],
        "timezone": "America/New_York"
      },
      "scope": "env:(staging OR prod) AND datacenter:us-east-1"
    },
    "type": "downtime"
  }
}

Response

OK

Example response

{
  "data": {
    "attributes": {
      "canceled": "2020-01-02T03:04:05.282979+0000",
      "created": "2020-01-02T03:04:05.282979+0000",
      "display_timezone": "America/New_York",
      "message": "Message about the downtime",
      "modified": "2020-01-02T03:04:05.282979+0000",
      "monitor_identifier": {
        "monitor_id": 123
      },
      "notify_end_states": [
        "alert",
        "warn"
      ],
      "notify_end_types": [
        "canceled",
        "expired"
      ],
      "schedule": {
        "current_downtime": {
          "end": "2020-01-02 03:04:00+00:00",
          "start": "2020-01-02 03:04:00+00:00"
        },
        "recurrences": [
          {
            "duration": "123d",
            "rrule": "FREQ=MONTHLY;BYSETPOS=3;BYDAY=WE;INTERVAL=1",
            "start": "2020-01-02T03:04"
          }
        ],
        "timezone": "America/New_York"
      },
      "scope": "env:(staging OR prod) AND datacenter:us-east-1",
      "status": "active"
    },
    "id": "00000000-0000-1234-0000-000000000000",
    "relationships": {
      "created_by": {
        "data": {
          "id": "00000000-0000-1234-0000-000000000000",
          "type": "users"
        }
      },
      "monitor": {
        "data": {
          "id": "12345",
          "type": "monitors"
        }
      }
    },
    "type": "downtime"
  },
  "included": [
    {
      "relationships": {
        "org": {
          "data": {
            "id": "00000000-0000-beef-0000-000000000000",
            "type": "orgs"
          }
        },
        "other_orgs": {
          "data": []
        },
        "other_users": {
          "data": []
        },
        "roles": {
          "data": [
            {
              "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
              "type": "roles"
            }
          ]
        }
      },
      "type": "users"
    }
  ]
}