From 18444490afa15f1a162f593a35e8e091773a5342 Mon Sep 17 00:00:00 2001 From: Instatus <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 25 Jul 2026 00:47:30 +0000 Subject: [PATCH] Update OpenAPI spec --- instatus.json | 2071 ++++++++++++++++++++++++++++++++++++++----------- instatus.yaml | 840 +++++++++++++++++++- 2 files changed, 2456 insertions(+), 455 deletions(-) diff --git a/instatus.json b/instatus.json index 2383489..5c08684 100644 --- a/instatus.json +++ b/instatus.json @@ -1732,6 +1732,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", @@ -2948,16 +3082,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 +3175,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,9 +3203,9 @@ } } }, - "/monitor-alerts/{id}": { + "/monitors/cron/{id}": { "put": { - "summary": "Update Monitor Alert", + "summary": "Update a Cron Monitor", "tags": ["Monitors"], "parameters": [ { @@ -2986,7 +3213,7 @@ "name": "id", "required": true, "schema": { - "$ref": "#/components/schemas/MonitorAlertType" + "type": "string" } } ], @@ -2995,7 +3222,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateMonitorAlertRequest" + "$ref": "#/components/schemas/UpdateCronMonitorRequest" } } } @@ -3006,7 +3233,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,7 +3251,7 @@ } }, "delete": { - "summary": "Delete Monitor Alert", + "summary": "Delete a Cron Monitor", "tags": ["Monitors"], "parameters": [ { @@ -3032,12 +3269,17 @@ "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" } } } @@ -3045,14 +3287,14 @@ } } }, - "/{page_id}/monitor-alerts": { + "/monitors/cron/{id}/logs": { "get": { - "summary": "Get Monitor Alerts", + "summary": "Get Cron Monitor Logs", "tags": ["Monitors"], "parameters": [ { "in": "path", - "name": "page_id", + "name": "id", "required": true, "schema": { "type": "string" @@ -3061,75 +3303,77 @@ { "in": "query", "name": "limit", + "description": "The number of logs per page", "schema": { "type": "integer", - "default": 100 + "default": 100, + "maximum": 127 } }, { "in": "query", "name": "page", + "description": "The page number", "schema": { "type": "integer", - "default": 1 + "default": 1, + "maximum": 1000 } - } - ], - "responses": { - "200": { - "description": "Successful response", - "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" - } - } - } - } + }, + { + "in": "query", + "name": "startDate", + "description": "ISO 8601 start date for the log range", + "schema": { + "type": "string", + "format": "date-time" } - } - } - } - }, - "/monitors-groups": { - "post": { - "summary": "Create Monitor Group", - "tags": ["Monitors"], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateMonitorGroupRequest" - } + }, + { + "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/MonitorGroupResponse" + "$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" } } } @@ -3137,9 +3381,9 @@ } } }, - "/monitors-groups/{id}": { - "put": { - "summary": "Update Monitor Group", + "/monitors/cron/{id}/summary": { + "get": { + "summary": "Get Cron Monitor Summary", "tags": ["Monitors"], "parameters": [ { @@ -3151,36 +3395,40 @@ } } ], - "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/CronMonitorSummaryResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } - }, - "delete": { - "summary": "Delete Monitor Group", + } + }, + "/monitors/cron/{slug}": { + "get": { + "summary": "Ping Cron Monitor Success", + "description": "Record a successful cron job run. 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", + "name": "slug", "required": true, "schema": { "type": "string" @@ -3193,137 +3441,81 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } + "$ref": "#/components/schemas/CronMonitorLog" + } + } + } + }, + "404": { + "description": "Monitor not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CronMonitorPingNotFound" } } } } } - } - }, - "/monitors-groups/{id}/monitors": { + }, "post": { - "summary": "Add Monitors to Group", + "summary": "Ping Cron Monitor Success", "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "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" - } - } + "$ref": "#/components/schemas/CronMonitorLog" } } } } } - } - }, - "/monitors-groups/{id}/run": { - "get": { - "summary": "Run Monitor Group Check", + }, + "head": { + "summary": "Ping Cron Monitor Success", "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "location", - "schema": { - "type": "string", - "$ref": "#/components/schemas/MonitorLocation" - } - }, - { - "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" - } - } - } - } - } + "description": "Successful response" } } } }, - "/{page_id}/routing-rules": { + "/monitors/cron/{slug}/fail": { "get": { - "summary": "Get Routing Rules", - "tags": ["Routing Rules"], + "summary": "Ping Cron Monitor Failure", + "description": "Record an explicit cron job failure", + "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "page_id", + "name": "slug", "required": true, "schema": { "type": "string" @@ -3336,87 +3528,71 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoutingRulesResponse" + "$ref": "#/components/schemas/CronMonitorLog" } } } } } - } - }, - "/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" - } + "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/RoutingRuleResponse" + "$ref": "#/components/schemas/CronMonitorLog" } } } } } - } - }, - "/routing-rules/{id}": { - "put": { - "summary": "Update Routing Rule", - "tags": ["Routing Rules"], + }, + "head": { + "summary": "Ping Cron Monitor 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" - } - } - } + "description": "Successful response" } } - }, - "delete": { - "summary": "Delete Routing Rule", - "tags": ["Routing Rules"], + } + }, + "/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": "id", + "name": "slug", "required": true, "schema": { "type": "string" @@ -3429,22 +3605,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"], + }, + "post": { + "summary": "Ping Cron Monitor Start", + "tags": ["Monitors"], + "security": [], "parameters": [ { "in": "path", - "name": "page_id", + "name": "slug", "required": true, "schema": { "type": "string" @@ -3457,24 +3632,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EscalationPoliciesResponse" + "$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" + } + } } }, - "/escalation-policies": { + "/monitor-alerts": { "post": { - "summary": "Create Escalation Policy", - "tags": ["Escalation Policies"], + "summary": "Create Monitor Alert", + "tags": ["Monitors"], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEscalationPolicyRequest" + "$ref": "#/components/schemas/CreateMonitorAlertRequest" } } } @@ -3485,7 +3680,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EscalationPolicyResponse" + "$ref": "#/components/schemas/MonitorAlertResponse" } } } @@ -3493,17 +3688,17 @@ } } }, - "/escalation-policies/{id}": { + "/monitor-alerts/{id}": { "put": { - "summary": "Update Escalation Policy", - "tags": ["Escalation Policies"], + "summary": "Update Monitor Alert", + "tags": ["Monitors"], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/MonitorAlertType" } } ], @@ -3512,7 +3707,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateEscalationPolicyRequest" + "$ref": "#/components/schemas/UpdateMonitorAlertRequest" } } } @@ -3523,7 +3718,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EscalationPolicyResponse" + "$ref": "#/components/schemas/MonitorAlertResponse" } } } @@ -3531,8 +3726,8 @@ } }, "delete": { - "summary": "Delete Escalation Policy", - "tags": ["Escalation Policies"], + "summary": "Delete Monitor Alert", + "tags": ["Monitors"], "parameters": [ { "in": "path", @@ -3549,7 +3744,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteEscalationPolicyResponse" + "type": "object", + "properties": { + "message": { + "type": "string" + } + } } } } @@ -3557,16 +3757,80 @@ } } }, - "/on-call-schedules": { + "/{page_id}/monitor-alerts": { + "get": { + "summary": "Get Monitor Alerts", + "tags": ["Monitors"], + "parameters": [ + { + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "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" + } + } + } + } + } + } + } + } + }, + "/monitors-groups": { "post": { - "summary": "Create On-call Schedule", - "tags": ["On Call Schedules"], + "summary": "Create Monitor Group", + "tags": ["Monitors"], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOnCallScheduleRequest" + "$ref": "#/components/schemas/CreateMonitorGroupRequest" } } } @@ -3577,7 +3841,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnCallScheduleResponse" + "$ref": "#/components/schemas/MonitorGroupResponse" } } } @@ -3585,10 +3849,10 @@ } } }, - "/on-call-schedules/{id}": { + "/monitors-groups/{id}": { "put": { - "summary": "Update On-call Schedule", - "tags": ["On Call Schedules"], + "summary": "Update Monitor Group", + "tags": ["Monitors"], "parameters": [ { "in": "path", @@ -3604,7 +3868,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateOnCallScheduleRequest" + "$ref": "#/components/schemas/UpdateMonitorGroupRequest" } } } @@ -3615,7 +3879,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnCallScheduleResponse" + "$ref": "#/components/schemas/MonitorGroupResponse" } } } @@ -3623,8 +3887,8 @@ } }, "delete": { - "summary": "Delete On-call Schedule", - "tags": ["On Call Schedules"], + "summary": "Delete Monitor Group", + "tags": ["Monitors"], "parameters": [ { "in": "path", @@ -3636,16 +3900,28 @@ } ], "responses": { - "204": { - "description": "No Content" + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + } } } } }, - "/on-call-schedules/{id}/members": { - "get": { - "summary": "Get On-call Schedule Members", - "tags": ["On Call Schedules"], + "/monitors-groups/{id}/monitors": { + "post": { + "summary": "Add Monitors to Group", + "tags": ["Monitors"], "parameters": [ { "in": "path", @@ -3656,13 +3932,36 @@ } } ], + "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": { - "$ref": "#/components/schemas/GetOnCallScheduleMembersResponse" + "type": "object", + "properties": { + "message": { + "type": "string" + } + } } } } @@ -3670,30 +3969,41 @@ } } }, - "/v1/workspaces": { + "/monitors-groups/{id}/run": { "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": "Run Monitor Group Check", + "tags": ["Monitors"], "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, { "in": "query", - "name": "page", + "name": "location", "schema": { - "type": "integer", - "default": 1 - }, - "description": "Page number for pagination" + "type": "string", + "$ref": "#/components/schemas/MonitorLocation" + } }, { "in": "query", - "name": "per_page", + "name": "retry", "schema": { - "type": "integer", - "default": 50, - "maximum": 100 - }, - "description": "Number of items per page" + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "monitorLogId", + "schema": { + "type": "string" + } } ], "responses": { @@ -3702,24 +4012,426 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Workspace" + "type": "object", + "properties": { + "result": { + "type": "string" + }, + "monitorLogId": { + "type": "string" + } } } } } } } - }, - "post": { - "summary": "Create a workspace", - "description": "Create a new workspace", - "tags": ["Workspaces"], - "requestBody": { - "required": true, - "content": { - "application/json": { + } + }, + "/{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" } @@ -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,200 @@ "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"] + }, + "MonitorLocation": { + "type": "array", + "items": { + "type": "string", + "enum": ["US_EAST_1", "EU_CENTRAL_1", "AP_NORTHEAST_1"] + } + }, + "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 +7682,18 @@ "type": "string" }, "type": { - "type": "string" + "type": "string", + "enum": [ + "AVAILABLE", + "BODY", + "PING", + "TCP", + "DNS", + "STATUSCODE", + "JSONBODY", + "HEADERS", + "RESPONSETIME" + ] }, "comparison": { "$ref": "#/components/schemas/ComparisonType" @@ -6769,12 +7718,221 @@ "name": { "type": "string" }, - "locations": { - "$ref": "#/components/schemas/MonitorLocation" + "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" + }, + "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 +7967,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 +8027,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 +9495,4 @@ } } } -} +} \ No newline at end of file diff --git a/instatus.yaml b/instatus.yaml index e45e91e..eedf80c 100644 --- a/instatus.yaml +++ b/instatus.yaml @@ -1179,6 +1179,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 @@ -1995,20 +2087,405 @@ paths: - Monitors parameters: - in: path - name: id + name: id + required: true + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + type: object + 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 + 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 + 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" + /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}: + get: + summary: Ping Cron Monitor Success + description: >- + Record a successful cron job run. No authentication required — the slug + acts as the secret. Also available at https://cron.instatus.com/{slug} + 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" + "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: slug + required: true + 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: slug + required: true + schema: + type: string + responses: + "200": + description: Successful response + /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 - content: - application/json: - schema: - type: object - properties: - message: - type: string /monitor-alerts: post: summary: Create Monitor Alert @@ -2647,6 +3124,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 +4796,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: @@ -5136,6 +5670,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 +7104,4 @@ components: longRunningIncidentNotificationSettings: type: array items: - type: number + type: number \ No newline at end of file