### Create Incident with Metadata cURL Example Source: https://betterstack.com/docs/uptime/api/create-a-new-incident This cURL example demonstrates how to create an incident and include custom metadata in the request payload. Metadata can be used to associate additional information with the incident. ```shell curl --request POST \ --url https://uptime.betterstack.com/api/v3/incidents \ --header "Authorization: Bearer $TOKEN" \ --header 'Content-Type: application/json' \ --data '{ \ "summary": "Test incident", \ "requester_email": "my-great-email@example.com", \ "description": "No need to worry, everything is fine, this is just testing the great Uptime API.", \ "metadata": { \ "Affected Services": [ \ { \ "value": "Homepage" \ }, \ { \ "value": "Login" \ } \ ], \ "On-call Calendar": [ \ { \ "type": "Schedule", \ "name": "Primary calendar" \ } \ ] \ } \ }' ``` -------------------------------- ### Create Escalation Policy with Instructions Source: https://betterstack.com/docs/uptime/api/create-escalation-policy This example shows how to create an escalation policy that includes instructional steps for immediate actions and for escalation, with optional reminders. ```APIDOC ## POST /api/v3/policies/ ### Description Creates a new escalation policy with instructional steps. ### Method POST ### Endpoint https://uptime.betterstack.com/api/v3/policies/ ### Parameters #### Request Body - **name** (string) - Required - The name of the escalation policy. - **steps** (array) - Required - An array of escalation policy steps. - **type** (string) - Required - The type of step (e.g., "escalation", "time_branching", "metadata_branching", "instructions"). - **wait_before** (integer) - Required - The time in seconds to wait before executing this step. - **instructions_comment** (string) - Required for "instructions" type - The comment or instructions to display. - **instructions_reminder_enabled** (boolean) - Optional for "instructions" type - Whether to enable reminders for instructions. - **instructions_reminder_interval_hours** (integer) - Optional for "instructions" type - The interval in hours for reminders. - **urgency_id** (string) - Required for "escalation" type - The ID of the urgency level. - **step_members** (array) - Required for "escalation" type - A list of members to notify. - **type** (string) - Required - The type of member (e.g., "current_on_call", "entire_team", "all_slack_integrations", "user"). - **email** (string) - Required if type is "user" - The email of the user. ### Request Example ```json { "name": "Policy with Instructions and Todo list", "steps": [ { "type": "instructions", "wait_before": 0, "instructions_comment": "IMMEDIATE ACTIONS:\n1. Check system status at status.example.com\n2. Verify in monitoring dashboard\n3. Check #incidents Slack channel\n4. If database-related, run: kubectl get pods -n production", "instructions_reminder_enabled": false }, { "type": "escalation", "wait_before": 0, "urgency_id": "$SEVERITY_ID", "step_members": [ { "type": "current_on_call" }, { "type": "all_slack_integrations" } ] }, { "type": "instructions", "wait_before": 900, "instructions_comment": "ESCALATION REQUIRED:\n- [] Page backup on-call\n- [] Start incident bridge: dial 1-800-XXX-XXXX, code: 12345#\n- [] Update status page\n- [] Notify stakeholders via #incident-comms", "instructions_reminder_enabled": true, "instructions_reminder_interval_hours": 2 }, { "type": "escalation", "wait_before": 300, "urgency_id": "$SEVERITY_ID", "step_members": [ { "type": "entire_team" }, { "type": "user", "email": "manager@example.com" } ] } ] } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the created escalation policy. - **name** (string) - The name of the escalation policy. - **steps** (array) - An array of escalation policy steps. #### Response Example (Response structure will mirror the request body with added IDs and status information) ``` -------------------------------- ### Example cURL Request Source: https://betterstack.com/docs/uptime/api/get-single-on-call-calendar-event Use this cURL command to get a single on-call schedule event. Replace `$TOKEN` with your actual API token and adjust `default` and `12345` with your schedule and event IDs. ```shell curl --request GET \ --url "https://uptime.betterstack.com/api/v2/on-calls/default/events/12345" \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Example cURL Request Source: https://betterstack.com/docs/uptime/api/get-single-severity-group Use this cURL command to make a GET request to retrieve a specific severity group by its ID. Ensure you replace `$TOKEN` with your actual API token and `1234567` with the target severity group's ID. ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/urgency-groups/1234567 \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Example Runbook Instructions with TODO List Source: https://betterstack.com/docs/uptime/runbooks This markdown snippet demonstrates how to structure runbook instructions, including interactive tasks using checkboxes and specific commands for diagnosis and mitigation. It's triggered by high CPU usage. ```markdown [label Example runbook instructions with TODO list] ## When to Use Triggered when CPU > 90% for 5+ minutes on a web server. ## Steps - [ ] **Acknowledge the Alert** - [ ] **Find the Affected Server** - Use logs or metrics dashboard to identify the instance/container - Example: `aws ecs list-tasks --cluster web-prod` - [ ] **SSH or Access Container** - `ssh ec2-user@` - [ ] **Diagnose the Issue** - Run `top` or `htop` to find CPU-heavy process - Check application logs - [ ] **Fix or Mitigate** - Restart service if needed - Scale up if traffic is legitimate - [ ] **Verify** - CPU drops below 70% - No 5xx errors - App is responsive ``` -------------------------------- ### Get Heartbeat Availability Summary cURL Example Source: https://betterstack.com/docs/uptime/api/get-a-heartbeats-availability-summary Use this cURL command to retrieve the availability summary for a specific heartbeat within a given date range. Ensure you replace `$TOKEN` with your actual API token and `123456789` with the heartbeat's ID. ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/heartbeats/123456789/availability?from=2021-01-26&to=2021-01-27 \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Create Escalation Policy with Instructions Source: https://betterstack.com/docs/uptime/api/create-escalation-policy This snippet shows how to create an escalation policy that includes instructions for responders, both immediate actions and escalation reminders. Ensure the SEVERITY_ID environment variable is set. ```shell curl -X "POST" "https://uptime.betterstack.com/api/v3/policies/" \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json; charset=utf-8' \ -d '{ \ "name": "Policy with Instructions and Todo list", \ "steps": [ \ { \ "type": "instructions", \ "wait_before": 0, \ "instructions_comment": "IMMEDIATE ACTIONS:\n1. Check system status at status.example.com\n2. Verify in monitoring dashboard\n3. Check #incidents Slack channel\n4. If database-related, run: kubectl get pods -n production", \ "instructions_reminder_enabled": false \ }, \ { \ "type": "escalation", \ "wait_before": 0, \ "urgency_id": "'$SEVERITY_ID'", \ "step_members": [ \ { "type": "current_on_call" }, \ { "type": "all_slack_integrations" } \ ] \ }, \ { \ "type": "instructions", \ "wait_before": 900, \ "instructions_comment": "ESCALATION REQUIRED:\n- [] Page backup on-call\n- [] Start incident bridge: dial 1-800-XXX-XXXX, code: 12345#\n- [] Update status page\n- [] Notify stakeholders via #incident-comms", \ "instructions_reminder_enabled": true, \ "instructions_reminder_interval_hours": 2 \ }, \ { \ "type": "escalation", \ "wait_before": 300, \ "urgency_id": "'$SEVERITY_ID'", \ "step_members": [ \ { "type": "entire_team" }, \ { "type": "user", "email": "manager@example.com" } \ ] \ } \ ] \ }' ``` -------------------------------- ### Create Standard Escalation Policy Source: https://betterstack.com/docs/uptime/api/create-escalation-policy This example demonstrates how to create a basic escalation policy with a defined number of repeats and escalation steps involving current on-call users and the entire team. ```APIDOC ## POST /api/v3/policies/ ### Description Creates a new escalation policy. ### Method POST ### Endpoint https://uptime.betterstack.com/api/v3/policies/ ### Parameters #### Request Body - **name** (string) - Required - The name of the escalation policy. - **repeat_count** (integer) - Optional - The number of times the escalation steps should repeat. - **repeat_delay** (integer) - Optional - The delay in seconds before repeating the escalation steps. - **steps** (array) - Required - An array of escalation policy steps. - **type** (string) - Required - The type of step (e.g., "escalation", "time_branching", "metadata_branching", "instructions"). - **wait_before** (integer) - Required - The time in seconds to wait before executing this step. - **urgency_id** (string) - Required for "escalation" type - The ID of the urgency level. - **step_members** (array) - Required for "escalation" type - A list of members to notify. - **type** (string) - Required - The type of member (e.g., "current_on_call", "entire_team", "all_slack_integrations", "user"). - **email** (string) - Required if type is "user" - The email of the user. - **timezone** (string) - Required for "time_branching" type - The timezone for the branching rule. - **days** (array) - Required for "time_branching" type - The days of the week (e.g., ["mon", "tue"]). - **time_from** (string) - Required for "time_branching" type - The start time in HH:MM format. - **time_to** (string) - Required for "time_branching" type - The end time in HH:MM format. - **policy_metadata_key** (string) - Required for "time_branching" type - The metadata key for the policy. - **metadata_key** (string) - Required for "metadata_branching" type - The metadata key to check. - **metadata_values** (array) - Required for "metadata_branching" type - The values to match against the metadata key. - **type** (string) - Required - The type of the metadata value (e.g., "String"). - **value** (string) - Required - The value to match. - **action_type** (string) - Required for "metadata_branching" type - The action to take (e.g., "do_not_escalate"). - **instructions_comment** (string) - Required for "instructions" type - The comment or instructions to display. - **instructions_reminder_enabled** (boolean) - Optional for "instructions" type - Whether to enable reminders for instructions. - **instructions_reminder_interval_hours** (integer) - Optional for "instructions" type - The interval in hours for reminders. ### Request Example ```json { "name": "Standard Escalation Policy", "repeat_count": 3, "repeat_delay": 1800, "steps": [ { "type": "escalation", "wait_before": 0, "urgency_id": "$SEVERITY_ID", "step_members": [ { "type": "current_on_call" } ] }, { "type": "escalation", "wait_before": 600, "urgency_id": "$SEVERITY_ID", "step_members": [ { "type": "entire_team" } ] } ] } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the created escalation policy. - **name** (string) - The name of the escalation policy. - **repeat_count** (integer) - The number of times the escalation steps should repeat. - **repeat_delay** (integer) - The delay in seconds before repeating the escalation steps. - **steps** (array) - An array of escalation policy steps. #### Response Example (Response structure will mirror the request body with added IDs and status information) ``` -------------------------------- ### Start Squid Proxy Source: https://betterstack.com/docs/uptime/monitoring-private-networks Command to start the Squid proxy service defined in the docker-compose.yml file in detached mode. ```shell docker compose up -d ``` -------------------------------- ### Test User Sign In with Environment Variable Source: https://betterstack.com/docs/uptime/playwright-monitor This scenario demonstrates signing in to an application using an environment variable for the password. It navigates to the login page, fills in credentials, and clicks the sign-in button. ```javascript [label Test that users can sign in] import { test, expect } from '@playwright/test'; test('users can sign in', async ({ page }) => { await page.goto('https://app.example.com/'); await page.getByLabel('E-mail').fill('user@example.com'); await page.getByLabel('Password').fill(process.env.PASSWORD); await page.getByRole('button', { name: 'Sign in' }).click(); await page.waitForURL('https://app.example.com/dashboard'); }); ``` -------------------------------- ### List Metadata cURL Example Source: https://betterstack.com/docs/uptime/api/list-all-existing-metadata Use this cURL command to list metadata for a specific monitor. Replace $TOKEN with your actual API token. ```shell curl --request GET \ --url "https://uptime.betterstack.com/api/v3/metadata?owner_id=2&owner_type=Monitor" \ --header 'authorization: Bearer $TOKEN' ``` -------------------------------- ### Get a Single Heartbeat using cURL Source: https://betterstack.com/docs/uptime/api/get-a-single-hearbeat Use this cURL command to make a GET request to the API endpoint for a specific heartbeat. Replace `$TOKEN` with your actual API token and `12345` with the heartbeat's ID. ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/heartbeats/12345 \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Create Azure Integration cURL Example Source: https://betterstack.com/docs/uptime/api/create-azure-integration Use this cURL command to create a new Azure integration. Ensure you replace `$TOKEN` with your actual API token and adjust the JSON body as needed. ```shell curl -X "POST" "https://uptime.betterstack.com/api/v2/azure-integrations/" \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json; charset=utf-8' \ -d $'{ "name": "Test" }' ``` -------------------------------- ### Get a Single Catalog Record using cURL Source: https://betterstack.com/docs/uptime/api/single-catalog-record Use this cURL command to make a GET request to retrieve a specific Catalog record. Replace `$TOKEN` with your actual API token and provide the correct `relation_id` and `record_id`. ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/catalog/relations/37/records/67 \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Sample Post Mortem in Markdown Source: https://betterstack.com/docs/uptime/post-mortems This Markdown example demonstrates the structure and content of a comprehensive post mortem, covering incident details, root cause analysis, cost estimation, and future prevention strategies. ```markdown # Sample Post Mortem -- What happened today 1. Homepage stopped responding at 5:22am ET today and all requests resulted in timeouts 2. After a quick glance at New Relic, it was clear that requests were queueing at Puma 3. Database connections were OK, CPU on application servers was OK 4. I decided to restart all application servers with `heroku restart` 5. After the app rebooted, homepage started returning `Internal Server Error (500)` at 5:26 ET 6. Looking at PGHero, I realized slow queries from previous requests were still being executed by PostgreSQL 7. I killed all existing PostgreSQL connections, and restarted PostgreSQL and application servers again 8. This resulted into multiple failed workers and requests in the `#bugsnag` Slack channel 9. After the app booted at 5:41am ET, it was working correctly 10. Just to be sure, I scaled up the application servers to 5 instances # Why this happened 1. Our Puma threads/workers count seems misconfigured. We have set these values arbitrarily when configuring the deployment without any stress testing, and seems like we just hit the limits 2. In addition to Puma misconfiguration, we didn't have timeouts correctly configured for neither application requests nor database queries 3. The new reporting functionality deployed last friday unfortunately triggered many slow requests with long-running queries, which quickly depleted Puma's connection pool and prevented other clients from connecting # Estimated costs 1. We were down for ~19 minutes 2. Fortunately, we typically don't have many users online at around 5am 3. According to Google Analytics approximately 1,000 users experienced this incident # How to prevent this in the future 1. We'll configure 15s database timeouts in Rails `database.yml` 2. We'll implement the application server request timeouts using the `slowpoke` gem 3. We'll increase Puma's threads and workers so that the application servers are running closer to 80% memory/CPU limits 4. We'll be implementing Nginx as a reverse proxy, letting us to have a more granular control over request queueing 5. We'll be stress-testing the configuration of application servers with loader.io in the following week ``` -------------------------------- ### List All Monitors Source: https://betterstack.com/docs/uptime/api/list-all-existing-monitors Fetches a list of all monitors. This is a basic GET request to the monitors endpoint. ```APIDOC ## GET /api/v2/monitors ### Description Returns a list of all your monitors. This endpoint supports pagination. ### Method GET ### Endpoint https://uptime.betterstack.com/api/v2/monitors ### Parameters #### Query Parameters - **team_name** (string) - Optional - Filter monitors belonging to a specified team. - **url** (string) - Optional - Filter monitors by their URL property. - **pronounceable_name** (string) - Optional - Filter monitors by their pronounceable name property. #### Header Parameters - **Authorization** (string) - Required - Bearer $TOKEN ### Response #### Success Response (200) - **data** (array) - A list of monitor objects. - **id** (string) - The unique identifier for the monitor. - **type** (string) - The type of the resource, always "monitor". - **attributes** (object) - Contains the monitor's attributes. - **url** (string) - The URL being monitored. - **pronounceable_name** (string) - A human-readable name for the monitor. - **monitor_type** (string) - The type of monitor (e.g., "keyword", "http"). - **monitor_group_id** (string) - The ID of the monitor group this monitor belongs to. - **last_checked_at** (string) - The timestamp of the last check. - **status** (string) - The current status of the monitor (e.g., "up", "down", "paused"). - **policy_id** (string) - The ID of the associated escalation policy, if any. - **team_name** (string) - The name of the team the monitor belongs to. - **check_frequency** (integer) - How often the monitor is checked (in seconds). - **call** (boolean) - Whether to make a call on failure. - **sms** (boolean) - Whether to send an SMS on failure. - **email** (boolean) - Whether to send an email on failure. - **push** (boolean) - Whether to send a push notification on failure. - **http_method** (string) - The HTTP method used for checks (e.g., "get", "post"). - **request_timeout** (integer) - The request timeout in seconds. - **recovery_period** (integer) - The period in seconds after which a monitor is considered recovered. - **request_headers** (array) - An array of request headers. - **paused_at** (string) - The timestamp when the monitor was paused, if applicable. - **created_at** (string) - The timestamp when the monitor was created. - **updated_at** (string) - The timestamp when the monitor was last updated. - **ssl_expiration** (integer) - The number of days until SSL certificate expiration. - **domain_expiration** (integer) - The number of days until domain expiration. - **regions** (array) - A list of regions from which the monitor is checked. - **maintenance_from** (string) - The start time of the maintenance window. - **maintenance_to** (string) - The end time of the maintenance window. - **maintenance_timezone** (string) - The timezone for the maintenance window. - **maintenance_days** (array) - The days of the week for the maintenance window. - **port** (integer) - The port to use for the check, if applicable. - **confirmation_period** (integer) - The confirmation period in seconds. - **expected_status_codes** (array) - A list of expected HTTP status codes. - **environment_variables** (object) - Environment variables for the monitor. - **pagination** (object) - Pagination details for the response. - **first** (string) - URL for the first page of results. - **last** (string) - URL for the last page of results. - **prev** (string) - URL for the previous page of results. - **next** (string) - URL for the next page of results. #### Response Example ```json { "data": [ { "id": "2", "type": "monitor", "attributes": { "url": "https://uptime.betterstack.com", "pronounceable_name": "Uptime homepage", "monitor_type": "keyword", "monitor_group_id": "12345", "last_checked_at": "2020-09-01T14:17:46.000Z", "status": "up", "policy_id": null, "expiration_policy_id": null, "team_name": "Test team", "required_keyword": "We call you", "verify_ssl": true, "check_frequency": 30, "call": true, "sms": true, "email": true, "push": true, "team_wait": null, "http_method": "get", "request_timeout": 15, "recovery_period": 0, "request_headers": [ { "id": "123", "name": "Content-Type", "value": "application/xml" } ], "request_body": "", "paused_at": null, "created_at": "2020-02-18T13:38:16.586Z", "updated_at": "2020-09-08T13:10:20.202Z", "ssl_expiration": 7, "domain_expiration": 14, "regions": ["us", "eu", "as", "au"], "maintenance_from": "01:02:00", "maintenance_to": "03:04:00", "maintenance_timezone": "Amsterdam", "maintenance_days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "port": null, "confirmation_period": 120, "expected_status_codes": [], "environment_variables": {} } } ], "pagination": { "first": "https://uptime.betterstack.com/api/v2/monitors?page=1", "last": "https://uptime.betterstack.com/api/v2/monitors?page=16", "prev": null, "next": "https://uptime.betterstack.com/api/v2/monitors?page=2" } } ``` ``` -------------------------------- ### Create or Update Metadata with Typed Values Source: https://betterstack.com/docs/uptime/api/update-an-existing-metadata-record This example demonstrates how to specify typed values for metadata, such as associating users by ID or email. Replace `$TOKEN` with your API token. ```shell curl --request POST \ --url https://uptime.betterstack.com/api/v3/metadata \ --header "Authorization: Bearer $TOKEN" \ --header 'Content-Type: application/json' \ --data '{ \ "key": "Key 1", \ "values": [ \ { "type": "User", "item_id": "17" }, \ { "type": "User", "email": "alice@betterstack.com" } \ ], \ "owner_id": "2", \ "owner_type": "Monitor" \ }' ``` -------------------------------- ### Get PagerDuty Integration by ID Source: https://betterstack.com/docs/uptime/api/single-pagerduty-integration Fetches a single PagerDuty integration by its ID. Requires an Authorization header. ```APIDOC ## GET /api/v2/pager-duty-webhooks/{pager_duty_webhook_id} ### Description Returns a single PagerDuty integration by ID. ### Method GET ### Endpoint https://uptime.betterstack.com/api/v2/pager-duty-webhooks/{pager_duty_webhook_id} ### Parameters #### Path Parameters - **pager_duty_webhook_id** (string) - Required - The ID of the PagerDuty integration you want to get. #### Header Parameters - **Authorization** (string) - Required - Bearer $TOKEN ### Response #### Success Response (200) - **data** (object) - Contains the PagerDuty integration details. - **id** (string) - The ID of the integration. - **type** (string) - The type of the integration (e.g., "pager_duty_webhook"). - **attributes** (object) - The attributes of the integration. - **name** (string) - The name of the integration. - **key** (string) - The key for the integration. - **notify_alongside_primary_responder** (boolean) - Whether to notify alongside the primary responder. - **team_name** (string) - The name of the team associated with the integration. #### Response Example { "data": { "id": "17", "type": "pager_duty_webhook", "attributes": { "name": "test", "key": "[key]", "notify_alongside_primary_responder": true, "team_name": "My team" } } } #### Example cURL ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/pager-duty-webhooks/17 \ --header "Authorization: Bearer $TOKEN" ``` ``` -------------------------------- ### Example cURL Request Source: https://betterstack.com/docs/uptime/api/create-catalog-attribute Use this cURL command to create a new catalog attribute. Ensure you replace `$TOKEN` with your actual API token and adjust the relation ID and attribute name as needed. ```shell curl -X "POST" "https://uptime.betterstack.com/api/v2/catalog/relations/37/attributes" \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json; charset=utf-8' \ -d $'{ \ "name": "Test" \ }' ``` -------------------------------- ### Get a Single Heartbeat Group Source: https://betterstack.com/docs/uptime/api/get-a-single-heartbeat-group Fetches an existing heartbeat group by its ID. Requires an Authorization header. ```APIDOC ## GET /api/v2/heartbeat-groups/{heartbeat_group_id} ### Description Returns an existing heartbeat group by ID. ### Method GET ### Endpoint /api/v2/heartbeat-groups/{heartbeat_group_id} ### Parameters #### Path Parameters - **heartbeat_group_id** (string) - Required - The ID of your heartbeat group. #### Header Parameters - **Authorization** (string) - Required - Bearer $TOKEN ### Response #### Success Response (200) - **data** (object) - Contains the heartbeat group details. - **id** (string) - The unique identifier of the heartbeat group. - **type** (string) - The type of the resource, always 'heartbeat_group'. - **attributes** (object) - Contains the attributes of the heartbeat group. - **name** (string) - The name of the heartbeat group. - **sort_index** (integer) - The sorting index for the group. - **created_at** (string) - The timestamp when the heartbeat group was created. - **updated_at** (string) - The timestamp when the heartbeat group was last updated. - **team_name** (string) - The name of the team associated with the heartbeat group. - **paused** (boolean) - Indicates if the heartbeat group is paused. #### Response Example (200) ```json { "data": { "id": "123456", "type": "heartbeat_group", "attributes": { "name": "Backend services", "sort_index": 0, "created_at": "2020-09-18T17:20:42.514Z", "updated_at": "2020-09-18T17:21:27.251Z", "team_name": "Test team", "paused": false } } } ``` ``` -------------------------------- ### Get Jira Integration by ID Source: https://betterstack.com/docs/uptime/api/single-jira-integration Fetches a single Jira integration using its ID. Requires an Authorization header. ```APIDOC ## GET /api/v2/jira-integrations/:jira_integration_id ### Description Returns a single Jira integration by ID. ### Method GET ### Endpoint https://uptime.betterstack.com/api/v2/jira-integrations/:jira_integration_id ### Parameters #### Path Parameters - **jira_integration_id** (string) - Required - The ID of the Jira integration you want to get. #### Header Parameters - **Authorization** (string) - Required - Bearer $TOKEN ### Response #### Success Response (200) - **data** (object) - Contains the Jira integration details. - **id** (string) - The ID of the Jira integration. - **type** (string) - The type of the resource, always "jira_integration". - **attributes** (object) - The attributes of the Jira integration. - **name** (string) - The name of the Jira integration. - **automatic_issue_creation** (boolean) - Whether automatic issue creation is enabled. - **jira_project_key** (string) - The key of the Jira project. - **jira_issue_type_id** (string) - The ID of the Jira issue type. - **jira_fields** (object) - Mappings for Jira fields. - **labels** (array) - Array of label objects. - **label** (string) - The label name. - **value** (string) - The label value. - **assignee** (object) - The assignee object. - **label** (string) - The assignee's name. - **value** (string) - The assignee's ID. - **reporter** (object) - The reporter object. - **label** (string) - The reporter's name. - **value** (string) - The reporter's ID. - **customfield_10015** (number) - Custom field ID 10015. - **customfield_10021** (array) - Array of custom field 10021 objects. - **label** (string) - The custom field label. - **value** (string) - The custom field value. - **team_name** (string) - The name of the associated team. #### Response Example { "data": { "id": "13760", "type": "jira_integration", "attributes": { "name": "Test", "automatic_issue_creation": false, "jira_project_key": "TP", "jira_issue_type_id": "10006", "jira_fields": { "labels": [ { "label": "example-label", "value": "example-label" } ], "assignee": { "label": "John Doe", "value": "1234567890" }, "reporter": { "label": "John Doe", "value": "1234567890" }, "customfield_10015": 3, "customfield_10021": [ { "label": "Impediment", "value": "10019" } ] }, "team_name": "Test Team" } } } ``` -------------------------------- ### List All Slack Integrations Source: https://betterstack.com/docs/uptime/api/list-all-slack-integrations Use this cURL command to fetch a list of all your Slack integrations. Ensure you replace `$TOKEN` with your actual API token. ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/slack-integrations \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### List All Jira Integrations Source: https://betterstack.com/docs/uptime/api/list-all-jira-integrations Use this cURL command to fetch a list of all your Jira integrations. Ensure you replace `$TOKEN` with your actual API token. ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/jira-integrations \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Get Catalog Attribute by ID Source: https://betterstack.com/docs/uptime/api/single-catalog-attribute Fetches a single Catalog attribute using its relation ID and attribute ID. ```APIDOC ## GET /api/v2/catalog/relations/{relation_id}/attributes/{attribute_id} ### Description Returns a single Catalog attribute by ID. ### Method GET ### Endpoint /api/v2/catalog/relations/{relation_id}/attributes/{attribute_id} ### Parameters #### Path Parameters - **relation_id** (string) - Required - The ID of the related Catalog relation. - **attribute_id** (string) - Required - The ID of the Catalog attribute you want to get. #### Header Parameters - **Authorization** (string) - Required - Bearer $TOKEN ### Response #### Success Response (200) - **data** (object) - Contains the catalog attribute details. - **id** (string) - The ID of the catalog attribute. - **type** (string) - The type of the catalog attribute. - **attributes** (object) - The attributes of the catalog attribute. - **name** (string) - The name of the attribute. - **primary** (boolean) - Indicates if the attribute is primary. - **position** (integer) - The position of the attribute. #### Response Example ```json { "data": { "id": "56", "type": "catalog_attribute", "attributes": { "name": "Team", "primary": true, "position": 0 } } } ``` #### Example cURL ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/catalog/relations/37/attributes/56 \ --header "Authorization: Bearer $TOKEN" ``` ``` -------------------------------- ### Get Monitor by ID Source: https://betterstack.com/docs/uptime/api/get-a-single-monitor Fetches a single monitor's details using its ID. Requires an Authorization header. ```APIDOC ## GET /api/v2/monitors/{monitor_id} ### Description Returns a single monitor. ### Method GET ### Endpoint https://uptime.betterstack.com/api/v2/monitors/{monitor_id} ### Parameters #### Path Parameters - **monitor_id** (string) - Required - The ID of the monitor you want to get #### Header Parameters - **Authorization** (string) - Required - Bearer $TOKEN ### Response #### Success Response (200) - **data** (object) - Contains the monitor object. - **id** (string) - The unique identifier of the monitor. - **type** (string) - The type of the resource, always "monitor". - **attributes** (object) - Contains the monitor's attributes. - **url** (string) - The URL to monitor. - **pronounceable_name** (string) - A human-readable name for the monitor. - **monitor_type** (string) - The type of monitor (e.g., "keyword", "http"). - **monitor_group_id** (string) - The ID of the monitor group this monitor belongs to. - **last_checked_at** (string) - The timestamp of the last check. - **status** (string) - The current status of the monitor (e.g., "up", "down", "paused"). - **policy_id** (string or null) - The ID of the associated escalation policy. - **expiration_policy_id** (string or null) - The ID of the associated expiration policy. - **team_name** (string) - The name of the team that owns the monitor. - **required_keyword** (string) - The keyword to look for in the response body (for keyword monitors). - **verify_ssl** (boolean) - Whether to verify SSL certificates. - **check_frequency** (integer) - The frequency of checks in seconds. - **call** (boolean) - Whether to make a call during an incident. - **sms** (boolean) - Whether to send an SMS during an incident. - **email** (boolean) - Whether to send an email during an incident. - **push** (boolean) - Whether to send a push notification during an incident. - **team_wait** (integer or null) - The wait time for the team in seconds. - **http_method** (string) - The HTTP method to use for checks. - **request_timeout** (integer) - The request timeout in seconds. - **recovery_period** (integer) - The recovery period in seconds. - **request_headers** (array) - An array of request headers. - **request_body** (string) - The request body for POST/PUT requests. - **paused_at** (string or null) - The timestamp when the monitor was paused. - **created_at** (string) - The timestamp when the monitor was created. - **updated_at** (string) - The timestamp when the monitor was last updated. - **ssl_expiration** (integer) - The number of days until SSL certificate expiration. - **domain_expiration** (integer) - The number of days until domain expiration. - **regions** (array) - An array of regions from which to check the monitor. - **maintenance_from** (string) - The start time of the maintenance window. - **maintenance_to** (string) - The end time of the maintenance window. - **maintenance_timezone** (string) - The timezone of the maintenance window. - **maintenance_days** (array) - The days of the week for the maintenance window. - **port** (integer or null) - The port to use for checks. - **confirmation_period** (integer) - The confirmation period in seconds. - **expected_status_codes** (array) - An array of expected HTTP status codes. - **environment_variables** (object) - Environment variables for the monitor. - **proxy_host** (string or null) - The proxy host to use. - **proxy_port** (integer or null) - The proxy port to use. #### Response Example (200) ```json { "data": { "id": "123456789", "type": "monitor", "attributes": { "url": "https://uptime.betterstack.com", "pronounceable_name": "Uptime homepage", "monitor_type": "keyword", "monitor_group_id": "12345", "last_checked_at": "2020-09-01T14:17:46.000Z", "status": "up", "policy_id": null, "expiration_policy_id": null, "team_name": "Test team", "required_keyword": "We call you", "verify_ssl": true, "check_frequency": 30, "call": true, "sms": true, "email": true, "push": true, "team_wait": null, "http_method": "get", "request_timeout": 15, "recovery_period": 0, "request_headers": [ { "id": "123", "name": "Content-Type", "value": "application/xml" } ], "request_body": "", "paused_at": null, "created_at": "2020-02-18T13:38:16.586Z", "updated_at": "2020-09-08T13:10:20.202Z", "ssl_expiration": 7, "domain_expiration": 14, "regions": ["us", "eu", "as", "au"], "maintenance_from": "01:02:00", "maintenance_to": "03:04:00", "maintenance_timezone": "Amsterdam", "maintenance_days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"], "port": null, "confirmation_period": 120, "expected_status_codes": [], "environment_variables": {}, "proxy_host": null, "proxy_port": null } } } ``` #### Error Response (404) - **errors** (string) - "Resource with provided ID was not found" #### Response Example (404) ```json { "errors": "Resource with provided ID was not found" } ``` ### Example cURL ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/monitors/123456789 \ --header "Authorization: Bearer $TOKEN" ``` ``` -------------------------------- ### List All Azure Integrations Source: https://betterstack.com/docs/uptime/api/list-all-azure-integrations Use this cURL command to fetch a list of all your Azure integrations. Ensure you replace `$TOKEN` with your actual API token for authentication. ```shell curl --request GET \ --url https://uptime.betterstack.com/api/v2/azure-integrations \ --header "Authorization: Bearer $TOKEN" ``` -------------------------------- ### Get Single Status Page Subscriber Source: https://betterstack.com/docs/uptime/api/get-a-single-status-page-subscriber Fetches a single email subscriber of your status page using its ID. ```APIDOC ## GET /api/v2/status-pages/{status_page_id}/subscribers/{subscriber_id} ### Description Returns a single email subscriber of your status page. ### Method GET ### Endpoint https://uptime.betterstack.com/api/v2/status-pages/{status_page_id}/subscribers/{subscriber_id} ### Parameters #### Path Parameters - **status_page_id** (string) - Required - The ID of your status page. - **subscriber_id** (string) - Required - The ID of the subscriber. #### Header Parameters - **Authorization** (string) - Required - Bearer $TOKEN ### Response #### Success Response (200) - **data** (object) - Contains the subscriber details. - **id** (string) - The unique identifier for the subscriber. - **type** (string) - The type of the resource, always 'status_page_subscriber'. - **attributes** (object) - The attributes of the subscriber. - **status_page_id** (integer) - The ID of the status page the subscriber belongs to. - **email** (string) - The email address of the subscriber. - **status_page_resource_ids** (array) - A list of resource IDs the subscriber is subscribed to. - **confirmed_at** (string) - The timestamp when the subscriber confirmed their subscription. - **created_at** (string) - The timestamp when the subscriber was created. - **updated_at** (string) - The timestamp when the subscriber was last updated. #### Response Example { "data": { "id": "123456789", "type": "status_page_subscriber", "attributes": { "status_page_id": 987654321, "email": "customer@example.com", "status_page_resource_ids": [], "confirmed_at": "2026-04-29T14:30:00.000Z", "created_at": "2026-04-29T14:30:00.000Z", "updated_at": "2026-04-29T14:30:00.000Z" } } } #### Example cURL ```bash curl --request GET \ --url https://uptime.betterstack.com/api/v2/status-pages/987654321/subscribers/123456789 \ --header "Authorization: Bearer $TOKEN" ``` ```