{
  "info": {
    "name": "Servor Public API",
    "description": "Token-authenticated Servor API. Set the `apiToken` variable to your sv_live_ token.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiToken}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.servor.app/v1"
    },
    {
      "key": "apiToken",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "me",
      "item": [
        {
          "name": "Identify the calling token",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/me",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "me"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "servers",
      "item": [
        {
          "name": "List servers",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/servers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "servers"
              ]
            },
            "description": "Requires scope: servers:read"
          }
        },
        {
          "name": "Get a server",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/servers/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "servers",
                ":id"
              ]
            },
            "description": "Requires scope: servers:read"
          }
        }
      ]
    },
    {
      "name": "commands",
      "item": [
        {
          "name": "List command history for a server",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/servers/:id/commands?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "servers",
                ":id",
                "commands"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": "1-based page number (default 1).",
                  "disabled": true
                },
                {
                  "key": "pageSize",
                  "value": "",
                  "description": "Items per page, max 100 (default 20).",
                  "disabled": true
                }
              ]
            },
            "description": "Requires scope: commands:read"
          }
        }
      ]
    },
    {
      "name": "monitors",
      "item": [
        {
          "name": "List monitors",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/monitors",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "monitors"
              ]
            },
            "description": "Requires scope: monitors:read"
          }
        },
        {
          "name": "List check results",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/monitors/:id/checks?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "monitors",
                ":id",
                "checks"
              ],
              "query": [
                {
                  "key": "since",
                  "value": "",
                  "description": "ISO date; defaults to the last 24 hours.",
                  "disabled": true
                }
              ]
            },
            "description": "Requires scope: monitors:read"
          }
        }
      ]
    },
    {
      "name": "incidents",
      "item": [
        {
          "name": "List incidents",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/incidents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "incidents"
              ]
            },
            "description": "Requires scope: incidents:read"
          }
        },
        {
          "name": "Create an incident",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/incidents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "incidents"
              ]
            },
            "description": "Requires scope: incidents:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"<string>\",\n  \"status\": \"<investigating | identified | monitoring | resolved>\",\n  \"impact\": \"<none | minor | major | critical>\",\n  \"message\": \"<string>\",\n  \"statusPageId\": \"<uuid>\",\n  \"componentIds\": \"<uuid[]>\"\n}"
            }
          }
        },
        {
          "name": "Get an incident with its timeline",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/incidents/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "incidents",
                ":id"
              ]
            },
            "description": "Requires scope: incidents:read"
          }
        },
        {
          "name": "Post an update (resolve with status=resolved)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/incidents/:id/updates",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "incidents",
                ":id",
                "updates"
              ]
            },
            "description": "Requires scope: incidents:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"status\": \"<investigating | identified | monitoring | resolved>\",\n  \"message\": \"<string>\",\n  \"notifySubscribers\": \"<boolean>\"\n}"
            }
          }
        }
      ]
    },
    {
      "name": "status-pages",
      "item": [
        {
          "name": "List status pages",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/status-pages",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "status-pages"
              ]
            },
            "description": "Requires scope: status-pages:read"
          }
        },
        {
          "name": "Get a status page with its components",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/status-pages/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "status-pages",
                ":id"
              ]
            },
            "description": "Requires scope: status-pages:read"
          }
        },
        {
          "name": "List incidents shown on a status page",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/status-pages/:id/incidents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "status-pages",
                ":id",
                "incidents"
              ]
            },
            "description": "Requires scope: status-pages:read"
          }
        }
      ]
    },
    {
      "name": "audit",
      "item": [
        {
          "name": "List audit entries",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{apiToken}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/audit?",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "audit"
              ],
              "query": [
                {
                  "key": "action",
                  "value": "",
                  "description": "Filter by action-type prefix, e.g. \"incident.\".",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "Max entries, 1–200 (default 100).",
                  "disabled": true
                }
              ]
            },
            "description": "Requires scope: audit:read"
          }
        }
      ]
    }
  ]
}