{
  "url": "https://telipot.com/catalog/capabilities/calendar.freebusy.query",
  "id": "calendar.freebusy.query",
  "description": "The times calendars are busy between two times",
  "platform": "calendar",
  "providers": [
    {
      "slug": "google-calendar",
      "name": "Google Calendar"
    }
  ],
  "tasks": 1,
  "taskPages": [
    {
      "id": "google-calendar.freebusy.query",
      "name": "Busy times of calendars between two times",
      "provider": {
        "slug": "google-calendar",
        "name": "Google Calendar"
      },
      "capability": "calendar.freebusy.query",
      "platform": "calendar",
      "kind": "data",
      "tier": "core",
      "identity": "user",
      "identityLabel": "Person’s own",
      "price": {
        "amount": "Free",
        "state": "free",
        "label": "Free",
        "detail": "Free from the tool",
        "type": "free"
      },
      "providers": 1,
      "retention": "standard",
      "runsOn": "free",
      "live": true,
      "summary": "Returns free/busy information for a set of calendars.",
      "method": "POST",
      "path": "/calendar/v3/freeBusy",
      "host": "https://www.googleapis.com",
      "docsUrl": "https://developers.google.com/workspace/calendar/api/v3/reference/freebusy/query",
      "auth": {
        "scheme": "oauth",
        "label": "oauth · OAuth 2.0 with PKCE",
        "short": "oauth · OAuth 2.0"
      },
      "scope": "own_account",
      "principal": "user",
      "requiredScopes": [
        "calendar.readonly"
      ],
      "verification": {
        "state": "none",
        "label": "Not verified yet",
        "detail": "Not checked yet. We test with a real request before we mark it."
      },
      "input": [
        {
          "name": "timeMin",
          "location": "body",
          "type": "string",
          "required": true,
          "constraints": [],
          "note": "The start of the interval, an RFC 3339 time with an offset"
        },
        {
          "name": "timeMax",
          "location": "body",
          "type": "string",
          "required": true,
          "constraints": [],
          "note": "The end of the interval, an RFC 3339 time with an offset"
        },
        {
          "name": "items",
          "location": "body",
          "type": "array",
          "required": true,
          "constraints": [],
          "note": "The calendars to query, each an object with an id from google-calendar.calendars.list, or primary"
        },
        {
          "name": "timeZone",
          "location": "body",
          "type": "string",
          "required": false,
          "constraints": [
            "default \"UTC\""
          ],
          "note": "The time zone of the times in the answer"
        },
        {
          "name": "calendarExpansionMax",
          "location": "body",
          "type": "integer",
          "required": false,
          "constraints": [],
          "note": "The most calendars to answer for"
        }
      ],
      "sampleInput": {
        "timeMin": "2026-10-12T00:00:00Z",
        "timeMax": "2026-10-19T00:00:00Z",
        "items": [
          {
            "id": "primary"
          }
        ]
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "timeMin": {
            "type": "string",
            "description": "The start of the interval, an RFC 3339 time with an offset",
            "examples": [
              "2026-10-12T00:00:00Z"
            ]
          },
          "timeMax": {
            "type": "string",
            "description": "The end of the interval, an RFC 3339 time with an offset",
            "examples": [
              "2026-10-19T00:00:00Z"
            ]
          },
          "items": {
            "type": "array",
            "description": "The calendars to query, each an object with an id from google-calendar.calendars.list, or primary",
            "examples": [
              [
                {
                  "id": "primary"
                }
              ]
            ]
          },
          "timeZone": {
            "type": "string",
            "description": "The time zone of the times in the answer",
            "default": "UTC"
          },
          "calendarExpansionMax": {
            "type": "integer",
            "description": "The most calendars to answer for"
          }
        },
        "required": [
          "timeMin",
          "timeMax",
          "items"
        ],
        "additionalProperties": false
      },
      "output": [
        {
          "name": "timeMin",
          "type": "string"
        },
        {
          "name": "timeMax",
          "type": "string"
        },
        {
          "name": "calendars",
          "type": "object",
          "description": "One entry per queried calendar id"
        },
        {
          "name": "groups",
          "type": "object"
        },
        {
          "name": "kind",
          "type": "string"
        }
      ],
      "outputSchema": {
        "type": "object",
        "properties": {
          "timeMin": {
            "type": "string"
          },
          "timeMax": {
            "type": "string"
          },
          "calendars": {
            "type": "object",
            "description": "One entry per queried calendar id",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "busy": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "string"
                      },
                      "end": {
                        "type": "string"
                      }
                    }
                  }
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "domain": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "groups": {
            "type": "object"
          },
          "kind": {
            "type": "string"
          }
        }
      },
      "example": {
        "file": "examples/google-calendar.freebusy.query.json",
        "json": {
          "kind": "calendar#freeBusy",
          "timeMin": "2026-10-12T00:00:00.000Z",
          "timeMax": "2026-10-19T00:00:00.000Z",
          "calendars": {
            "contact@example.com": {
              "busy": [
                {
                  "start": "2026-10-12T17:00:00Z",
                  "end": "2026-10-12T17:30:00Z"
                },
                {
                  "start": "2026-10-14T22:00:00Z",
                  "end": "2026-10-14T23:00:00Z"
                }
              ]
            }
          }
        }
      },
      "commands": {
        "mode": "run",
        "cli": "telipot run google-calendar.freebusy.query \\\n  --input-json '{\"timeMin\":\"2026-10-12T00:00:00Z\",\"timeMax\":\"2026-10-19T00:00:00Z\",\"items\":[{\"id\":\"primary\"}]}' \\\n  --as user:ana",
        "http": "curl https://api.telipot.com/v1/tasks/google-calendar.freebusy.query/run \\\n  -H \"Authorization: Bearer $TELIPOT_TOKEN\" \\\n  -H \"Telipot-Principal: user:ana\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"timeMin\":\"2026-10-12T00:00:00Z\",\"timeMax\":\"2026-10-19T00:00:00Z\",\"items\":[{\"id\":\"primary\"}]}'",
        "quote": "telipot run google-calendar.freebusy.query \\\n  --input-json '{\"timeMin\":\"2026-10-12T00:00:00Z\",\"timeMax\":\"2026-10-19T00:00:00Z\",\"items\":[{\"id\":\"primary\"}]}' \\\n  --as user:ana \\\n  --quote"
      },
      "siblings": []
    }
  ]
}
