Topolo Docs Topolo Platform
Open workspace

Get availability — Calendar

Read the current host’s complete weekly rules and date overrides.

Read the current host’s complete weekly rules and date overrides.

Action: app_topolo_calendar.availability.get · GET /api/admin/availability

Declared permission: app_topolo_calendar.availability:read. For authorized Calendar users; permissions and resource access still apply.

Before you start

  • Use the current credential to confirm the production organization and inspect this exact action before preparing a call.
  • Declared permission: app_topolo_calendar.availability:read. Permission discovery is not a grant.
  • Discover the authorized Calendar workspace and pass it as resourceType=workspace/resourceId separately from this action input. Calendar records and IDs are scoped to the selected host/workspace.

Inputs and field meanings

No action input fields. Supply the empty JSON object {}; keep resource context separate.

Worked request and response

Source-reviewed illustration only. Nothing below was executed; all identifiers, counts, states, credentials and URLs are synthetic. Replace identifiers through discovery before any separately authorized call.

Resource context: workspace; it is not an extra action input field.

Illustrative action input:

{}

Illustrative HTTP 200 source response:

{
  "rules": [
    {
      "id": "rul_example",
      "hostId": "hst_example",
      "dayOfWeek": 1,
      "startMinute": 540,
      "endMinute": 1020
    }
  ],
  "overrides": [
    {
      "id": "ovr_example",
      "hostId": "hst_example",
      "date": "2026-11-20",
      "startMinute": null,
      "endMinute": null
    }
  ]
}

rules describes Monday 09:00–17:00 in the host timezone. The Friday 20 November override has null endpoints, so that date is closed. These are authored scheduling rules, not a list of computed free slots.

This source-shaped illustrative response does not validate against the declared output schema: overlapping oneOf branches accept the same object. Preserve the schema and report the contract issue; do not claim this is runtime failure evidence.

Effects and verification

  • Reads weekly rules and overrides for the authenticated user’s selected-workspace host.
  1. Confirm host timezone with host.get; inspect every rules and overrides entry before replacing a schedule.

Refusals and recovery

Selected source refusals are listed below; runtime middleware can return additional structured errors.

HTTPErrorSupported response
403forbiddenReconcile the declared permission, organization and verified resource grant with the legitimate access owner; do not switch context to bypass a refusal.
404no_hostRead host.get; if it returns host:null, create the intended workspace host through host.update before retrying.

Recovery: This read does not mutate Calendar records. Correct the selected context or request fields before another authorized read.

  • app_topolo_calendar.host.get: Read the selected workspace host, including the unconfigured host:null state.
  • app_topolo_calendar.availability.update: Replace the entire weekly availability schedule.
  • app_topolo_calendar.availability.overrides.list: Discover date override IDs before updating or deleting one.

Declared schemas and provenance

The hidden action guide carries these exact current declared schemas. They are not rewritten to make the illustrations pass.

Input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Output schema:

{
  "title": "Get availability response",
  "description": "Resource response returned by availability.get. The service may return the resource directly or in an envelope.",
  "oneOf": [
    {
      "type": "object",
      "title": "availability record",
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable identifier when the availability exposes one."
        }
      },
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "title": "availability record",
          "properties": {
            "id": {
              "type": "string",
              "description": "Stable identifier when the availability exposes one."
            }
          },
          "additionalProperties": true
        },
        "availability": {
          "type": "object",
          "title": "availability record",
          "properties": {
            "id": {
              "type": "string",
              "description": "Stable identifier when the availability exposes one."
            }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    }
  ],
  "x-topolo-contract-source": "derived-action-metadata",
  "x-topolo-contract-precision": "structural"
}

Source: TopoloCalendar@b378ceb73800ee1d1e6c4ff6f0b4179918cf632c, apps/api/src/routes/admin-availability.ts. Current catalog metadata and source were compared without executing the application.

  • Source-reviewed synthetic input/response; not captured or executed.
  • Source revision is not proof of current deployment, caller access, provider connection or notification delivery.
  • This source-shaped illustrative response does not validate against the declared output schema: overlapping oneOf branches accept the same object. Preserve the schema and report the contract issue; do not claim this is runtime failure evidence.