NAV Navbar
shell

Introduction

Welcome to the Amixr Incident Management API!

We are always happy to help online in chat and in GitHub issues.

Also please be aware about Rate Limits.

Simplified API Structure

Amixr API Scheme

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  --header "Authorization: meowmeowmeow"

Make sure to replace meowmeowmeow with your API key. Or use meowmeowmeow for test purposes.

Amixr uses API keys to allow access to the API. You can request a new Amixr API key here.

API key is specific for a User and a Team. That means that you should request the different API Key if you want to switch the team you are working with.

Amixr expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: meowmeowmeow

Pagination

List endpoints such as “List Integrations” or “List Incidents” return multiple objects. Amixr API return them in pages. Please note that the page size may vary.

Parameter Meaning
count The total number of items. It can be 0 if a request does not return any data.
next A link to the next page. It can be null if the next page does not contain any data.
previous A link to the previous page. It can be null if the previous page does not contain any data.
results The data list. Can be [] if a request does not return any data.

- Users

Get User

curl "https://amixr.io/api/v1/users/current/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "id": "U4DNY931HHJS5",
    "team_id": "TCNPY4A1BWUMP",
    "email": "public-api-demo-user-1@amixr.io",
    "slack": [
        {
            "user_id": "UALEXSLACKDJPK",
            "team_id": "TALEXSLACKDJPK"
        }
    ],
    "name": "Alex",
    "role": "admin"
}

This endpoint retrieves the user object.

HTTP Request

GET https://amixr.io/api/v1/users/<USER_ID>/

Parameter Unique Description
id Yes/team User ID
team Yes Team ID
email Yes/team User E-Mail
slack Yes/team List of user ID's from connected Slack. User linking key is e-mail.
name No User name
role No Options: "user", "observer", "admin". Read more about user statuses here.

List Users

curl "https://amixr.io/api/v1/users/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "U4DNY931HHJS5",
            "team_id": "TCNPY4A1BWUMP",
            "email": "public-api-demo-user-1@amixr.io",
            "slack": [
                {
                    "user_id": "UALEXSLACKDJPK",
                    "team_id": "TALEXSLACKDJPK"
                }
            ],
            "name": "Alex",
            "role": "admin"
        }
    ]
}

This endpoint retrieves all users.

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/users/

Update User

curl "https://amixr.io/api/v1/users/U4DNY931HHJS5/" \
  --request PUT \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "name":"Alex",
      "role":"admin"
  }'

The above command returns JSON structured like this:

{
    "id": "U4DNY931HHJS5",
    "team_id": "TCNPY4A1BWUMP",
    "email": "public-api-demo-user-1@amixr.io",
    "slack": [
        {
            "user_id": "UALEXSLACKDJPK",
            "team_id": "TALEXSLACKDJPK"
        }
    ],
    "name": "Alex",
    "role": "admin"
}

This endpoint allows to update user.

Parameter Unique Required
name No Optional
role No Optional

HTTP Request

PUT https://amixr.io/api/v1/users/<USER_ID>/

- User Groups

Used in Escalation Policies with type = "notify_user_group".

List User Groups

curl "https://amixr.io/api/v1/user_groups/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "GPFAPH7J7BKJB",
            "type": "slack_based",
            "slack": {
              "id": "MEOW_SLACK_ID",
              "name": "Meow Group",
              "handle": "meow_group"
            }
        }
    ]
}
Parameter Unique Description
id Yes User Group ID
type No For now Amixr supports only Slack-defined user groups.
slack No Metadata retrieved from Slack.

HTTP Request

GET https://amixr.io/api/v1/user_groups/

- Integrations

Create Integration

curl "https://amixr.io/api/v1/integrations/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "type":"grafana"
  }'

The above command returns JSON structured like this:

{
    "id": "CFRPV98RPR1U8",
    "name": "Grafana :blush:",
    "link": "https://app.amixr.io/integrations/v1/grafana/mReAoNwDm0eMwKo1mTeTwYo/",
    "incidents_count": 1,
    "type": "grafana",
    "default_route_id": "RVBE4RKQSCGJ2",
    "templates": {
        "grouping_key": null,
        "resolve_signal": null,
        "slack": {
            "title": null,
            "message": null,
            "image_url": null
        }
    }
}

