From eb23f4fb7e6e31cf6350651749b55c8d82f79fd9 Mon Sep 17 00:00:00 2001 From: Instatus <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 25 Jul 2026 12:54:43 +0000 Subject: [PATCH] Update OpenAPI spec --- instatus.json | 2302 +++++++++++++++++++++++++++++++++++++------------ instatus.yaml | 855 +++++++++++++++++- 2 files changed, 2583 insertions(+), 574 deletions(-) diff --git a/instatus.json b/instatus.json index 2383489..bf5dd66 100644 --- a/instatus.json +++ b/instatus.json @@ -670,9 +670,7 @@ } } } - } - }, - "/v1/{page_id}/incidents/{template}": { + }, "post": { "summary": "Add an incident with a template", "description": "Create a new incident using a template", @@ -689,12 +687,12 @@ }, { "in": "path", - "name": "template", + "name": "incident_id", "required": true, "schema": { "type": "string" }, - "description": "The ID or name of the template to use" + "description": "The ID of the template to use" } ], "responses": { @@ -946,7 +944,7 @@ "schema": { "type": "string" }, - "description": "The ID or name of the template to use" + "description": "The ID of the template to use" } ], "responses": { @@ -1732,6 +1730,140 @@ } } }, + "/v2/{page_id}/team-group": { + "get": { + "summary": "Get team group members", + "description": "Retrieve a list of team members for a specific status page, including team group assignments.\nThe default page number is 1.\nThe default per_page number is 50 and the maximum is 100 items per page.\n", + "tags": ["Teammates"], + "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the status page" + }, + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "default": 1 + }, + "description": "Page number for pagination" + }, + { + "in": "query", + "name": "per_page", + "schema": { + "type": "integer", + "default": 50, + "maximum": 100 + }, + "description": "Number of items per page" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamGroupMember" + } + } + } + } + } + } + }, + "post": { + "summary": "Add a team group member", + "description": "Add a new team member to a specific status page", + "tags": ["Teammates"], + "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the status page" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddTeammateRequestV2" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamGroupMemberDetail" + } + } + } + } + } + } + }, + "/v2/{page_id}/team-group/{member_id}": { + "delete": { + "summary": "Delete a team group member", + "description": "Remove a team member from a specific status page", + "tags": ["Teammates"], + "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the status page" + }, + { + "in": "path", + "name": "member_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the team member" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "memberId": { + "type": "string" + } + } + } + } + } + } + } + } + }, "/v1/{page_id}/subscribers": { "get": { "summary": "Get subscribers", @@ -1894,22 +2026,22 @@ ] } } - } - }, - "examples": { - "invalid_request": { - "value": { - "error": { - "code": "invalid_request", - "message": "Request body must contain a \"subscribers\" array with at least one subscriber." - } - } }, - "too_many_subscribers": { - "value": { - "error": { - "code": "too_many_subscribers", - "message": "Cannot create more than 100 subscribers at once." + "examples": { + "invalid_request": { + "value": { + "error": { + "code": "invalid_request", + "message": "Request body must contain a \"subscribers\" array with at least one subscriber." + } + } + }, + "too_many_subscribers": { + "value": { + "error": { + "code": "too_many_subscribers", + "message": "Cannot create more than 100 subscribers at once." + } } } } @@ -2948,16 +3080,89 @@ } } }, - "/monitor-alerts": { + "/{page_id}/monitors/cron": { + "get": { + "summary": "Get Cron Monitors", + "description": "Retrieve a list of cron monitors for a specific status page", + "tags": ["Monitors"], + "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "description": "The number of cron monitors per page", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "in": "query", + "name": "page", + "description": "The page number", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "in": "query", + "name": "search", + "description": "Search term for filtering results by name", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": ["UP", "DOWN", "UNKNOWN", "DEGRADED"] + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CronMonitorListResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/monitors/cron": { "post": { - "summary": "Create Monitor Alert", + "summary": "Create a Cron Monitor", "tags": ["Monitors"], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMonitorAlertRequest" + "$ref": "#/components/schemas/CreateCronMonitorRequest" } } } @@ -2968,7 +3173,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MonitorAlertResponse" + "$ref": "#/components/schemas/CronMonitorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Status page not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -2976,17 +3201,18 @@ } } }, - "/monitor-alerts/{id}": { + "/monitors/cron/{id}": { "put": { - "summary": "Update Monitor Alert", + "summary": "Update a Cron Monitor", "tags": ["Monitors"], "parameters": [ { "in": "path", "name": "id", "required": true, + "description": "The ID of the cron monitor", "schema": { - "$ref": "#/components/schemas/MonitorAlertType" + "type": "string" } } ], @@ -2995,7 +3221,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateMonitorAlertRequest" + "$ref": "#/components/schemas/UpdateCronMonitorRequest" } } } @@ -3006,7 +3232,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MonitorAlertResponse" + "$ref": "#/components/schemas/CronMonitorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -3014,13 +3250,14 @@ } }, "delete": { - "summary": "Delete Monitor Alert", + "summary": "Delete a Cron Monitor", "tags": ["Monitors"], "parameters": [ { "in": "path", "name": "id", "required": true, + "description": "The ID of the cron monitor", "schema": { "type": "string" } @@ -3032,47 +3269,37 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/CronMonitorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - } - }, - "/{page_id}/monitor-alerts": { + }, "get": { - "summary": "Get Monitor Alerts", + "summary": "Ping Cron Monitor Success", + "description": "Record a successful cron job run. Pass the monitor's ping slug as the path value. No authentication required — the slug acts as the secret. Also available at https://cron.instatus.com/{slug}", "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "page_id", + "name": "id", "required": true, + "description": "The ping slug of the cron monitor", "schema": { "type": "string" } - }, - { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "default": 1 - } } ], "responses": { @@ -3081,107 +3308,61 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "monitorAlerts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MonitorAlert" - } - }, - "total": { - "type": "integer" - }, - "page": { - "type": "integer" - }, - "totalPages": { - "type": "integer" - }, - "limit": { - "type": "integer" - } - } + "$ref": "#/components/schemas/CronMonitorLog" } } } - } - } - } - }, - "/monitors-groups": { - "post": { - "summary": "Create Monitor Group", - "tags": ["Monitors"], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateMonitorGroupRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", + }, + "404": { + "description": "Monitor not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MonitorGroupResponse" + "$ref": "#/components/schemas/CronMonitorPingNotFound" } } } } } - } - }, - "/monitors-groups/{id}": { - "put": { - "summary": "Update Monitor Group", + }, + "post": { + "summary": "Ping Cron Monitor Success", "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", "name": "id", "required": true, + "description": "The ping slug of the cron monitor", "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMonitorGroupRequest" - } - } - } - }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MonitorGroupResponse" + "$ref": "#/components/schemas/CronMonitorLog" } } } } } }, - "delete": { - "summary": "Delete Monitor Group", + "head": { + "summary": "Ping Cron Monitor Success", "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", "name": "id", "required": true, + "description": "The ping slug of the cron monitor", "schema": { "type": "string" } @@ -3189,26 +3370,14 @@ ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - } - } - } + "description": "Successful response" } } } }, - "/monitors-groups/{id}/monitors": { - "post": { - "summary": "Add Monitors to Group", + "/monitors/cron/{id}/logs": { + "get": { + "summary": "Get Cron Monitor Logs", "tags": ["Monitors"], "parameters": [ { @@ -3218,79 +3387,51 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": ["monitors"], - "properties": { - "monitors": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - } - } + }, + { + "in": "query", + "name": "limit", + "description": "The number of logs per page", + "schema": { + "type": "integer", + "default": 100, + "maximum": 127 } - } - } - } - }, - "/monitors-groups/{id}/run": { - "get": { - "summary": "Run Monitor Group Check", - "tags": ["Monitors"], - "parameters": [ + }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "description": "The page number", "schema": { - "type": "string" + "type": "integer", + "default": 1, + "maximum": 1000 } }, { "in": "query", - "name": "location", + "name": "startDate", + "description": "ISO 8601 start date for the log range", "schema": { "type": "string", - "$ref": "#/components/schemas/MonitorLocation" + "format": "date-time" } }, { "in": "query", - "name": "retry", + "name": "endDate", + "description": "ISO 8601 end date for the log range", "schema": { - "type": "boolean", - "default": false + "type": "string", + "format": "date-time" } }, { "in": "query", - "name": "monitorLogId", + "name": "importance", "schema": { - "type": "string" + "type": "string", + "enum": ["all", "important"] } } ], @@ -3300,15 +3441,27 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "result": { - "type": "string" - }, - "monitorLogId": { - "type": "string" - } - } + "$ref": "#/components/schemas/CronMonitorLogsResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Cron monitor not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } @@ -3316,14 +3469,14 @@ } } }, - "/{page_id}/routing-rules": { + "/monitors/cron/{id}/summary": { "get": { - "summary": "Get Routing Rules", - "tags": ["Routing Rules"], + "summary": "Get Cron Monitor Summary", + "tags": ["Monitors"], "parameters": [ { "in": "path", - "name": "page_id", + "name": "id", "required": true, "schema": { "type": "string" @@ -3336,36 +3489,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoutingRulesResponse" + "$ref": "#/components/schemas/CronMonitorSummaryResponse" } } } - } - } - } - }, - "/routing-rules": { - "post": { - "summary": "Create Routing Rule", - "description": "Keep in mind in actions `targetId` can be a workspace member email or a team id depending on the type of the action.", - "tags": ["Routing Rules"], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRoutingRuleRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoutingRuleResponse" + "$ref": "#/components/schemas/Error" } } } @@ -3373,50 +3507,43 @@ } } }, - "/routing-rules/{id}": { - "put": { - "summary": "Update Routing Rule", - "tags": ["Routing Rules"], + "/monitors/cron/{slug}/fail": { + "get": { + "summary": "Ping Cron Monitor Failure", + "description": "Record an explicit cron job failure", + "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRoutingRuleRequest" - } - } - } - }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoutingRuleResponse" + "$ref": "#/components/schemas/CronMonitorLog" } } } } } }, - "delete": { - "summary": "Delete Routing Rule", - "tags": ["Routing Rules"], + "post": { + "summary": "Ping Cron Monitor Failure", + "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { "type": "string" @@ -3429,22 +3556,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteRoutingRuleResponse" + "$ref": "#/components/schemas/CronMonitorLog" } } } } } - } - }, - "/{page_id}/escalation-policies": { - "get": { - "summary": "Get Escalation Policies", - "tags": ["Escalation Policies"], + }, + "head": { + "summary": "Ping Cron Monitor Failure", + "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "page_id", + "name": "slug", "required": true, "schema": { "type": "string" @@ -3453,90 +3579,75 @@ ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EscalationPoliciesResponse" - } - } - } + "description": "Successful response" } } } }, - "/escalation-policies": { - "post": { - "summary": "Create Escalation Policy", - "tags": ["Escalation Policies"], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateEscalationPolicyRequest" - } + "/monitors/cron/{slug}/start": { + "get": { + "summary": "Ping Cron Monitor Start", + "description": "Record when a cron job starts running (for execution time tracking)", + "tags": ["Monitors"], + "security": [], + "parameters": [ + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EscalationPolicyResponse" + "$ref": "#/components/schemas/CronMonitorLog" } } } } } - } - }, - "/escalation-policies/{id}": { - "put": { - "summary": "Update Escalation Policy", - "tags": ["Escalation Policies"], + }, + "post": { + "summary": "Ping Cron Monitor Start", + "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateEscalationPolicyRequest" - } - } - } - }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EscalationPolicyResponse" + "$ref": "#/components/schemas/CronMonitorLog" } } } } } }, - "delete": { - "summary": "Delete Escalation Policy", - "tags": ["Escalation Policies"], + "head": { + "summary": "Ping Cron Monitor Start", + "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { "type": "string" @@ -3545,28 +3656,21 @@ ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteEscalationPolicyResponse" - } - } - } + "description": "Successful response" } } } }, - "/on-call-schedules": { + "/monitor-alerts": { "post": { - "summary": "Create On-call Schedule", - "tags": ["On Call Schedules"], + "summary": "Create Monitor Alert", + "tags": ["Monitors"], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOnCallScheduleRequest" + "$ref": "#/components/schemas/CreateMonitorAlertRequest" } } } @@ -3577,7 +3681,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnCallScheduleResponse" + "$ref": "#/components/schemas/MonitorAlertResponse" } } } @@ -3585,10 +3689,10 @@ } } }, - "/on-call-schedules/{id}": { + "/monitor-alerts/{id}": { "put": { - "summary": "Update On-call Schedule", - "tags": ["On Call Schedules"], + "summary": "Update Monitor Alert", + "tags": ["Monitors"], "parameters": [ { "in": "path", @@ -3604,7 +3708,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateOnCallScheduleRequest" + "$ref": "#/components/schemas/UpdateMonitorAlertRequest" } } } @@ -3615,7 +3719,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnCallScheduleResponse" + "$ref": "#/components/schemas/MonitorAlertResponse" } } } @@ -3623,29 +3727,8 @@ } }, "delete": { - "summary": "Delete On-call Schedule", - "tags": ["On Call Schedules"], - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "No Content" - } - } - } - }, - "/on-call-schedules/{id}/members": { - "get": { - "summary": "Get On-call Schedule Members", - "tags": ["On Call Schedules"], + "summary": "Delete Monitor Alert", + "tags": ["Monitors"], "parameters": [ { "in": "path", @@ -3662,7 +3745,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetOnCallScheduleMembersResponse" + "type": "object", + "properties": { + "message": { + "type": "string" + } + } } } } @@ -3670,30 +3758,34 @@ } } }, - "/v1/workspaces": { + "/{page_id}/monitor-alerts": { "get": { - "summary": "Get your workspaces", - "description": "Retrieve a list of your workspaces.\n\nThe default page number is 1.\n\nThe default per_page number is 50 and the maximum is 100 items per page.", - "tags": ["Workspaces"], + "summary": "Get Monitor Alerts", + "tags": ["Monitors"], "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "page", + "name": "limit", "schema": { "type": "integer", - "default": 1 - }, - "description": "Page number for pagination" + "default": 100 + } }, { "in": "query", - "name": "per_page", + "name": "page", "schema": { "type": "integer", - "default": 50, - "maximum": 100 - }, - "description": "Number of items per page" + "default": 1 + } } ], "responses": { @@ -3702,26 +3794,44 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Workspace" + "type": "object", + "properties": { + "monitorAlerts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MonitorAlert" + } + }, + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "limit": { + "type": "integer" + } } } } } } } - }, + } + }, + "/monitors-groups": { "post": { - "summary": "Create a workspace", - "description": "Create a new workspace", - "tags": ["Workspaces"], + "summary": "Create Monitor Group", + "tags": ["Monitors"], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateWorkspaceRequest" + "$ref": "#/components/schemas/CreateMonitorGroupRequest" } } } @@ -3732,7 +3842,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Workspace" + "$ref": "#/components/schemas/MonitorGroupResponse" } } } @@ -3740,20 +3850,54 @@ } } }, - "/v1/workspaces/{workspace_id}": { + "/monitors-groups/{id}": { + "put": { + "summary": "Update Monitor Group", + "tags": ["Monitors"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMonitorGroupRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MonitorGroupResponse" + } + } + } + } + } + }, "delete": { - "summary": "Delete a workspace", - "description": "Delete a workspace", - "tags": ["Workspaces"], + "summary": "Delete Monitor Group", + "tags": ["Monitors"], "parameters": [ { "in": "path", - "name": "workspace_id", + "name": "id", "required": true, "schema": { "type": "string" - }, - "description": "The workspace ID" + } } ], "responses": { @@ -3764,7 +3908,7 @@ "schema": { "type": "object", "properties": { - "id": { + "message": { "type": "string" } } @@ -3774,32 +3918,600 @@ } } } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer" - } }, - "schemas": { - "PageStatus": { - "type": "string", - "enum": [ - "UP", - "HASISSUES", - "ALLUNDERMAINTENANCE", - "ALLDEGRADEDPERFORMANCE", - "ALLPARTIALOUTAGE", - "ALLMINOROUTAGE", - "ALLMAJOROUTAGE", - "SOMEUNDERMAINTENANCE", - "SOMEDEGRADEDPERFORMANCE", - "SOMEPARTIALOUTAGE", - "SOMEMINOROUTAGE", - "SOMEMAJOROUTAGE", - "ONEUNDERMAINTENANCE", + "/monitors-groups/{id}/monitors": { + "post": { + "summary": "Add Monitors to Group", + "tags": ["Monitors"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["monitors"], + "properties": { + "monitors": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/monitors-groups/{id}/run": { + "get": { + "summary": "Run Monitor Group Check", + "tags": ["Monitors"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "location", + "schema": { + "$ref": "#/components/schemas/MonitorLocationValue" + } + }, + { + "in": "query", + "name": "retry", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "monitorLogId", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "type": "string" + }, + "monitorLogId": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/{page_id}/routing-rules": { + "get": { + "summary": "Get Routing Rules", + "tags": ["Routing Rules"], + "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoutingRulesResponse" + } + } + } + } + } + } + }, + "/routing-rules": { + "post": { + "summary": "Create Routing Rule", + "description": "Keep in mind in actions `targetId` can be a workspace member email or a team id depending on the type of the action.", + "tags": ["Routing Rules"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRoutingRuleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoutingRuleResponse" + } + } + } + } + } + } + }, + "/routing-rules/{id}": { + "put": { + "summary": "Update Routing Rule", + "tags": ["Routing Rules"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRoutingRuleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoutingRuleResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Routing Rule", + "tags": ["Routing Rules"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteRoutingRuleResponse" + } + } + } + } + } + } + }, + "/{page_id}/escalation-policies": { + "get": { + "summary": "Get Escalation Policies", + "tags": ["Escalation Policies"], + "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EscalationPoliciesResponse" + } + } + } + } + } + } + }, + "/escalation-policies": { + "post": { + "summary": "Create Escalation Policy", + "tags": ["Escalation Policies"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEscalationPolicyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EscalationPolicyResponse" + } + } + } + } + } + } + }, + "/escalation-policies/{id}": { + "put": { + "summary": "Update Escalation Policy", + "tags": ["Escalation Policies"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEscalationPolicyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EscalationPolicyResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Escalation Policy", + "tags": ["Escalation Policies"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEscalationPolicyResponse" + } + } + } + } + } + } + }, + "/on-call-schedules": { + "post": { + "summary": "Create On-call Schedule", + "tags": ["On Call Schedules"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOnCallScheduleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OnCallScheduleResponse" + } + } + } + } + } + } + }, + "/on-call-schedules/{id}": { + "put": { + "summary": "Update On-call Schedule", + "tags": ["On Call Schedules"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOnCallScheduleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OnCallScheduleResponse" + } + } + } + } + } + }, + "delete": { + "summary": "Delete On-call Schedule", + "tags": ["On Call Schedules"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/on-call-schedules/{id}/members": { + "get": { + "summary": "Get On-call Schedule Members", + "tags": ["On Call Schedules"], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOnCallScheduleMembersResponse" + } + } + } + } + } + } + }, + "/v1/workspaces": { + "get": { + "summary": "Get your workspaces", + "description": "Retrieve a list of your workspaces.\n\nThe default page number is 1.\n\nThe default per_page number is 50 and the maximum is 100 items per page.", + "tags": ["Workspaces"], + "parameters": [ + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "default": 1 + }, + "description": "Page number for pagination" + }, + { + "in": "query", + "name": "per_page", + "schema": { + "type": "integer", + "default": 50, + "maximum": 100 + }, + "description": "Number of items per page" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workspace" + } + } + } + } + } + } + }, + "post": { + "summary": "Create a workspace", + "description": "Create a new workspace", + "tags": ["Workspaces"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkspaceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workspace" + } + } + } + } + } + } + }, + "/v1/workspaces/{workspace_id}": { + "delete": { + "summary": "Delete a workspace", + "description": "Delete a workspace", + "tags": ["Workspaces"], + "parameters": [ + { + "in": "path", + "name": "workspace_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The workspace ID" + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "PageStatus": { + "type": "string", + "enum": [ + "UP", + "HASISSUES", + "ALLUNDERMAINTENANCE", + "ALLDEGRADEDPERFORMANCE", + "ALLPARTIALOUTAGE", + "ALLMINOROUTAGE", + "ALLMAJOROUTAGE", + "SOMEUNDERMAINTENANCE", + "SOMEDEGRADEDPERFORMANCE", + "SOMEPARTIALOUTAGE", + "SOMEMINOROUTAGE", + "SOMEMAJOROUTAGE", + "ONEUNDERMAINTENANCE", "ONEDEGRADEDPERFORMANCE", "ONEPARTIALOUTAGE", "ONEMINOROUTAGE", @@ -3867,6 +4579,22 @@ } } }, + "CronMonitorPingNotFound": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "CronMonitorPingError": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, "Translations": { "type": "object", "description": "Object containing translations where each key is a property name and the value is an object with language codes as keys and translations as values. The language code as the key (e.g., 'en', 'fr') and the translation as the value.", @@ -5907,6 +6635,72 @@ } } }, + "AddTeammateRequestV2": { + "type": "object", + "required": ["email", "permission"], + "properties": { + "email": { + "type": "string", + "description": "The email of the teammate you wish to add." + }, + "permission": { + "$ref": "#/components/schemas/TeammatePermission" + }, + "audienceGroups": { + "type": "array", + "description": "The ids of the audience groups you wish to add the teammate to.", + "items": { + "type": "string" + }, + "nullable": true + }, + "teamGroup": { + "type": "string", + "description": "The id of the team group you want to include the teammate in.", + "nullable": true + } + } + }, + "TeamGroup": { + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "TeamGroupMember": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/User" + }, + "teamGroup": { + "$ref": "#/components/schemas/TeamGroup" + } + } + }, + "TeamGroupMemberDetail": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "teamGroup": { + "$ref": "#/components/schemas/TeamGroup" + } + } + }, "TeammateDetail": { "type": "object", "properties": { @@ -6648,56 +7442,203 @@ "name": { "type": "string" }, - "site": { + "site": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + } + } + }, + "DeletedAudienceGroup": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "siteId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "site": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + } + } + }, + "SecurePageLink": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "secureLink": { + "type": "string", + "format": "uri" + } + } + }, + "Monitor": { + "type": "object", + "properties": { + "pageId": { + "type": "string", + "description": "The id of the status page of the monitor." + }, + "url": { + "type": "string" + }, + "httpMethod": { + "$ref": "#/components/schemas/httpMethod" + }, + "body": { + "type": "string", + "nullable": true + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "queryParams": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "basicAuth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "type": { + "$ref": "#/components/schemas/MonitorType" + }, + "assertions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "comparison": { + "$ref": "#/components/schemas/ComparisonType" + }, + "selector": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string" + } + } + } + }, + "alerts": { + "type": "array", + "description": "The ids of the alerts to send when the monitor triggers an alert.", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "locations": { + "$ref": "#/components/schemas/MonitorLocation" + }, + "checksInterval": { + "type": "integer", + "description": "The interval in seconds between each monitor check." + }, + "onFail": { "type": "object", "properties": { - "id": { - "type": "string" + "createIncident": { + "type": "boolean" + }, + "createOutageDuration": { + "type": "boolean" + }, + "publishIncident": { + "type": "boolean" + }, + "notifySubscribers": { + "type": "boolean" } } - } - } - }, - "DeletedAudienceGroup": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "siteId": { - "type": "string" - }, - "name": { - "type": "string" }, - "site": { + "onRecover": { "type": "object", "properties": { - "id": { - "type": "string" + "resolveIncident": { + "type": "boolean" + }, + "resolveOutageDuration": { + "type": "boolean" + }, + "publishIncident": { + "type": "boolean" + }, + "notifySubscribers": { + "type": "boolean" } } - } - } - }, - "SecurePageLink": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "secureLink": { + "createdAt": { "type": "string", - "format": "uri" + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" } } }, - "Monitor": { + "httpMethod": { + "type": "string", + "enum": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"] + }, + "MonitorType": { + "type": "string", + "enum": ["HTTP", "PING", "TCP", "DNS", "HTTP_API"] + }, + "MonitorLocationValue": { + "type": "string", + "enum": ["US_EAST_1", "EU_CENTRAL_1", "AP_NORTHEAST_1"] + }, + "MonitorLocation": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MonitorLocationValue" + } + }, + "CreateMonitorRequest": { "type": "object", + "required": ["pageId", "url", "httpMethod"], "properties": { "pageId": { "type": "string", - "description": "The id of the status page of the monitor." + "description": "The id of the status page of the monitor to create the monitor on." }, "url": { "type": "string" @@ -6744,7 +7685,18 @@ "type": "string" }, "type": { - "type": "string" + "type": "string", + "enum": [ + "AVAILABLE", + "BODY", + "PING", + "TCP", + "DNS", + "STATUSCODE", + "JSONBODY", + "HEADERS", + "RESPONSETIME" + ] }, "comparison": { "$ref": "#/components/schemas/ComparisonType" @@ -6759,22 +7711,231 @@ } } }, - "alerts": { - "type": "array", - "description": "The ids of the alerts to send when the monitor triggers an alert.", - "items": { - "type": "string" - } + "alerts": { + "type": "array", + "description": "The ids of the alerts to send when the monitor triggers an alert.", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "locations": { + "$ref": "#/components/schemas/MonitorLocation" + }, + "checksInterval": { + "type": "integer", + "description": "The interval in seconds between each monitor check." + }, + "createComponent": { + "type": "boolean", + "description": "Whether to create a component that will follow the status of the monitor on the status page." + }, + "createMetric": { + "type": "boolean", + "description": "Whether to create a metric that will show the response time of the monitor on the status page." + }, + "onFail": { + "type": "object", + "properties": { + "createIncident": { + "type": "boolean" + }, + "createOutageDuration": { + "type": "boolean" + }, + "publishIncident": { + "type": "boolean" + }, + "notifySubscribers": { + "type": "boolean" + } + } + }, + "onRecover": { + "type": "object", + "properties": { + "resolveIncident": { + "type": "boolean" + }, + "resolveOutageDuration": { + "type": "boolean" + }, + "publishIncident": { + "type": "boolean" + }, + "notifySubscribers": { + "type": "boolean" + } + } + } + } + }, + "UpdateMonitorRequest": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "MonitorResponse": { + "type": "object", + "properties": { + "monitor": { + "$ref": "#/components/schemas/Monitor" + }, + "message": { + "type": "string" + } + } + }, + "MonitorStatus": { + "type": "string", + "enum": ["UP", "DOWN", "DEGRADED", "UNKNOWN"] + }, + "MonitorState": { + "type": "string", + "enum": ["ACTIVE", "PAUSED", "MUTED"] + }, + "CronMonitor": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string", + "description": "Unique slug used for ping URLs" + }, + "period": { + "type": "integer", + "description": "Expected interval between job runs, in seconds" + }, + "grace": { + "type": "integer", + "description": "Grace period before the monitor is marked down, in seconds" + }, + "status": { + "$ref": "#/components/schemas/MonitorStatus" + }, + "state": { + "$ref": "#/components/schemas/MonitorState" + }, + "siteId": { + "type": "string" + }, + "order": { + "type": "integer", + "nullable": true + }, + "groupId": { + "type": "string", + "nullable": true + }, + "componentId": { + "type": "string", + "nullable": true, + "description": "Id of the component this cron monitor was added as (see `createComponent` on create)." + }, + "onFailCreateIncident": { + "type": "boolean" + }, + "onFailCreateOutageDuration": { + "type": "boolean" + }, + "onFailPublishIncident": { + "type": "boolean" + }, + "onFailNotifySubscribers": { + "type": "boolean" + }, + "onRecoverResolveIncident": { + "type": "boolean" + }, + "onRecoverResolveOutageDuration": { + "type": "boolean" + }, + "onRecoverPublishIncident": { + "type": "boolean" + }, + "onRecoverNotifySubscribers": { + "type": "boolean" + }, + "createTemplateId": { + "type": "string", + "nullable": true + }, + "resolveTemplateId": { + "type": "string", + "nullable": true + }, + "alerts": { + "type": "array", + "nullable": true, + "description": "Monitor alerts linked to this cron monitor.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "recipient": { + "type": "string", + "nullable": true + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "CreateCronMonitorRequest": { + "type": "object", + "required": ["pageId", "name", "period", "grace"], + "properties": { + "pageId": { + "type": "string", + "description": "The id of the status page to create the cron monitor on" }, "name": { "type": "string" }, - "locations": { - "$ref": "#/components/schemas/MonitorLocation" + "period": { + "type": "integer", + "description": "Expected interval between job runs, in seconds" }, - "checksInterval": { + "grace": { "type": "integer", - "description": "The interval in seconds between each monitor check." + "description": "Grace period before the monitor is marked down, in seconds" + }, + "alerts": { + "type": "array", + "description": "The ids of alerts to notify when the cron monitor triggers", + "items": { + "type": "string" + } + }, + "createComponent": { + "type": "boolean", + "description": "Whether to create a component that will follow the status of the cron monitor on the status page." }, "onFail": { "type": "object", @@ -6809,136 +7970,30 @@ "type": "boolean" } } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" } } }, - "httpMethod": { - "type": "string", - "enum": ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"] - }, - "MonitorType": { - "type": "string", - "enum": ["HTTP", "PING", "TCP", "DNS", "HTTP_API"] - }, - "MonitorLocation": { - "type": "array", - "items": { - "type": "string", - "enum": ["US_EAST_1", "EU_CENTRAL_1", "AP_NORTHEAST_1"] - } - }, - "CreateMonitorRequest": { + "UpdateCronMonitorRequest": { "type": "object", - "required": ["pageId", "url", "httpMethod"], "properties": { - "pageId": { - "type": "string", - "description": "The id of the status page of the monitor to create the monitor on." - }, - "url": { + "name": { "type": "string" }, - "httpMethod": { - "$ref": "#/components/schemas/httpMethod" - }, - "body": { - "type": "string", - "nullable": true - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "queryParams": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "basicAuth": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - } - } + "period": { + "type": "integer" }, - "type": { - "$ref": "#/components/schemas/MonitorType" + "grace": { + "type": "integer" }, - "assertions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "AVAILABLE", - "BODY", - "PING", - "TCP", - "DNS", - "STATUSCODE", - "JSONBODY", - "HEADERS", - "RESPONSETIME" - ] - }, - "comparison": { - "$ref": "#/components/schemas/ComparisonType" - }, - "selector": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string" - } - } - } + "state": { + "$ref": "#/components/schemas/MonitorState" }, "alerts": { "type": "array", - "description": "The ids of the alerts to send when the monitor triggers an alert.", "items": { "type": "string" } }, - "name": { - "type": "string" - }, - "locations": { - "$ref": "#/components/schemas/MonitorLocation" - }, - "checksInterval": { - "type": "integer", - "description": "The interval in seconds between each monitor check." - }, - "createComponent": { - "type": "boolean", - "description": "Whether to create a component that will follow the status of the monitor on the status page." - }, - "createMetric": { - "type": "boolean", - "description": "Whether to create a metric that will show the response time of the monitor on the status page." - }, "onFail": { "type": "object", "properties": { @@ -6975,25 +8030,152 @@ } } }, - "UpdateMonitorRequest": { + "CronMonitorResponse": { "type": "object", "properties": { - "url": { - "type": "string" + "cronMonitor": { + "$ref": "#/components/schemas/CronMonitor" }, - "name": { + "message": { "type": "string" } } }, - "MonitorResponse": { + "CronMonitorListResponse": { "type": "object", "properties": { - "monitor": { - "$ref": "#/components/schemas/Monitor" + "cronMonitors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CronMonitor" + } }, - "message": { + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "limit": { + "type": "integer" + } + } + }, + "CronMonitorLog": { + "type": "object", + "properties": { + "id": { "type": "string" + }, + "monitorId": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["SUCCESS", "FAILURE", "MISSED", "LATE", "STARTED"] + }, + "requestType": { + "type": "string", + "enum": ["GET", "POST", "HEAD"] + }, + "agent": { + "type": "string", + "nullable": true + }, + "ipAddress": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "startedAt": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "CronMonitorLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CronMonitorLog" + } + }, + "page": { + "type": "integer" + } + } + }, + "CronMonitorSummary": { + "type": "object", + "properties": { + "totalLogs": { + "type": "integer" + }, + "totalFailedLogs": { + "type": "integer" + }, + "availability": { + "type": "number" + }, + "oneDayAvailability": { + "type": "number" + }, + "previousDayAvailability": { + "type": "number" + }, + "sevenDayAvailability": { + "type": "number" + }, + "previousSevenDayAvailability": { + "type": "number" + }, + "thirtyDayAvailability": { + "type": "number" + }, + "previousThirtyDayAvailability": { + "type": "number" + }, + "lastSuccess": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastFailure": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastStarted": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "upSince": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "downSince": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "CronMonitorSummaryResponse": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/components/schemas/CronMonitorSummary" } } }, @@ -8316,4 +9498,4 @@ } } } -} +} \ No newline at end of file diff --git a/instatus.yaml b/instatus.yaml index e45e91e..a43bdf8 100644 --- a/instatus.yaml +++ b/instatus.yaml @@ -466,7 +466,6 @@ paths: properties: id: type: string - /v1/{page_id}/incidents/{template}: post: summary: Add an incident with a template description: Create a new incident using a template @@ -480,11 +479,11 @@ paths: type: string description: The ID of the status page - in: path - name: template + name: incident_id required: true schema: type: string - description: The ID or name of the template to use + description: The ID of the template to use responses: "200": description: Successful response @@ -651,7 +650,7 @@ paths: required: true schema: type: string - description: The ID or name of the template to use + description: The ID of the template to use responses: "200": description: Successful response @@ -1179,6 +1178,98 @@ paths: properties: memberId: type: string + /v2/{page_id}/team-group: + get: + summary: Get team group members + description: | + Retrieve a list of team members for a specific status page, including team group assignments. + The default page number is 1. + The default per_page number is 50 and the maximum is 100 items per page. + tags: + - Teammates + parameters: + - in: path + name: page_id + required: true + schema: + type: string + description: The ID of the status page + - in: query + name: page + schema: + type: integer + default: 1 + description: Page number for pagination + - in: query + name: per_page + schema: + type: integer + default: 50 + maximum: 100 + description: Number of items per page + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TeamGroupMember" + post: + summary: Add a team group member + description: Add a new team member to a specific status page + tags: + - Teammates + parameters: + - in: path + name: page_id + required: true + schema: + type: string + description: The ID of the status page + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/AddTeammateRequestV2" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/TeamGroupMemberDetail" + /v2/{page_id}/team-group/{member_id}: + delete: + summary: Delete a team group member + description: Remove a team member from a specific status page + tags: + - Teammates + parameters: + - in: path + name: page_id + required: true + schema: + type: string + description: The ID of the status page + - in: path + name: member_id + required: true + schema: + type: string + description: The ID of the team member + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: object + properties: + memberId: + type: string /v1/{page_id}/subscribers: get: summary: Get subscribers @@ -2009,6 +2100,396 @@ paths: properties: message: type: string + /{page_id}/monitors/cron: + get: + summary: Get Cron Monitors + description: Retrieve a list of cron monitors for a specific status page + tags: + - Monitors + parameters: + - in: path + name: page_id + required: true + schema: + type: string + - in: query + name: limit + description: The number of cron monitors per page + schema: + type: integer + default: 100 + - in: query + name: page + description: The page number + schema: + type: integer + default: 1 + - in: query + name: search + description: Search term for filtering results by name + schema: + type: string + - in: query + name: status + schema: + type: string + enum: + - UP + - DOWN + - UNKNOWN + - DEGRADED + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorListResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /monitors/cron: + post: + summary: Create a Cron Monitor + tags: + - Monitors + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateCronMonitorRequest" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "404": + description: Status page not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /monitors/cron/{id}: + put: + summary: Update a Cron Monitor + tags: + - Monitors + parameters: + - in: path + name: id + required: true + description: The ID of the cron monitor + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateCronMonitorRequest" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + delete: + summary: Delete a Cron Monitor + tags: + - Monitors + parameters: + - in: path + name: id + required: true + description: The ID of the cron monitor + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + get: + summary: Ping Cron Monitor Success + description: >- + Record a successful cron job run. Pass the monitor's ping slug as the + path value. No authentication required — the slug acts as the secret. + Also available at https://cron.instatus.com/{slug} + tags: + - Monitors + security: [] + parameters: + - in: path + name: id + required: true + description: The ping slug of the cron monitor + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorLog" + "404": + description: Monitor not found + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorPingNotFound" + post: + summary: Ping Cron Monitor Success + tags: + - Monitors + security: [] + parameters: + - in: path + name: id + required: true + description: The ping slug of the cron monitor + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorLog" + head: + summary: Ping Cron Monitor Success + tags: + - Monitors + security: [] + parameters: + - in: path + name: id + required: true + description: The ping slug of the cron monitor + schema: + type: string + responses: + "200": + description: Successful response + /monitors/cron/{id}/logs: + get: + summary: Get Cron Monitor Logs + tags: + - Monitors + parameters: + - in: path + name: id + required: true + schema: + type: string + - in: query + name: limit + description: The number of logs per page + schema: + type: integer + default: 100 + maximum: 127 + - in: query + name: page + description: The page number + schema: + type: integer + default: 1 + maximum: 1000 + - in: query + name: startDate + description: ISO 8601 start date for the log range + schema: + type: string + format: date-time + - in: query + name: endDate + description: ISO 8601 end date for the log range + schema: + type: string + format: date-time + - in: query + name: importance + schema: + type: string + enum: + - all + - important + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorLogsResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + "404": + description: Cron monitor not found + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /monitors/cron/{id}/summary: + get: + summary: Get Cron Monitor Summary + tags: + - Monitors + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorSummaryResponse" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /monitors/cron/{slug}/fail: + get: + summary: Ping Cron Monitor Failure + description: Record an explicit cron job failure + tags: + - Monitors + security: [] + parameters: + - in: path + name: slug + required: true + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorLog" + post: + summary: Ping Cron Monitor Failure + tags: + - Monitors + security: [] + parameters: + - in: path + name: slug + required: true + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorLog" + head: + summary: Ping Cron Monitor Failure + tags: + - Monitors + security: [] + parameters: + - in: path + name: slug + required: true + schema: + type: string + responses: + "200": + description: Successful response + /monitors/cron/{slug}/start: + get: + summary: Ping Cron Monitor Start + description: Record when a cron job starts running (for execution time tracking) + tags: + - Monitors + security: [] + parameters: + - in: path + name: slug + required: true + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorLog" + post: + summary: Ping Cron Monitor Start + tags: + - Monitors + security: [] + parameters: + - in: path + name: slug + required: true + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "#/components/schemas/CronMonitorLog" + head: + summary: Ping Cron Monitor Start + tags: + - Monitors + security: [] + parameters: + - in: path + name: slug + required: true + schema: + type: string + responses: + "200": + description: Successful response /monitor-alerts: post: summary: Create Monitor Alert @@ -2037,7 +2518,7 @@ paths: name: id required: true schema: - $ref: "#/components/schemas/MonitorAlertType" + type: string requestBody: required: true content: @@ -2221,8 +2702,7 @@ paths: - in: query name: location schema: - type: string - $ref: "#/components/schemas/MonitorLocation" + $ref: "#/components/schemas/MonitorLocationValue" - in: query name: retry schema: @@ -2477,7 +2957,7 @@ paths: /v1/workspaces: get: summary: Get your workspaces - description: > + description: |- Retrieve a list of your workspaces. The default page number is 1. @@ -2647,6 +3127,16 @@ components: type: string message: type: string + CronMonitorPingNotFound: + type: object + properties: + message: + type: string + CronMonitorPingError: + type: object + properties: + message: + type: string Translations: type: object description: >- @@ -4309,6 +4799,53 @@ components: type: string description: The id of the team you want to include the teammate in. nullable: true + AddTeammateRequestV2: + type: object + required: + - email + - permission + properties: + email: + type: string + description: The email of the teammate you wish to add. + permission: + $ref: "#/components/schemas/TeammatePermission" + audienceGroups: + type: array + description: The ids of the audience groups you wish to add the teammate to. + items: + type: string + nullable: true + teamGroup: + type: string + description: The id of the team group you want to include the teammate in. + nullable: true + TeamGroup: + type: object + nullable: true + properties: + id: + type: string + name: + type: string + TeamGroupMember: + type: object + properties: + id: + type: string + user: + $ref: "#/components/schemas/User" + teamGroup: + $ref: "#/components/schemas/TeamGroup" + TeamGroupMemberDetail: + type: object + properties: + id: + type: string + email: + type: string + teamGroup: + $ref: "#/components/schemas/TeamGroup" TeammateDetail: type: object properties: @@ -5010,14 +5547,16 @@ components: - TCP - DNS - HTTP_API + MonitorLocationValue: + type: string + enum: + - US_EAST_1 + - EU_CENTRAL_1 + - AP_NORTHEAST_1 MonitorLocation: type: array items: - type: string - enum: - - US_EAST_1 - - EU_CENTRAL_1 - - AP_NORTHEAST_1 + $ref: "#/components/schemas/MonitorLocationValue" CreateMonitorRequest: type: object required: @@ -5136,6 +5675,294 @@ components: $ref: "#/components/schemas/Monitor" message: type: string + MonitorStatus: + type: string + enum: + - UP + - DOWN + - DEGRADED + - UNKNOWN + MonitorState: + type: string + enum: + - ACTIVE + - PAUSED + - MUTED + CronMonitor: + type: object + properties: + id: + type: string + name: + type: string + slug: + type: string + description: Unique slug used for ping URLs + period: + type: integer + description: Expected interval between job runs, in seconds + grace: + type: integer + description: Grace period before the monitor is marked down, in seconds + status: + $ref: "#/components/schemas/MonitorStatus" + state: + $ref: "#/components/schemas/MonitorState" + siteId: + type: string + order: + type: integer + nullable: true + groupId: + type: string + nullable: true + componentId: + type: string + nullable: true + description: >- + Id of the component this cron monitor was added as (see + `createComponent` on create). + onFailCreateIncident: + type: boolean + onFailCreateOutageDuration: + type: boolean + onFailPublishIncident: + type: boolean + onFailNotifySubscribers: + type: boolean + onRecoverResolveIncident: + type: boolean + onRecoverResolveOutageDuration: + type: boolean + onRecoverPublishIncident: + type: boolean + onRecoverNotifySubscribers: + type: boolean + createTemplateId: + type: string + nullable: true + resolveTemplateId: + type: string + nullable: true + alerts: + type: array + nullable: true + description: Monitor alerts linked to this cron monitor. + items: + type: object + properties: + id: + type: string + type: + type: string + recipient: + type: string + nullable: true + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time + CreateCronMonitorRequest: + type: object + required: + - pageId + - name + - period + - grace + properties: + pageId: + type: string + description: The id of the status page to create the cron monitor on + name: + type: string + period: + type: integer + description: Expected interval between job runs, in seconds + grace: + type: integer + description: Grace period before the monitor is marked down, in seconds + alerts: + type: array + description: The ids of alerts to notify when the cron monitor triggers + items: + type: string + createComponent: + type: boolean + description: >- + Whether to create a component that will follow the status of the + cron monitor on the status page. + onFail: + type: object + properties: + createIncident: + type: boolean + createOutageDuration: + type: boolean + publishIncident: + type: boolean + notifySubscribers: + type: boolean + onRecover: + type: object + properties: + resolveIncident: + type: boolean + resolveOutageDuration: + type: boolean + publishIncident: + type: boolean + notifySubscribers: + type: boolean + UpdateCronMonitorRequest: + type: object + properties: + name: + type: string + period: + type: integer + grace: + type: integer + state: + $ref: "#/components/schemas/MonitorState" + alerts: + type: array + items: + type: string + onFail: + type: object + properties: + createIncident: + type: boolean + createOutageDuration: + type: boolean + publishIncident: + type: boolean + notifySubscribers: + type: boolean + onRecover: + type: object + properties: + resolveIncident: + type: boolean + resolveOutageDuration: + type: boolean + publishIncident: + type: boolean + notifySubscribers: + type: boolean + CronMonitorResponse: + type: object + properties: + cronMonitor: + $ref: "#/components/schemas/CronMonitor" + message: + type: string + CronMonitorListResponse: + type: object + properties: + cronMonitors: + type: array + items: + $ref: "#/components/schemas/CronMonitor" + total: + type: integer + page: + type: integer + totalPages: + type: integer + limit: + type: integer + CronMonitorLog: + type: object + properties: + id: + type: string + monitorId: + type: string + status: + type: string + enum: + - SUCCESS + - FAILURE + - MISSED + - LATE + - STARTED + requestType: + type: string + enum: + - GET + - POST + - HEAD + agent: + type: string + nullable: true + ipAddress: + type: string + nullable: true + createdAt: + type: string + format: date-time + startedAt: + type: string + format: date-time + nullable: true + CronMonitorLogsResponse: + type: object + properties: + logs: + type: array + items: + $ref: "#/components/schemas/CronMonitorLog" + page: + type: integer + CronMonitorSummary: + type: object + properties: + totalLogs: + type: integer + totalFailedLogs: + type: integer + availability: + type: number + oneDayAvailability: + type: number + previousDayAvailability: + type: number + sevenDayAvailability: + type: number + previousSevenDayAvailability: + type: number + thirtyDayAvailability: + type: number + previousThirtyDayAvailability: + type: number + lastSuccess: + type: string + format: date-time + nullable: true + lastFailure: + type: string + format: date-time + nullable: true + lastStarted: + type: string + format: date-time + nullable: true + upSince: + type: string + format: date-time + nullable: true + downSince: + type: string + format: date-time + nullable: true + CronMonitorSummaryResponse: + type: object + properties: + summary: + $ref: "#/components/schemas/CronMonitorSummary" MonitorLog: type: object properties: @@ -6282,4 +7109,4 @@ components: longRunningIncidentNotificationSettings: type: array items: - type: number + type: number \ No newline at end of file