API reference

Health

The tree health score of a workspace, its pillars and suggested quick wins.

Paths are relative to https://kleiobase.com/api/v1.

get/workspaces/{workspace_id}/health

Get the tree health score

A recently computed score is reused; an older one is recomputed now, as on the app's dashboard. All fields are null (and quick_wins empty) while the workspace has no people, or when the score could not be computed this time.

NameInRequiredDescription
workspace_idpathyesThe workspace (project) id.

Responses

  • 200 The score. (Health)
  • 401 Missing, malformed, unknown or revoked API key. (ErrorResponse)
  • 403 The account has no paid plan. (ErrorResponse)
  • 404 The workspace does not exist or is not visible to this key's owner. (ErrorResponse)
  • 429 Rate limit exceeded. Wait the number of seconds in Retry-After. (ErrorResponse)
  • 500 Unexpected error. Retry later and quote request_id if it persists. (ErrorResponse)
200 response schema
{
  "type": "object",
  "properties": {
    "overall": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "0 to 100. Null when the workspace has no people yet."
    },
    "band": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Fair",
            "Good",
            "Very Good",
            "Excellent"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "pillars": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completeness": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "consistency": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "connectedness": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "completeness",
            "consistency",
            "connectedness"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "percentile": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "Share of KleioBase trees scoring lower. Null until enough trees have a score."
    },
    "quick_wins": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "The finding id."
                },
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title"
              ]
            }
          }
        },
        "required": [
          "id",
          "title",
          "items"
        ]
      },
      "description": "Suggested next steps, biggest expected improvement first. Each item is an active finding."
    },
    "computed_at": {
      "description": "When the score was last computed.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "overall",
    "band",
    "pillars",
    "percentile",
    "quick_wins",
    "computed_at"
  ]
}
post/workspaces/{workspace_id}/health/refresh

Recompute the tree health score

Recomputes and stores the score now. Same response as GET .../health. Replays of an Idempotency-Key return the original body and request_id; headers are not replayed.

NameInRequiredDescription
workspace_idpathyesThe workspace (project) id.
Idempotency-KeyheadernoMakes the write safe to retry (1-255 characters, kept 24 hours). Same key and same request replays the original response; a different request with the same key is a 409.
Request body (application/json)
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Responses

  • 200 The score. (Health)
  • 401 Missing, malformed, unknown or revoked API key. (ErrorResponse)
  • 403 The account has no paid plan, or the key is read-only (a read_write key is required). (ErrorResponse)
  • 404 The workspace does not exist or is not visible to this key's owner. (ErrorResponse)
  • 409 The workspace is archived (writes are refused). Also: Idempotency-Key was reused with a different request, or a request with it is still in progress. (ErrorResponse)
  • 422 Validation failed. A bad Idempotency-Key (1-255 characters) is also a 422. (ErrorResponse)
  • 429 Rate limit exceeded. Wait the number of seconds in Retry-After. (ErrorResponse)
  • 500 Unexpected error. Retry later and quote request_id if it persists. (ErrorResponse)
200 response schema
{
  "type": "object",
  "properties": {
    "overall": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "0 to 100. Null when the workspace has no people yet."
    },
    "band": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Fair",
            "Good",
            "Very Good",
            "Excellent"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "pillars": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completeness": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "consistency": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "connectedness": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "completeness",
            "consistency",
            "connectedness"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "percentile": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "Share of KleioBase trees scoring lower. Null until enough trees have a score."
    },
    "quick_wins": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "The finding id."
                },
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title"
              ]
            }
          }
        },
        "required": [
          "id",
          "title",
          "items"
        ]
      },
      "description": "Suggested next steps, biggest expected improvement first. Each item is an active finding."
    },
    "computed_at": {
      "description": "When the score was last computed.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "overall",
    "band",
    "pillars",
    "percentile",
    "quick_wins",
    "computed_at"
  ]
}

We use cookies and similar technologies. Essential cookies keep the site working and secure. We only load analytics (PostHog, including masked session replays) and marketing (Meta Pixel and TikTok Pixel) with your consent. See our Privacy Policy.