Integrations are sources of alerts and incidents for Amixr. For example check how to integrate Amixr with AlertManager in our docs.

HTTP Request

POST https://amixr.io/api/v1/integrations/

Get Integration

curl "https://amixr.io/api/v1/integrations/CFRPV98RPR1U8/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "id": "CFRPV98RPR1U8",
    "name": "Grafana :blush:",
    "link": "https://app.amixr.io/integrations/v1/grafana/mReAoNwDm0eMwKo1mTeTwYo/",
    "incidents_count": 1,
    "type": "grafana",
    "default_route_id": "RVBE4RKQSCGJ2",
    "templates": {
        "grouping_key": null,
        "resolve_signal": null,
        "slack": {
            "title": null,
            "message": null,
            "image_url": null
        }
    }
}

This endpoint retrieves an integration. Integrations are sources of alerts and incidents for Amixr. For example check how to integrate Amixr with AlertManager in our docs.

HTTP Request

GET https://amixr.io/api/v1/integrations/<INTEGRATION_ID>/

List Integrations

curl "https://amixr.io/api/v1/integrations/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "CFRPV98RPR1U8",
            "name": "Grafana :blush:",
            "link": "https://app.amixr.io/integrations/v1/grafana/mReAoNwDm0eMwKo1mTeTwYo/",
            "incidents_count": 3,
            "type": "grafana",
            "default_route_id": "RVBE4RKQSCGJ2",
            "templates": {
                "grouping_key": null,
                "resolve_signal": null,
                "slack": {
                    "title": null,
                    "message": null,
                    "image_url": null
                }
            }
        }
    ]
}

HTTP Request

GET https://amixr.io/api/v1/integrations/

Update Integration

curl "https://amixr.io/api/v1/integrations/CFRPV98RPR1U8/" \
  --request PUT \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "templates": {
          "grouping_key": null,
          "resolve_signal": null,
          "slack": {
             "title": null,
             "message": null,
             "image_url": null
          }
      }
  }'

The above command returns JSON structured like this:

{
    "id": "CFRPV98RPR1U8",
    "name": "Grafana :blush:",
    "link": "https://app.amixr.io/integrations/v1/grafana/mReAoNwDm0eMwKo1mTeTwYo/",
    "incidents_count": 1,
    "type": "grafana",
    "default_route_id": "RVBE4RKQSCGJ2",
    "templates": {
        "grouping_key": null,
        "resolve_signal": null,
        "slack": {
           "title": null,
           "message": null,
           "image_url": null
        }
    }
}

HTTP Request

PUT https://amixr.io/api/v1/integrations/<INTEGRATION_ID>/

Delete Integration

curl "https://amixr.io/api/v1/integrations/CFRPV98RPR1U8/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow"

Integration removal won't trigger removal of related Incidents or Alerts. Deleted integration will stop recording new Alerts from monitoring.

HTTP Request

DELETE https://amixr.io/api/v1/integrations/<INTEGRATION_ID>/

- Routes

Create Route

curl "https://amixr.io/api/v1/routes/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "integration_id": "CFRPV98RPR1U8",
      "routing_regex": "us-(east|west)",
      "position": 0,
      "slack": {
        "channel_id": "CH23212D"
      }
  }'

The above command returns JSON structured like this:

{
    "id": "RIYGUJXCPFHXY",
    "integration_id": "CFRPV98RPR1U8",
    "routing_regex": "us-(east|west)",
    "position": 0,
    "is_the_last_route": false,
    "slack": {
        "channel_id": "CH23212D"
    }
}

Routes allow to direct different alerts to different messenger channels and Escalation Policies. Useful for:

