Returns free/busy information for a set of calendars. Try it now .
Request
HTTP request
POST https://www.googleapis.com/calendar/v3/freeBusy
Authorization
This request allows authorization with at least one of the following scopes:
Scope |
---|
https://www.googleapis.com/auth/calendar.readonly
|
https://www.googleapis.com/auth/calendar
|
https://www.googleapis.com/auth/calendar.events.freebusy
|
https://www.googleapis.com/auth/calendar.freebusy
|
For more information, see the authentication and authorization page.
Request body
In the request body, supply data with the following structure:
{ "timeMin": datetime , "timeMax": datetime , "timeZone": string , "groupExpansionMax": integer , "calendarExpansionMax": integer , "items": [ { "id": string } ] }
Property name | Value | Description | Notes |
---|---|---|---|
timeMin
|
datetime
|
The start of the interval for the query formatted as per RFC3339 . | |
timeMax
|
datetime
|
The end of the interval for the query formatted as per RFC3339 . | |
timeZone
|
string
|
Time zone used in the response. Optional. The default is UTC. | |
groupExpansionMax
|
integer
|
Maximal number of calendar identifiers to be provided for a single group. Optional. An error is returned for a group with more members than this value. Maximum value is 100. | |
calendarExpansionMax
|
integer
|
Maximal number of calendars for which FreeBusy information is to be provided. Optional. Maximum value is 50. | |
items[]
|
list
|
List of calendars and/or groups to query. | |
items[].
id
|
string
|
The identifier of a calendar or a group. |
Response
If successful, this method returns a response body with the following structure:
{ "kind": "calendar#freeBusy", "timeMin": datetime , "timeMax": datetime , "groups": { (key) : { "errors": [ { "domain": string , "reason": string } ], "calendars": [ string ] } }, "calendars": { (key) : { "errors": [ { "domain": string , "reason": string } ], "busy": [ { "start": datetime , "end": datetime } ] } } }
kind
string
timeMin
datetime
timeMax
datetime
groups
object
groups.
(key)
nested object
groups.(key).
errors[]
list
groups.(key).errors[].
domain
string
groups.(key).errors[].
reason
string
- "
groupTooBig
" - The group of users requested is too large for a single query. - "
tooManyCalendarsRequested
" - The number of calendars requested is too large for a single query. - "
notFound
" - The requested resource was not found. - "
internalError
" - The API service has encountered an internal error.
groups.(key).
calendars[]
list
calendars
object
calendars.
(key)
nested object
calendars.(key).
errors[]
list
calendars.(key).errors[].
domain
string
calendars.(key).errors[].
reason
string
- "
groupTooBig
" - The group of users requested is too large for a single query. - "
tooManyCalendarsRequested
" - The number of calendars requested is too large for a single query. - "
notFound
" - The requested resource was not found. - "
internalError
" - The API service has encountered an internal error.
calendars.(key).
busy[]
list
calendars.(key).busy[].
start
datetime
calendars.(key).busy[].
end
datetime
Try it!
Use the APIs Explorer below to call this method on live data and see the response.