Skip to content

os-management ​

← All modules

3 endpoints.

GET /api/v1/os-management ​

Overview

Performance, storage, security, services and database for the box that answered this request. Sections are probed concurrently and fail independently.

The session and site are passed through for the database section alone — it reports the database THIS site reads, so it is the one probe that is not a pure property of the machine.

Parameters

NameInRequiredTypeDescription
serverqueryno

200 — Successful Response

json
{
  "type": "object",
  "additionalProperties": true,
  "title": "Response Overview Api V1 Os Management Get"
}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/os-management/cluster ​

Cluster

Hub Map's Cluster Performance: every Platform Servers box at once, with improvement ideas — see :func:app.apps.instances.services.os_management.cluster_performance.

Parameters

NameInRequiredTypeDescription
refreshquerynoboolean

200 — Successful Response

json
{
  "type": "object",
  "additionalProperties": true,
  "title": "Response Cluster Api V1 Os Management Cluster Get"
}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

POST /api/v1/os-management/unban ​

Unban

Release one address, one jail, or every ban on the box.

The reply carries fail2ban's own output. A ValueError from the service is a malformed jail/IP — a 400, not a 500: those values are validated there precisely because this endpoint is the one place a browser reaches them.

Request body

json
{
  "properties": {
    "ip": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ip"
    },
    "jail": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Jail"
    },
    "all": {
      "type": "boolean",
      "title": "All",
      "default": false
    },
    "server": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Server"
    }
  },
  "type": "object",
  "title": "UnbanRequest",
  "description": "One of the three shapes the service accepts — see\n:func:`app.apps.instances.services.os_management.unban`. ``all`` is spelled out rather than\ninferred from an empty body: an unban of every jail must be something the\ncaller asked for by name, never something a dropped field caused."
}

200 — Successful Response

json
{
  "additionalProperties": true,
  "type": "object",
  "title": "Response Unban Api V1 Os Management Unban Post"
}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

Lubb Business Documentation