Parameter Unique Required Description
integration_id No Yes Each Route is assigned to a specific Integration.
routing_regex Yes Yes Python Regex query (use https://regex101.com/ for debugging). Amixr choose the route for an alert in case there is a match inside the whole alert payload.
position Yes Optional Route matching is performed one after another starting from position=0. Position=-1 will put the Route to the end of the list before is_the_last_route. The new Route created with a position of already existing route will move the old Route (and all following) down in the list.
slack Yes Optional Dictionary with slack-specific settings for a route.

HTTP Request

POST https://amixr.io/api/v1/routes/

Get Route

curl "https://amixr.io/api/v1/routes/RIYGUJXCPFHXY/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \

The above command returns JSON structured like this:

{
    "id": "RIYGUJXCPFHXY",
    "integration_id": "CFRPV98RPR1U8",
    "routing_regex": "us-(east|west)",
    "position": 0,
    "is_the_last_route": false,
    "slack": {
        "channel_id": "CH23212D"
    }
}

HTTP Request

GET https://amixr.io/api/v1/routes/<ROUTE_ID>/

List Routes

curl "https://amixr.io/api/v1/routes/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "RIYGUJXCPFHXY",
            "integration_id": "CFRPV98RPR1U8",
            "routing_regex": "us-(east|west)",
            "position": 0,
            "is_the_last_route": false,
            "slack": {
                "channel_id": "CH23212D"
            }
        },
        {
            "id": "RVBE4RKQSCGJ2",
            "integration_id": "CFRPV98RPR1U8",
            "routing_regex": ".*",
            "position": 1,
            "is_the_last_route": false,
            "slack": {
                "channel_id": "CH23212D"
            }
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/routes/

Update Route

curl "https://amixr.io/api/v1/routes/RIYGUJXCPFHXY/" \
  --request PUT \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "routing_regex": "us-(east|west)",
      "position": 0,
      "slack": {
        "channel_id": "CH23212D"
      }
  }'

The above command returns JSON structured like this:

{
    "id": "RIYGUJXCPFHXY",
    "integration_id": "CFRPV98RPR1U8",
    "routing_regex": "us-(east|west)",
    "position": 0,
    "is_the_last_route": false,
    "slack": {
        "channel_id": "CH23212D"
    }
}

HTTP Request

PUT https://amixr.io/api/v1/routes/<ROUTE_ID>/

Delete Route

curl "https://amixr.io/api/v1/routes/RIYGUJXCPFHXY/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

HTTP Request

DELETE https://amixr.io/api/v1/routes/<ROUTE_ID>/

- Escalation Policies

Create Escalation Policy

curl "https://amixr.io/api/v1/escalation_policies/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "route_id": "RIYGUJXCPFHXY",
      "type": "wait",
      "duration": 60
  }'

The above command returns JSON structured like this:

{
    "id": "E3GA6SJETWWJS",
    "route_id": "RIYGUJXCPFHXY",
    "position": 0,
    "type": "wait",
    "duration": 60
}
Parameter Required Description
route_id Yes Each Escalation Policy is assigned to a specific Route.
position Optional Escalation Policies execute one after another starting from position=0. Position=-1 will put the Escalation Policy to the end of the list. The new Escalation Policy created with a position of already existing Escalation Policy will move the old one (and all following) down in the list.
type Yes A choice: "wait", "notify_persons", "notify_person_next_each_time", "notify_on_call_from_schedule", "notify_user_group", "trigger_action", "resolve", "notify_whole_channel", "notify_if_time_from_to".
duration Optional A time in secs when type "wait" is chosen.
important Optional Default = false. Will activate "important" personal notification rules if "true". Usually used to distinguish alerts you want to be notified immediately by phone. Applicable for types "notify_persons", "notify_on_call_from_schedule" and "notify_user_group".
action_to_trigger If type = trigger_action Id of Action.
group_to_notify If type = notify_user_group Id of User Group.
persons_to_notify If type = notify_persons List of id's of Users.
persons_to_notify _next_each_time If type = notify_person_next_each_time List of id's of Users.
notify_on_call _from_schedule If type = notify_on_call_from_schedule Id of a Schedule.
notify_if_time_from If type = notify_if_time_from_to UTC time represents the beginning of the time period, for example 09:00:00Z.
notify_if_time_to If type = notify_if_time_from_to UTC time represents the end of the time period, for example 18:00:00Z.

HTTP Request

POST https://amixr.io/api/v1/escalation_policies/

Get Escalation Policy

curl "https://amixr.io/api/v1/escalation_policies/E3GA6SJETWWJS/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \

The above command returns JSON structured like this:

{
    "id": "E3GA6SJETWWJS",
    "route_id": "RIYGUJXCPFHXY",
    "position": 0,
    "type": "wait",
    "duration": 60
}

HTTP Request

GET https://amixr.io/api/v1/escalation_policies/<ESCALATION_POLICY_ID>/

List Escalation Policies

