### List Components (cURL) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/START_HERE.md Example of how to list all components associated with a specific page using a GET request. Requires the page ID. ```bash curl -X GET https://api.instatus.com/v1/{page_id}/components \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### Authenticate with API Key (JavaScript) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/START_HERE.md JavaScript example for making an authenticated GET request using the fetch API. Replace YOUR_API_KEY with your actual API key. ```javascript fetch("https://api.instatus.com/v1/pages", { headers: {"Authorization": "Bearer YOUR_API_KEY"} }) ``` -------------------------------- ### Authenticate with API Key (Python) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/START_HERE.md Python example for making an authenticated GET request using the requests library. Replace YOUR_API_KEY with your actual API key. ```python import requests response = requests.get( "https://api.instatus.com/v1/pages", headers={"Authorization": "Bearer YOUR_API_KEY"} ) ``` -------------------------------- ### Authentication Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/START_HERE.md This snippet demonstrates how to authenticate with the Instatus API using a Bearer token. It shows examples for cURL, Python, and JavaScript. ```APIDOC ## Authentication ### Description Demonstrates how to authenticate API requests using a Bearer token. ### Method GET ### Endpoint https://api.instatus.com/v1/pages ### Parameters #### Headers - **Authorization** (string) - Required - Your API key prefixed with "Bearer ". - **Content-Type** (string) - Required - Set to "application/json". ### Request Example #### cURL ```bash curl -X GET https://api.instatus.com/v1/pages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" ``` #### Python ```python import requests response = requests.get( "https://api.instatus.com/v1/pages", headers={"Authorization": "Bearer YOUR_API_KEY"} ) ``` #### JavaScript ```javascript fetch("https://api.instatus.com/v1/pages", { headers: {"Authorization": "Bearer YOUR_API_KEY"} }) ``` ``` -------------------------------- ### Authenticate with API Key (cURL) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/START_HERE.md Example of how to make an authenticated GET request using a Bearer token in cURL. Ensure you replace YOUR_API_KEY with your actual API key. ```bash # Get your API key from: https://dashboard.instatus.com/developer # Make a request using Bearer token curl -X GET https://api.instatus.com/v1/pages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" ``` -------------------------------- ### Example API Response Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md This is an example of a successful JSON response when listing status pages via the Instatus API. ```json { "data": [ { "id": "abc123...", "name": "My Status Page", "subdomain": "status.example.com", "timezone": "America/New_York" } ], "status": "success" } ``` -------------------------------- ### JSON Request Body Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md All request bodies must be JSON-formatted. This example shows the structure for creating a new resource. ```json { "name": "Example", "description": "Example resource", "status": "active" } ``` -------------------------------- ### Get Public Status Summary Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Retrieve the current status summary of a status page. The base URL is your status page URL. Example: https://instat.us/summary.json ```http GET /summary.json ``` -------------------------------- ### Get Page Components Source: https://github.com/instatushq/openapi/blob/main/_autodocs/INDEX.md Retrieves a list of components for a specific Instatus page. ```APIDOC ## GET /v1/{page_id}/components ### Description Retrieves a list of components configured for a specific Instatus page. ### Method GET ### Endpoint /v1/{page_id}/components ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the page whose components are to be retrieved. ### Response #### Success Response (200) - **data** (array) - A list of component objects. - Each component object contains: - **id** (string) - The unique identifier for the component. - **name** (string) - The name of the component. - **description** (string) - A description of the component. - **created_at** (string) - Timestamp when the component was created. - **updated_at** (string) - Timestamp when the component was last updated. - **page_id** (string) - The ID of the page this component belongs to. - **status** (string) - The current status of the component (e.g., 'operational', 'degraded', 'down'). ``` -------------------------------- ### API Authentication Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md Demonstrates how to authenticate API requests using a Bearer token in the Authorization header. ```APIDOC ## GET /v1/pages ### Description Retrieves a list of pages. This endpoint requires authentication. ### Method GET ### Endpoint https://api.instatus.com/v1/pages ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number for pagination (default: 1) - **per_page** (integer) - Optional - Items per page for pagination (default: 50, max: 100) #### Request Body This endpoint does not accept a request body. ### Headers - **Authorization** (string) - Required - `Bearer YOUR_API_KEY` - **Content-Type** (string) - Required - `application/json` - **X-Request-ID** (string) - Optional - Request identifier for tracking - **User-Agent** (string) - Optional - Identifies your application ### Response #### Success Response (200) - **data** (object) - Contains the list of pages. - **status** (string) - Indicates the status of the response (e.g., "success"). ### Response Example ```json { "data": [ { "id": "page_id_1", "name": "Example Page 1", "created_at": "2024-01-01T00:00:00Z" }, { "id": "page_id_2", "name": "Example Page 2", "created_at": "2024-01-02T00:00:00Z" } ], "status": "success" } ``` ### Error Handling - **401 Unauthorized**: Invalid or missing API key. - **429 Too Many Requests**: Rate limit exceeded. ``` -------------------------------- ### Pagination Parameters Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md Demonstrates how to use 'page' and 'per_page' query parameters to paginate through list endpoints for efficient data retrieval. ```http GET /v1/pages?page=2&per_page=25 ``` -------------------------------- ### Translations Object Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/schemas.md An example of the Translations object structure, used for localizing property values. ```json { "name": { "en": "This will be displayed for English users", "fr": "Ceci sera affich\u00e9 pour les utilisateurs francophones" }, "description": { "en": "Example description in English", "fr": "Exemple de description en fran\u00e7ais" } } ``` -------------------------------- ### Make First API Request with Node.js Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md This Node.js example shows how to fetch your pages using the node-fetch library. Remember to replace YOUR_API_KEY with your valid API key. ```javascript const fetch = require('node-fetch'); const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }; fetch("https://api.instatus.com/v1/pages", { headers }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### Make First API Request with Python Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md This Python script demonstrates how to make a GET request to list pages using the requests library. Replace YOUR_API_KEY with your actual API key. ```python import requests headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } response = requests.get("https://api.instatus.com/v1/pages", headers=headers) print(response.json()) ``` -------------------------------- ### Set Up a Webhook Endpoint for Real-time Updates Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md Create a Flask application to receive and process real-time webhook notifications from Instatus. This example includes signature verification to ensure authenticity. ```python from flask import Flask, request import hmac import hashlib app = Flask(__name__) WEBHOOK_SECRET = "your_webhook_secret" @app.route('/webhook', methods=['POST']) def handle_webhook(): # Verify signature signature = request.headers.get('X-Instatus-Signature', '') body = request.get_data() calculated = hmac.new( WEBHOOK_SECRET.encode(), body, hashlib.sha256 ).hexdigest() if not hmac.compare_digest(calculated, signature): return {'status': 'invalid_signature'}, 401 # Process webhook data = request.json event_type = data.get('event') if event_type == 'incident.created': print(f"New incident: {data['data']['name']}") elif event_type == 'incident.updated': print(f"Incident updated: {data['data']['status']}") return {'status': 'success'}, 200 if __name__ == '__main__': app.run(port=5000) ``` -------------------------------- ### Pagination Response Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md A typical JSON response structure for paginated lists, including data and pagination metadata. ```json { "data": [...], "pagination": { "page": 1, "per_page": 50, "total": 150, "pages": 3 }, "status": "success" } ``` -------------------------------- ### GET /v1/workspaces Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Retrieve a list of your workspaces. Supports pagination with default values for page and per_page. ```APIDOC ## GET /v1/workspaces ### Description Retrieve a list of your workspaces. ### Method GET ### Endpoint /v1/workspaces ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number for pagination Default: 1 - **per_page** (integer) - Optional - Number of items per page Default: 50 ### Response #### Success Response (200) **Description:** Successful response ``` -------------------------------- ### GET /v1/user Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Retrieves the profile information of the authenticated user. ```APIDOC ## GET /v1/user ### Description Get your user profile Retrieve the profile information of the authenticated user ### Method GET ### Endpoint /v1/user ### Response #### 200 **Description:** Successful response ``` -------------------------------- ### Create an Incident (cURL) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/START_HERE.md Example of how to create a new incident using a POST request. This requires the page ID and incident details in the request body. ```bash curl -X POST https://api.instatus.com/v1/{page_id}/incidents \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Service Down", "impact": "major", "description": "API is unavailable" }' ``` -------------------------------- ### JSON Response Body Example Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md Successful API responses are returned in JSON format. This illustrates the typical structure for resource data. ```json { "data": { "id": "resource_id", "name": "Example", "created_at": "2024-01-01T00:00:00Z" }, "status": "success" } ``` -------------------------------- ### GET /v1/{page_id}/components Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Retrieve a list of components for a specific status page. Supports pagination. ```APIDOC ## GET /v1/{page_id}/components ### Description Retrieve a list of components for a specific status page. ### Method GET ### Endpoint /v1/{page_id}/components ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page #### Query Parameters - **page** (integer) - Optional - Page number for pagination Default: 1 - **per_page** (integer) - Optional - Number of items per page Default: 50 ### Response #### Success Response (200) **Description:** Successful response ``` -------------------------------- ### Post an Incident Update (cURL) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/START_HERE.md Example of how to post an update to an existing incident, including options to change the status and notify subscribers. Requires page ID and incident ID. ```bash curl -X POST https://api.instatus.com/v1/{page_id}/incidents/{id}/incident-updates \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "status": "resolved", "description": "Issue fixed", "notify_subscribers": true }' ``` -------------------------------- ### Create a Monitor Source: https://github.com/instatushq/openapi/blob/main/_autodocs/INDEX.md Set up a new monitor to automatically check the health of a specified URL. Configure the name, URL, HTTP method, and check frequency. ```bash curl -X POST https://api.instatus.com/monitors \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "API Health Check", "url": "https://api.example.com/health", "method": "GET", "check_frequency": 60 }' ``` -------------------------------- ### List All Status Pages Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md Retrieves a list of all status pages associated with your Instatus account. This is a common starting point for interacting with the API. ```APIDOC ## GET /v1/pages ### Description Retrieves a list of all status pages. ### Method GET ### Endpoint https://api.instatus.com/v1/pages ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **per_page** (integer) - Optional - The number of items to return per page. ### Request Example ```bash curl -X GET https://api.instatus.com/v1/pages \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Response #### Success Response (200) - **data** (array) - An array of status page objects. - **status** (string) - The status of the response, e.g., "success". - **pagination** (object) - Pagination details for the response. - **page** (integer) - Current page number. - **pages** (integer) - Total number of pages. - **per_page** (integer) - Items per page. - **total** (integer) - Total number of items. ### Response Example ```json { "data": [ { "id": "abc123...", "name": "My Status Page", "subdomain": "status.example.com", "timezone": "America/New_York" } ], "status": "success", "pagination": { "page": 1, "pages": 1, "per_page": 50, "total": 1 } } ``` ``` -------------------------------- ### JavaScript Fetch with Bearer Token Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md Example of making an authenticated API request using the JavaScript fetch API. The Authorization and Content-Type headers are set in the request options. ```javascript const headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }; fetch("https://api.instatus.com/v1/pages", { headers }) .then(response => response.json()) .then(data => console.log(data)); ``` -------------------------------- ### GET /v1/{page_id}/components Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/components.md Retrieve a list of components for a specific status page. Supports pagination with default values for page number and items per page. ```APIDOC ## GET /v1/{page_id}/components ### Description Get all your status page components. Retrieve a list of components for a specific status page. The default page number is 1. The default per_page number is 50 and the maximum is 100 items per page. ### Method GET ### Endpoint /v1/{page_id}/components ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page #### Query Parameters - **page** (integer) - Optional - Page number for pagination - **per_page** (integer) - Optional - Number of items per page ### Responses #### Success Response (200) - Successful response ``` -------------------------------- ### Get Workspaces Endpoint with Pagination Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Retrieve a list of your workspaces. The default page number is 1, and the default per_page number is 50 (max 100). ```http GET /v1/workspaces?page={page}&per_page={per_page} ``` -------------------------------- ### cURL Request with Bearer Token Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md Use this cURL command to make authenticated GET requests to the Instatus API. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X GET https://api.instatus.com/v1/pages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" ``` -------------------------------- ### GET /v1/{page_id}/components Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Retrieve a list of components for a specific status page. The default page number is 1. The default per_page number is 50 and the maximum is 100 items per page. ```APIDOC ## GET /v1/{page_id}/components ### Description Retrieve a list of components for a specific status page. The default page number is 1. The default per_page number is 50 and the maximum is 100 items per page. ### Method GET ### Endpoint /v1/{page_id}/components ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page #### Query Parameters - **page** (integer) - Optional - Page number for pagination - **per_page** (integer) - Optional - Number of items per page ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### GET /monitors/check_inserted_logs Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/monitors.md Checks for inserted logs related to monitors. ```APIDOC ## GET /monitors/check_inserted_logs ### Description Checks for inserted logs. ### Method GET ### Endpoint /monitors/check_inserted_logs ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### GET /v1/{page_id}/incidents/{incident_id} Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Retrieve a specific incident. ```APIDOC ## GET /v1/{page_id}/incidents/{incident_id} ### Description Retrieve a specific incident. ### Method GET ### Endpoint /v1/{page_id}/incidents/{incident_id} ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page - **incident_id** (string) - Required - The ID of the incident ``` -------------------------------- ### Get an incident Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/incidents.md Retrieve a specific incident by its ID for a given page. ```APIDOC ## GET /v1/{page_id}/incidents/{incident_id} ### Description Get an incident. Retrieve a specific incident. ### Method GET ### Endpoint /v1/{page_id}/incidents/{incident_id} ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page - **incident_id** (string) - Required - The ID of the incident ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### POST /monitors Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/monitors.md Creates a new monitor. Requires a CreateMonitorRequest payload. ```APIDOC ## POST /monitors ### Description Creates a new monitor. ### Method POST ### Endpoint /monitors ### Request Body **Required:** Yes **Schema:** `CreateMonitorRequest` ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### Get Routing Rules Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Retrieve a list of routing rules for a status page. ```APIDOC ## GET /{page_id}/routing-rules ### Description Get Routing Rules. ### Method GET ### Endpoint /{page_id}/routing-rules ### Parameters #### Path Parameters - **page_id** (string) - Required - ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### Get User Profile Endpoint Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Retrieve the profile information of the authenticated user. ```http GET /v1/user ``` -------------------------------- ### POST /v1/workspaces Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Create a new workspace. Requires a JSON request body. ```APIDOC ## POST /v1/workspaces ### Description Create a new workspace. ### Method POST ### Endpoint /v1/workspaces ### Request Body **Required:** Yes **Content-Type:** `application/json` ### Response #### Success Response (200) **Description:** Successful response ``` -------------------------------- ### GET /monitors-groups/{id}/run Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Triggers a check for a specific monitor group. ```APIDOC ## GET /monitors-groups/{id}/run ### Description Run Monitor Group Check ### Method GET ### Endpoint /monitors-groups/{id}/run ### Parameters #### Path Parameters - **id** (string) - Required - Description: #### Query Parameters - **location** (string) - Optional - Description: - **retry** (boolean) - Optional - Description: Default: False - **monitorLogId** (string) - Optional - Description: ### Response #### 200 **Description:** Successful response ``` -------------------------------- ### Create a Monitor Source: https://github.com/instatushq/openapi/blob/main/_autodocs/INDEX.md Creates a new monitor to track the health of a specific URL or endpoint. ```APIDOC ## POST /v1/monitors ### Description Creates a new monitor to track the health and availability of a specified URL or endpoint. ### Method POST ### Endpoint /v1/monitors ### Parameters #### Request Body - **name** (string) - Required - The name of the monitor. - **url** (string) - Required - The URL to monitor. - **method** (string) - Optional - The HTTP method to use for checking the URL (e.g., 'GET', 'POST'). Defaults to 'GET'. - **check_frequency** (integer) - Optional - The frequency in seconds at which to check the monitor. Defaults to 60. ### Request Example ```json { "name": "API Health Check", "url": "https://api.example.com/health", "method": "GET", "check_frequency": 60 } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the newly created monitor. - **name** (string) - The name of the monitor. - **url** (string) - The URL being monitored. - **method** (string) - The HTTP method used for checks. - **check_frequency** (integer) - The frequency of checks in seconds. - **created_at** (string) - Timestamp when the monitor was created. - **updated_at** (string) - Timestamp when the monitor was last updated. ``` -------------------------------- ### POST /monitors Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Creates a new Monitor. Requires a Bearer token for authentication. The request body must conform to the `CreateMonitorRequest` schema. ```APIDOC ## POST /monitors ### Description Creates a new Monitor. ### Method POST ### Endpoint /monitors ### Request Body Schema: `CreateMonitorRequest` ```json { "$ref": "#/components/schemas/CreateMonitorRequest" } ``` ### Responses #### Success Response (200) Successful response. ``` -------------------------------- ### GET /on-call-schedules/{id}/members Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/on-call_schedules.md Retrieves the members of an on-call schedule by its ID. ```APIDOC ## GET /on-call-schedules/{id}/members ### Description Retrieves the members of an on-call schedule by its ID. ### Method GET ### Endpoint /on-call-schedules/{id}/members ### Parameters #### Path Parameters - **id** (string) - Required - ### Response #### Success Response (200) Successful response ``` -------------------------------- ### Get Escalation Policies Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/escalation_policies.md Retrieves a list of escalation policies for a given page. ```APIDOC ## GET /{page_id}/escalation-policies ### Description Retrieves a list of escalation policies for a given page. ### Method GET ### Endpoint /{page_id}/escalation-policies ### Parameters #### Path Parameters - **page_id** (string) - Required - ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### GET /{page_id}/routing-rules Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/routing_rules.md Retrieves all routing rules associated with a specific page ID. ```APIDOC ## GET /{page_id}/routing-rules ### Description Retrieves all routing rules associated with a specific page ID. ### Method GET ### Endpoint /{page_id}/routing-rules #### Parameters ##### Path Parameters - **page_id** (string) - Required - ### Response #### Success Response (200) Successful response ``` -------------------------------- ### Create Monitor Alert Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/monitor_alerts.md Creates a new monitor alert. ```APIDOC ## POST /monitor-alerts ### Description Creates a new monitor alert. ### Method POST ### Endpoint /monitor-alerts #### Request Body **Required:** Yes **Schema:** `CreateMonitorAlertRequest` ### Response #### Success Response (200) Successful response ``` -------------------------------- ### POST /v1/workspaces Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Creates a new workspace. Requires a request body conforming to the CreateWorkspaceRequest schema. ```APIDOC ## POST /v1/workspaces ### Description Create a workspace Create a new workspace ### Method POST ### Endpoint /v1/workspaces ### Request Body Schema: `CreateWorkspaceRequest` ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### GET /on-call-schedules/{id}/members Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/on-call-schedules.md Retrieves the members of an on-call schedule identified by its ID. ```APIDOC ## GET /on-call-schedules/{id}/members ### Description Retrieves the members of an on-call schedule identified by its ID. ### Method GET ### Endpoint /on-call-schedules/{id}/members ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the on-call schedule to retrieve members from. ### Responses #### Success Response (200) This endpoint does not return a schema for the success response. ``` -------------------------------- ### Get Monitors Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Retrieve a list of monitors for a specific status page. Supports search and filtering. ```APIDOC ## GET /{page_id}/monitors ### Description Retrieve a list of monitors for a specific status page. ### Method GET ### Endpoint /{page_id}/monitors ### Parameters #### Path Parameters - **page_id** (string) - Required - #### Query Parameters - **limit** (integer) - Optional - The number of monitors per page - **search** (string) - Optional - Search term for filtering results. - **status** (string) - Optional - ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### Get Subscribers Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Retrieve a list of subscribers for a specific status page. Supports pagination and search. ```APIDOC ## GET /v2/{page_id}/subscribers ### Description Retrieve a list of subscribers for a specific status page. The default page number is 1. The default per_page number is 50 and the maximum is 100 items per page. ### Method GET ### Endpoint /v2/{page_id}/subscribers ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page #### Query Parameters - **page** (integer) - Optional - Page number for pagination - **per_page** (integer) - Optional - Number of items per page - **search** (string) - Optional - Filter subscribers by email address or phone number ### Responses #### Success Response (200) Successful response ``` -------------------------------- ### CreateMonitorRequest Source: https://github.com/instatushq/openapi/blob/main/_autodocs/types.md Defines the parameters for creating a new monitor. This includes the URL to monitor, HTTP method, request details, assertions, and associated alerts. ```APIDOC ## CreateMonitorRequest ### Description Defines the parameters for creating a new monitor. This includes the URL to monitor, HTTP method, request details, assertions, and associated alerts. ### Fields #### Request Body - **pageId** (string) - Required - The id of the status page of the monitor to create the monitor on. - **url** (string) - Required - Description for url - **httpMethod** (httpMethod) - Required - Description for httpMethod - **body** (string) - Optional - Description for body - **headers** (object) - Optional - Description for headers - **queryParams** (object) - Optional - Description for queryParams - **basicAuth** (object) - Optional - Description for basicAuth - **type** (MonitorType) - Optional - Description for type - **assertions** (array) - Optional - Description for assertions - **alerts** (array) - Optional - The ids of the alerts to send when the monitor triggers an alert. - **name** (string) - Optional - Description for name - **locations** (MonitorLocation) - Optional - Description for locations - **checksInterval** (integer) - Optional - The interval in seconds between each monitor check. - **createComponent** (boolean) - Optional - Whether to create a component that will follow the status of the monitor on the status page. - **createMetric** (boolean) - Optional - Whether to create a metric that will show the response time of the monitor on the status page. - **onFail** (object) - Optional - Description for onFail - **onRecover** (object) - Optional - Description for onRecover ``` -------------------------------- ### GET /{page_id}/escalation-policies Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Retrieve a list of escalation policies associated with a specific status page. ```APIDOC ## GET /{page_id}/escalation-policies ### Description Retrieve a list of escalation policies for a specific status page. ### Method GET ### Endpoint /{page_id}/escalation-policies ### Parameters #### Path Parameters - **page_id** (string) - Required - ### Response #### Success Response (200) **Description:** Successful response ``` -------------------------------- ### Create an Incident Source: https://github.com/instatushq/openapi/blob/main/_autodocs/INDEX.md Use this endpoint to create a new incident on your Instatus page. Specify the incident's name, impact level, description, and affected components. ```bash curl -X POST https://api.instatus.com/v1/{page_id}/incidents \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "API Server Down", "impact": "major", "description": "Our main API is unavailable", "components": ["component_id"] }' ``` -------------------------------- ### Handling Pagination Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md Demonstrates how to retrieve all items from a paginated list response by iterating through pages until all data is fetched. ```APIDOC ## GET /v1/pages ### Description Retrieves a paginated list of pages. ### Method GET ### Endpoint /v1/pages ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **per_page** (integer) - Optional - The number of items to return per page. ### Request Example ```python import requests all_items = [] page = 1 while True: response = requests.get( "https://api.instatus.com/v1/pages", headers={"Authorization": "Bearer YOUR_API_KEY"}, params={"page": page, "per_page": 50} ) data = response.json() all_items.extend(data["data"]) if page >= data["pagination"]["pages"]: break page += 1 ``` ### Response #### Success Response (200) - **data** (array) - The list of items. - **pagination** (object) - Pagination metadata. - **page** (integer) - The current page number. - **per_page** (integer) - The number of items per page. - **total** (integer) - The total number of items available. - **pages** (integer) - The total number of pages. - **status** (string) - The status of the response (e.g., "success"). #### Response Example ```json { "data": [...], "pagination": { "page": 1, "per_page": 50, "total": 150, "pages": 3 }, "status": "success" } ``` ``` -------------------------------- ### GET /monitors/check_inserted_logs Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Checks for inserted logs related to monitors. Requires a Bearer token for authentication. ```APIDOC ## GET /monitors/check_inserted_logs ### Description Checks for inserted logs related to monitors. ### Method GET ### Endpoint /monitors/check_inserted_logs ### Responses #### Success Response (200) Successful response. ``` -------------------------------- ### CreateMonitorRequest Source: https://github.com/instatushq/openapi/blob/main/_autodocs/schemas.md Schema for creating a monitor, including URL, HTTP method, headers, assertions, alerts, and configuration for checks and component creation. ```APIDOC ## CreateMonitorRequest **Type:** `object` ### Description Schema for creating a monitor, including URL, HTTP method, headers, assertions, alerts, and configuration for checks and component creation. ### Fields | Name | Type | Required | Description | |------|------|----------|-------------| | pageId | string | ✓ | The id of the status page of the monitor to create the monitor on. | | url | string | ✓ | | | httpMethod | httpMethod | ✓ | | | body | string|null | — | | | headers | object | — | | | queryParams | object | — | | | basicAuth | object | — | | | type | MonitorType | — | | | assertions | array[object] | — | | | alerts | array[string] | — | The ids of the alerts to send when the monitor triggers an alert. | | name | string | — | | | locations | MonitorLocation | — | | | checksInterval | integer | — | The interval in seconds between each monitor check. | | createComponent | boolean | — | Whether to create a component that will follow the status of the monitor on the | | createMetric | boolean | — | Whether to create a metric that will show the response time of the monitor on th | | onFail | object | — | | | onRecover | object | — | | ``` -------------------------------- ### List All Pages Source: https://github.com/instatushq/openapi/blob/main/_autodocs/INDEX.md Retrieve a list of all pages associated with your Instatus account. This is useful for managing multiple status pages. ```bash curl -X GET https://api.instatus.com/v1/pages \ -H "Authorization: Bearer YOUR_API_KEY" ``` -------------------------------- ### PublicIncident Source: https://github.com/instatushq/openapi/blob/main/_autodocs/types.md Represents a public incident, including its name, start time, status, impact, and URL. ```APIDOC ## PublicIncident ### Description Represents a public incident, including its name, start time, status, impact, and URL. ### Fields - **name** (string) - Description: - **started** (string) - Description: - **status** (IncidentStatus) - Description: - **impact** (IncidentImpact) - Description: - **url** (string) - Description: ``` -------------------------------- ### Webhook Verification Source: https://github.com/instatushq/openapi/blob/main/_autodocs/authentication.md Provides instructions and an example for verifying the authenticity of incoming webhooks using HMAC-SHA256 signatures. ```APIDOC ## Webhook Endpoints ### Description Webhooks are delivered as HTTP POST requests with JSON payloads to notify about feature events. ### Headers - **Content-Type**: `application/json` - **X-Instatus-Signature**: HMAC-SHA256 signature for verification. ### Verifying Webhooks To ensure webhook authenticity: 1. Obtain the raw request body. 2. Retrieve the signature from the `X-Instatus-Signature` header. 3. Calculate the HMAC-SHA256 signature using your webhook secret and the raw request body. 4. Compare the calculated signature with the signature from the header. **Example (Python):** ```python import hmac import hashlib def verify_webhook(request_body, signature, webhook_secret): calculated = hmac.new( webhook_secret.encode(), request_body.encode(), hashlib.sha256 ).hexdigest() return hmac.compare_digest(calculated, signature) ``` ``` -------------------------------- ### Store API Key Using Environment Variables (Bash) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md Securely store your Instatus API key by exporting it as an environment variable in your bash shell. ```bash # Use environment variables export INSTATUS_API_KEY="your_api_key" ``` -------------------------------- ### POST /v1/{page_id}/components Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/components.md Create a new component for a specific status page. Requires a request body containing component details. ```APIDOC ## POST /v1/{page_id}/components ### Description Create a component. Create a new component for a specific status page. ### Method POST ### Endpoint /v1/{page_id}/components ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page #### Request Body - Required: Yes - Schema: `CreateComponentRequest` ### Responses #### Success Response (200) - Successful response ``` -------------------------------- ### Create Workspace Request Source: https://github.com/instatushq/openapi/blob/main/_autodocs/schemas.md Defines the fields required to create a new workspace, including its name, slug, and notification preferences. ```APIDOC ## CreateWorkspaceRequest **Type:** `object` ### Fields | Name | Type | Required | Description | |------|------|----------|-------------| | name | string | — | | | slug | string | — | | | sendNewWorkspaceMembersStatusPageUpdates | boolean | — | | | sendNewWorkspaceMembersAutomationIntegrationNotifications | boolean | — | | | sendNewWorkspaceMembersInvalidCustomDomainNotifications | boolean | — | | | sendNewWorkspaceMembersPhoneCallNotifications | boolean | — | | | sendNewWorkspaceMembersWeeklyReportsNotifications | boolean | — | | | longRunningIncidentNotificationSettings | array[number] | — | | ``` -------------------------------- ### GET /v1/{page_id}/templates Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Retrieve a list of templates for a specific status page. Supports pagination. ```APIDOC ## GET /v1/{page_id}/templates ### Description Retrieve a list of templates for a specific status page. The default page number is 1 and the default per_page number is 50, with a maximum of 100 items per page. ### Method GET ### Endpoint /v1/{page_id}/templates ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page #### Query Parameters - **page** (integer) - Optional - Page number for pagination. Default: 1 - **per_page** (integer) - Optional - Number of items per page. Default: 50 ### Response #### Success Response (200) **Description:** Successful response ``` -------------------------------- ### GET /v1/{page_id}/metrics Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoint-reference.md Retrieve a list of metrics for a specific status page. Supports pagination. ```APIDOC ## GET /v1/{page_id}/metrics ### Description Get all metrics for a specific status page. The default page number is 1 and the default per_page number is 50 (maximum 100). ### Method GET ### Endpoint /v1/{page_id}/metrics ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page #### Query Parameters - **page** (integer) - Optional - Page number for pagination. Default: 1 - **per_page** (integer) - Optional - Number of items per page. Default: 50 ### Response #### Success Response (200) **Description:** Successful response ``` -------------------------------- ### Store API Key Using Environment Variables (Python) Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md Retrieve your Instatus API key from environment variables in your Python application. ```python import os api_key = os.getenv('INSTATUS_API_KEY') ``` -------------------------------- ### List Components on a Page Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md Retrieves a list of all components associated with a specific status page. ```APIDOC ## GET /v1/{page_id}/components ### Description Retrieves a list of components for a specific status page. ### Method GET ### Endpoint https://api.instatus.com/v1/{page_id}/components ### Parameters #### Path Parameters - **page_id** (string) - Required - The unique identifier of the status page. ### Request Example ```bash curl -X GET https://api.instatus.com/v1/{page_id}/components \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Response #### Success Response (200) - **data** (array) - An array of component objects. - **status** (string) - The status of the response, e.g., "success". ### Response Example ```json { "data": [ { "id": "comp_xyz789", "name": "API", "description": "Main API Service", "status": "operational" } ], "status": "success" } ``` ``` -------------------------------- ### Get a Specific Status Page Source: https://github.com/instatushq/openapi/blob/main/_autodocs/getting-started.md Retrieves details for a single status page identified by its unique ID. ```APIDOC ## GET /v1/pages/{page_id} ### Description Retrieves details for a specific status page. ### Method GET ### Endpoint https://api.instatus.com/v1/pages/{page_id} ### Parameters #### Path Parameters - **page_id** (string) - Required - The unique identifier of the status page. ### Request Example ```bash curl -X GET https://api.instatus.com/v1/pages/{page_id} \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Response #### Success Response (200) - **data** (object) - The status page object. - **status** (string) - The status of the response, e.g., "success". ### Response Example ```json { "data": { "id": "abc123...", "name": "My Status Page", "subdomain": "status.example.com", "timezone": "America/New_York" }, "status": "success" } ``` ``` -------------------------------- ### GET /v1/{page_id}/metrics/{metric_id} Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/metrics.md Retrieve a specific metric by its ID for a given status page. ```APIDOC ## GET /v1/{page_id}/metrics/{metric_id} ### Description Retrieve a specific metric. ### Method GET ### Endpoint /v1/{page_id}/metrics/{metric_id} ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page - **metric_id** (string) - Required - The ID of the metric #### Responses #### Success Response (200) Successful response ``` -------------------------------- ### Create Monitor Request Body Schema Source: https://github.com/instatushq/openapi/blob/main/_autodocs/endpoints.md Defines the schema for creating a monitor. This is a reference to a more detailed schema definition. ```json { "$ref": "#/components/schemas/CreateMonitorRequest" } ``` -------------------------------- ### GET /v1/{page_id}/maintenances/{maintenance_id} Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/maintenances.md Retrieve a specific maintenance by its ID for a given status page. ```APIDOC ## GET /v1/{page_id}/maintenances/{maintenance_id} ### Description Get a maintenance. Retrieve a specific maintenance. ### Method GET ### Endpoint /v1/{page_id}/maintenances/{maintenance_id} #### Parameters ##### Path Parameters - **page_id** (string) - Required - The ID of the status page - **maintenance_id** (string) - Required - The ID of the maintenance #### Responses ##### Success Response (200) Successful response ``` -------------------------------- ### List All Pages Source: https://github.com/instatushq/openapi/blob/main/_autodocs/INDEX.md Retrieves a list of all pages associated with your Instatus account. ```APIDOC ## GET /v1/pages ### Description Retrieves a list of all pages associated with your Instatus account. ### Method GET ### Endpoint /v1/pages ### Response #### Success Response (200) - **data** (array) - A list of page objects. - Each page object contains: - **id** (string) - The unique identifier for the page. - **name** (string) - The name of the page. - **domain** (string) - The custom domain for the page, if configured. - **url** (string) - The public URL of the page. - **created_at** (string) - Timestamp when the page was created. - **updated_at** (string) - Timestamp when the page was last updated. ``` -------------------------------- ### GET /v1/{page_id}/components/{component_id} Source: https://github.com/instatushq/openapi/blob/main/_autodocs/api-reference/components.md Retrieve a specific component by its ID for a given status page. ```APIDOC ## GET /v1/{page_id}/components/{component_id} ### Description Get a component. Retrieve a specific component. ### Method GET ### Endpoint /v1/{page_id}/components/{component_id} ### Parameters #### Path Parameters - **page_id** (string) - Required - The ID of the status page - **component_id** (string) - Required - The ID of the component ### Responses #### Success Response (200) - Successful response ```