curl "https://amixr.io/api/v1/escalation_policies/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "E3GA6SJETWWJS",
            "route_id": "RIYGUJXCPFHXY",
            "position": 0,
            "type": "wait",
            "duration": 60
        },
        {
            "id": "E5JJTU52M5YM4",
            "route_id": "RIYGUJXCPFHXY",
            "position": 1,
            "important": false,
            "type": "notify_person_next_each_time",
            "persons_to_notify_next_each_time": [
                "U4DNY931HHJS5"
            ]
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/escalation_policies/

Delete Escalation Policy

curl "https://amixr.io/api/v1/escalation_policies/E3GA6SJETWWJS/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

HTTP Request

DELETE https://amixr.io/api/v1/escalation_policies/<ESCALATION_POLICY_ID>/

- Personal Notification Rules

Personal Notification Rule

curl "https://amixr.io/api/v1/personal_notification_rules/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "user_id": "U4DNY931HHJS5",
      "type": "notify_by_sms"
  }'

The above command returns JSON structured like this:

{
    "id": "NT79GA9I7E4DJ",
    "user_id": "U4DNY931HHJS5",
    "position": 0,
    "important": false,
    "type": "notify_by_sms"
}
Parameter Required Description
user_id Yes User ID
position Optional Personal Notification Rules execute one after another starting from position=0. Position=-1 will put the Escalation Policy to the end of the list. The new Escalation Policy created with a position of already existing Escalation Policy will move the old one (and all following) down in the list.
type Yes A choice: "wait", "notify_by_slack", "notify_by_sms", "notify_by_phone_call", "notify_by_telegram", "notify_by_email".
duration Optional A time in secs when type "wait" is chosen.
important Optional Bool value indicate importance of rule. By default: false.

HTTP Request

POST https://amixr.io/api/v1/personal_notification_rules/

Get Personal Notification Rule

curl "https://amixr.io/api/v1/personal_notification_rules/ND9EHN5LN1DUU/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "id": "ND9EHN5LN1DUU",
    "user_id": "U4DNY931HHJS5",
    "position": 1,
    "duration": 300,
    "important": false,
    "type": "wait"
}

HTTP Request

GET https://amixr.io/api/v1/personal_notification_rules/<PERSONAL_NOTIFICATION_RULE_ID>/

List Personal Notification Rules

curl "https://amixr.io/api/v1/personal_notification_rules/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 4,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "NT79GA9I7E4DJ",
            "user_id": "U4DNY931HHJS5",
            "position": 0,
            "important": false,
            "type": "notify_by_sms"
        },
        {
            "id": "ND9EHN5LN1DUU",
            "user_id": "U4DNY931HHJS5",
            "position": 1,
            "duration": 300,
            "important": false,
            "type": "wait"
        },
        {
            "id": "NEF49YQ1HNPDD",
            "user_id": "U4DNY931HHJS5",
            "position": 2,
            "important": false,
            "type": "notify_by_phone_call"
        },
        {
            "id": "NWAL6WFJNWDD8",
            "user_id": "U4DNY931HHJS5",
            "position": 0,
            "important": true,
            "type": "notify_by_phone_call"
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/personal_notification_rules/

Delete Personal Notification Rule

curl "https://amixr.io/api/v1/personal_notification_rules/NWAL6WFJNWDD8/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

HTTP Request

DELETE https://amixr.io/api/v1/personal_notification_rules/<PERSONAL_NOTIFICATION_RULE_ID>/

- Schedules

Create Schedule

curl "https://amixr.io/api/v1/schedules/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "name": "Demo schedule",
      "time_zone": "America/New_York",
      "ical_url": "https://example.com/meow_calendar.ics",
      "slack": {
          "channel_id": "MEOW_SLACK_ID"
      }
  }'

The above command returns JSON structured like this:

{
    "id": "SBM7DV7BKFUYU",
    "name": "Demo schedule",
    "type": "ical",
    "time_zone": "America/New_York",
    "ical_url": "https://example.com/meow_calendar.ics",
    "on_call_now": [
        "U4DNY931HHJS5"
    ],
    "slack": {
        "channel_id": "MEOW_SLACK_ID"
    }
}
Parameter Unique Required Description
name Yes Yes Schedule name.
time_zone No Optional Schedule time zone. Is used for manually added on-call shifts. Default time zone is "UTC". More information about time zones.
ical_url No Optional URL of external iCal calendar.
slack No Optional Dictionary with slack-specific settings for a schedule. Includes channel_id field, that takes channel id from Slack. Get list of channels here: slack channels.

HTTP Request

POST https://amixr.io/api/v1/schedules/

Get Schedule

curl "https://amixr.io/api/v1/schedules/SBM7DV7BKFUYU/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \

The above command returns JSON structured like this:

{
    "id": "SBM7DV7BKFUYU",
    "name": "Demo schedule",
    "type": "ical",
    "time_zone": "America/New_York",
    "ical_url": "https://example.com/meow_calendar.ics",
    "on_call_now": [
        "U4DNY931HHJS5"
    ],
    "slack": {
        "channel_id": "MEOW_SLACK_ID"
    }
}

HTTP Request

GET https://amixr.io/api/v1/schedules/<SCHEDULE_ID>/

List Schedules

curl "https://amixr.io/api/v1/schedules/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "SBM7DV7BKFUYU",
            "name": "Demo schedule",
            "type": "ical",
            "time_zone": "America/New_York",
            "ical_url": "https://example.com/meow_calendar.ics",
            "on_call_now": [
                "U4DNY931HHJS5"
            ],
            "slack": {
                "channel_id": "MEOW_SLACK_ID"
            }
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/schedules/

Update Schedule

curl "https://amixr.io/api/v1/schedules/SBM7DV7BKFUYU/" \
  --request PUT \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Demo schedule",
    "time_zone": "America/New_York",
    "ical_url": "https://example.com/meow_calendar.ics",
    "slack": {
        "channel_id": "MEOW_SLACK_ID"
    }
  }'

The above command returns JSON structured like this:

{
    "id": "SBM7DV7BKFUYU",
    "name": "Demo schedule",
    "type": "ical",
    "time_zone": "America/New_York",
    "ical_url": "https://example.com/meow_calendar.ics",
    "on_call_now": [
        "U4DNY931HHJS5"
    ],
    "slack": {
        "channel_id": "MEOW_SLACK_ID"
    }
}

HTTP Request

PUT https://amixr.io/api/v1/schedules/<SCHEDULE_ID>/

Delete Schedule

curl "https://amixr.io/api/v1/schedules/SBM7DV7BKFUYU/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

HTTP Request

DELETE https://amixr.io/api/v1/schedules/<SCHEDULE_ID>/

- On-call shifts

Create On-call shift

curl "https://amixr.io/api/v1/on_call_shifts/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "schedule_id": "SBM7DV7BKFUYU",
      "name": "Demo single event",
      "type": "single_event",
      "level": 0,
      "start": "2020-09-10T08:00:00",
      "duration": 10800,
      "users": [
          "U4DNY931HHJS5"
      ]
  }'

The above command returns JSON structured like this:

{
    "id": "OH3V5FYQEYJ6M",
    "schedule_id": "SBM7DV7BKFUYU",
    "name": "Demo single event",
    "type": "single_event",
    "level": 0,
    "start": "2020-09-10T08:00:00",
    "duration": 10800,
    "users": [
        "U4DNY931HHJS5"
    ]
}
Parameter Unique Required Description
schedule_id No Yes Each On-Call Shift is assigned to a specific Schedule.
name Yes Yes On-call shift name.
type No Yes A choice: "single_event", "recurrent_event", "rolling_users".
level No Optional Priority level. The higher the value, the higher the priority. Within one schedule if two events have an overlap in time Amixr will choose the event with higher level. For example: Alex is on-call from 8AM till 11AM with level 1, Bob is on-call from 9AM till 11AM with level 2. At 10AM Amixr will poke Bob. At 8AM Amixr will poke Alex.
start No Yes Start time of the on-call shift. This parameter takes a date format as yyyy-MM-dd'T'HH:mm:ss (for example "2020-09-05T08:00:00").
duration No Yes Duration of the event.
frequency No If type == recurrent_event or rolling_users A choice: "daily", "weekly", "monthly".
interval No Optional This parameter takes a positive integer representing at which intervals the recurrence rule repeats.
week_start No Optional Start day of the week in iCal format. A choice: SU (Sunday), MO (Monday), TU (Tuesday), WE (Wednesday), TH (Thursday), FR (Friday), SA (Saturday). Default: SU.
by_day No Optional List of days in iCal format Valid values are: SU, MO, TU, WE, TH, FR, SA.
by_month No Optional List of months. Valid values are 1 to 12.
by_monthday No Optional List of days of the month. Valid values are 1 to 31 or -31 to -1.
users No Optional List of on-call users.
rolling_users No Optional List of lists with on-call users (for rolling_users event type). Amixr will iterate over lists of users every timeframe specified in frequency. For example: there are 2 lists of users in rolling_users : [[Alex, Bob], [Alice]] and frequency = daily . It means that the first day Alex and Bob will be notified. The next day: Alice. The day after: Alex and Bob again and so on.

Please check RFC 5545 for more information about recurrence rules.

HTTP Request

POST https://amixr.io/api/v1/on_call_shifts/

Get On-call shift

curl "https://amixr.io/api/v1/on_call_shifts/SBM7DV7BKFUYU/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \

The above command returns JSON structured like this:

{
    "id": "OH3V5FYQEYJ6M",
    "schedule_id": "SBM7DV7BKFUYU",
    "name": "Demo single event",
    "type": "single_event",
    "level": 0,
    "start": "2020-09-10T08:00:00",
    "duration": 10800,
    "users": [
        "U4DNY931HHJS5"
    ]
}

HTTP Request

GET https://amixr.io/api/v1/on_call_shifts/<ON_CALL_SHIFT_ID>/

List On-call shifts

curl "https://amixr.io/api/v1/on_call_shifts/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "OH3V5FYQEYJ6M",
            "schedule_id": "SBM7DV7BKFUYU",
            "name": "Demo single event",
            "type": "single_event",
            "level": 0,
            "start": "2020-09-10T08:00:00",
            "duration": 10800,
            "users": [
                "U4DNY931HHJS5"
            ]
        },
        {
            "id": "O9WTH7CKM3KZW",
            "schedule_id": "SBM7DV7BKFUYU",
            "name": "Demo recurrent event",
            "type": "recurrent_event",
            "level": 0,
            "start": "2020-09-10T16:00:00",
            "duration": 10800,
            "frequency": "weekly",
            "interval": 2,
            "week_start": "SU",
            "by_day": [
                "MO",
                "WE",
                "FR"
            ],
            "by_month": null,
            "by_monthday": null,
            "users": [
                "U4DNY931HHJS5"
            ]
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/on_call_shifts/

Update On-call shift

curl "https://amixr.io/api/v1/on_call_shifts/SBM7DV7BKFUYU/" \
  --request PUT \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Demo single event",
    "type": "single_event",
    "level": 0,
    "start": "2020-09-10T08:00:00",
    "duration": 10800,
    "users": [
        "U4DNY931HHJS5"
    ]
  }'

The above command returns JSON structured like this:

{
    "id": "OH3V5FYQEYJ6M",
    "schedule_id": "SBM7DV7BKFUYU",
    "name": "Demo single event",
    "type": "single_event",
    "level": 0,
    "start": "2020-09-10T08:00:00",
    "duration": 10800,
    "users": [
        "U4DNY931HHJS5"
    ]
}

HTTP Request

PUT https://amixr.io/api/v1/on_call_shifts/<ON_CALL_SHIFT_ID>/

Delete On-call shift

curl "https://amixr.io/api/v1/on_call_shifts/SBM7DV7BKFUYU/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

HTTP Request

DELETE https://amixr.io/api/v1/on_call_shifts/<ON_CALL_SHIFT_ID>/

- Incidents

List Incidents

curl "https://amixr.io/api/v1/incidents/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "I68T24C13IFW1",
            "integration_id": "CFRPV98RPR1U8",
            "route_id": "RIYGUJXCPFHXY",
            "alerts_count": 3,
            "state": "resolved",
            "created_at": "2020-05-19T12:37:01.430444Z",
            "resolved_at": "2020-05-19T13:37:01.429805Z",
            "acknowledged_at": null,
            "title": "Memory above 90% threshold"
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/incidents/

Delete Incidents

curl "https://amixr.io/api/v1/incidents/I68T24C13IFW1/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "mode": "wipe"
  }'
Parameter Required Description
mode No By default: "wipe". "wipe" will remove the payload of all Incident's Alerts on Amixr side. That's useful in case you sent a sensitive data to Amixr. All metadata will remain. "delete" mode will trigger removing of Incident, Alerts, all related metadata and even if possible incident in Slack and other destinations.

HTTP Request

DELETE https://amixr.io/api/v1/incidents/<INCIDENT_ID>

- Alerts

List Alerts

curl "https://amixr.io/api/v1/alerts/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "AA74DN7T4JQB6",
            "incident_id": "I68T24C13IFW1",
            "created_at": "2020-05-11T20:07:43Z",
            "payload": {
                "state": "alerting",
                "title": "[Alerting] Test notification",
                "ruleId": 0,
                "message": "Someone is testing the alert notification within grafana.",
                "ruleUrl": "https://amixr.io/",
                "ruleName": "Test notification",
                "evalMatches": [
                    {
                        "tags": null,
                        "value": 100,
                        "metric": "High value"
                    },
                    {
                        "tags": null,
                        "value": 200,
                        "metric": "Higher Value"
                    }
                ]
            }
        },
        {
            "id": "AR9SSYFKE2PV7",
            "incident_id": "I68T24C13IFW1",
            "created_at": "2020-05-11T20:07:54Z",
            "payload": {
                "state": "alerting",
                "title": "[Alerting] Test notification",
                "ruleId": 0,
                "message": "Someone is testing the alert notification within grafana.",
                "ruleUrl": "https://amixr.io/",
                "ruleName": "Test notification",
                "evalMatches": [
                    {
                        "tags": null,
                        "value": 100,
                        "metric": "High value"
                    },
                    {
                        "tags": null,
                        "value": 200,
                        "metric": "Higher Value"
                    }
                ]
            }
        },
        {
            "id": "AWJQSGEYYUFGH",
            "incident_id": "I68T24C13IFW1",
            "created_at": "2020-05-11T20:07:58Z",
            "payload": {
                "state": "alerting",
                "title": "[Alerting] Test notification",
                "ruleId": 0,
                "message": "Someone is testing the alert notification within grafana.",
                "ruleUrl": "https://amixr.io/",
                "ruleName": "Test notification",
                "evalMatches": [
                    {
                        "tags": null,
                        "value": 100,
                        "metric": "High value"
                    },
                    {
                        "tags": null,
                        "value": 200,
                        "metric": "Higher Value"
                    }
                ]
            }
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/alerts/

- Slack Channels

List Slack Channels

curl "https://amixr.io/api/v1/slack_channels/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "name": "meow_channel",
            "slack_id": "MEOW_SLACK_ID"
        }
    ]
}

Filter parameters available, should be provided as get arguments:

HTTP Request

GET https://amixr.io/api/v1/slack_channels/

- Actions (Outgoing Webhooks)

Used in Escalation Policies with type = "trigger_action".

List Actions

curl "https://amixr.io/api/v1/actions/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" 

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "KGEFG74LU1D8L",
            "name": "Publish Incident To Jira",
            "integration_id": "CFRPV98RPR1U8"
        }
    ]
}

HTTP Request

GET https://amixr.io/api/v1/actions/

- Postmortems

Create Postmortem

curl "https://amixr.io/api/v1/postmortems/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "incident_id": "I68T24C13IFW1",
      "text": "Demo postmortem text"
  }'

The above command returns JSON structured like this:

{
    "id": "P658FE5K87EWZ",
    "incident_id": "I68T24C13IFW1",
    "created_at": "2020-06-19T12:37:01.430444Z",
    "text": "Demo postmortem text"
}

HTTP Request

POST https://amixr.io/api/v1/postmortems/

Get Postmortem

curl "https://amixr.io/api/v1/postmortems/P658FE5K87EWZ/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "id": "P658FE5K87EWZ",
    "incident_id": "I68T24C13IFW1",
    "created_at": "2020-06-19T12:37:01.430444Z",
    "text": "Demo postmortem text",
    "postmortem_messages": [
        {
            "id": "M4BTQUS3PRHYQ",
            "incident_id": "I68T24C13IFW1",
            "author": "U4DNY931HHJS5",
            "source": "web",
            "created_at": "2020-06-19T12:40:01.429805Z",
            "text": "Demo postmortem message"
        }
    ]
}

HTTP Request

GET https://amixr.io/api/v1/postmortems/<POSTMORTEM_ID>/

List Postmortems

curl "https://amixr.io/api/v1/postmortems/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "P658FE5K87EWZ",
            "incident_id": "I68T24C13IFW1",
            "created_at": "2020-06-19T12:37:01.430444Z",
            "text": "Demo postmortem text",
            "postmortem_messages": [
                {
                    "id": "M4BTQUS3PRHYQ",
                    "incident_id": "I68T24C13IFW1",
                    "author": "U4DNY931HHJS5",
                    "source": "web",
                    "created_at": "2020-06-19T12:40:01.429805Z",
                    "text": "Demo postmortem message"
                }
            ]
        }
    ]
}

Filter parameter available, should be provided as get argument:

HTTP Request

GET https://amixr.io/api/v1/postmortems/

Update Postmortem

curl "https://amixr.io/api/v1/postmortems/P658FE5K87EWZ/" \
  --request PUT \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "text": "Demo postmortem text"
  }'

The above command returns JSON structured like this:

{
    "id": "P658FE5K87EWZ",
    "incident_id": "I68T24C13IFW1",
    "created_at": "2020-06-19T12:37:01.430444Z",
    "text": "Demo postmortem text"
}

HTTP Request

PUT https://amixr.io/api/v1/postmortems/<POSTMORTEM_ID>/

Delete Postmortem

curl "https://amixr.io/api/v1/postmortems/P658FE5K87EWZ/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow"

HTTP Request

DELETE https://amixr.io/api/v1/postmortems/<POSTMORTEM_ID>/

- Postmortem messages

Create Postmortem message

curl "https://amixr.io/api/v1/postmortem_messages/" \
  --request POST \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "incident_id": "I68T24C13IFW1",
      "text": "Demo postmortem message"
  }'

The above command returns JSON structured like this:

{
    "id": "M4BTQUS3PRHYQ",
    "incident_id": "I68T24C13IFW1",
    "author": "U4DNY931HHJS5",
    "source": "web",
    "created_at": "2020-06-19T12:40:01.429805Z",
    "text": "Demo postmortem message"
}

HTTP Request

POST https://amixr.io/api/v1/postmortem_messages/

Get Postmortem message

curl "https://amixr.io/api/v1/postmortem_messages/M4BTQUS3PRHYQ/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "id": "M4BTQUS3PRHYQ",
    "incident_id": "I68T24C13IFW1",
    "author": "U4DNY931HHJS5",
    "source": "web",
    "created_at": "2020-06-19T12:40:01.429805Z",
    "text": "Demo postmortem message"
}

HTTP Request

GET https://amixr.io/api/v1/postmortem_messages/<POSTMORTEM_MESSAGE_ID>/

List Postmortem messages

curl "https://amixr.io/api/v1/postmortem_messages/" \
  --request GET \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json"

The above command returns JSON structured like this:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "M4BTQUS3PRHYQ",
            "incident_id": "I68T24C13IFW1",
            "author": "U4DNY931HHJS5",
            "source": "web",
            "created_at": "2020-06-19T12:40:01.429805Z",
            "text": "Demo postmortem message"
        }
    ]
}

Filter parameter available, should be provided as get argument:

HTTP Request

GET https://amixr.io/api/v1/postmortem_messages/

Update Postmortem message

curl "https://amixr.io/api/v1/postmortem_messages/M4BTQUS3PRHYQ/" \
  --request PUT \
  --header "Authorization: meowmeowmeow" \
  --header "Content-Type: application/json" \
  --data '{
      "text": "Demo postmortem message"
  }'

The above command returns JSON structured like this:

{
    "id": "M4BTQUS3PRHYQ",
    "incident_id": "I68T24C13IFW1",
    "author": "U4DNY931HHJS5",
    "source": "web",
    "created_at": "2020-06-19T12:40:01.429805Z",
    "text": "Demo postmortem message"
}

HTTP Request

PUT https://amixr.io/api/v1/postmortem_messages/<POSTMORTEM_MESSAGE_ID>/

Delete Postmortem message

curl "https://amixr.io/api/v1/postmortem_messages/M4BTQUS3PRHYQ/" \
  --request DELETE \
  --header "Authorization: meowmeowmeow"

HTTP Request

DELETE https://amixr.io/api/v1/postmortem_messages/<POSTMORTEM_MESSAGE_ID>/

Errors

The Amixr API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden
404 Not Found
405 Method Not Allowed -- You tried to access an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
429 Too Many Requests -- Slow down! read more about rate limits here
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.