{"_id":"568161b10ab7e40d0073f531","editedParams":true,"parentDoc":null,"project":"5435693035740020002a1c1c","category":{"_id":"568161799de23c0d00c54750","__v":1,"pages":["568161b10ab7e40d0073f531"],"project":"5435693035740020002a1c1c","version":"5435693035740020002a1c1f","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-12-28T16:21:13.387Z","from_sync":false,"order":9,"slug":"free-busy","title":"Free Busy"},"user":"543569cd35740020002a1c2d","version":{"_id":"5435693035740020002a1c1f","__v":14,"project":"5435693035740020002a1c1c","createdAt":"2014-10-08T16:41:20.702Z","releaseDate":"2014-10-08T16:41:20.702Z","categories":["5435693035740020002a1c20","551c03c1ff892b3700d1c57a","551ca3927405910d00900a59","551cac6448564a2f0024d89e","551cb4d848564a2f0024d8a3","551cb52db7a32b3b00d1ef78","5526e2064a7ac121004c6073","5526e5147d4a4417009516b3","5526e9877d4a4417009516bb","5528362cd9e1db2d00cd924d","5580240ebe698419008f2ba2","5580a7dabe698419008f2db6","568161799de23c0d00c54750","5866c905a2cbb31900f6f1aa"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"editedParams2":true,"__v":9,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-28T16:22:09.126Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"GET /v1.0/free-busy/spaces?location_ids=10&after=2015-10-13T19:15:00Z&before=2015-10-13T21:45:00Z&min_capacity=2&duration=60 HTTP/1.1\nHost: api.robinpowered.com\nContent-Type: application/json\nAuthorization: Access-Token :accessToken\n","language":"http"}]},"method":"get","results":{"codes":[{"language":"json","code":"[\n    {\n      \"has_presence\": false,\n      \"space\": {\n        // Space with calendar included\n      },\n      \"busy\": [\n        {\n          \"from\": \"2015-10-13T21:00:00+0000\",\n          \"to\": \"2015-10-13T21:45:00+0000\",\n          \"events\": [\n            {\n              \"id\": 2349770,\n              \"uid\": \"2d234hghjj5673ls4g0k5s:::at:::google.com\",\n              \"space_id\": 50,\n              \"started_at\": \"2015-10-13T21:00:00+0000\",\n              \"ended_at\": \"2015-10-13T21:30:00+0000\"\n            },\n            {\n              \"id\": 2350576,\n              \"uid\": \"r234u63k1asd3f9d01jor3@google.com\",\n              \"space_id\": 50,\n              \"started_at\": \"2015-10-13T21:30:00+0000\",\n              \"ended_at\": \"2015-10-13T22:00:00+0000\"\n            }\n          ]\n        }\n      ]\n    },\n    // More results...\n  ]","name":"","status":200}]},"settings":"","auth":"required","params":[{"_id":"5681636c96e9980d0093db76","ref":"","in":"query","required":false,"desc":"One or more location IDs, separated by commas. Will include all spaces in the given locations in the result.","default":"","type":"string","name":"location_ids"},{"_id":"5681636c96e9980d0093db75","ref":"","in":"query","required":false,"desc":"One or more space IDs, separated by commas. Can be combined with `location_ids`","default":"","type":"string","name":"space_ids"},{"_id":"5681636c96e9980d0093db74","ref":"","in":"query","required":false,"desc":"Lower bound for free-busy query, as a valid ISO8601 DateTime format.","default":"","type":"timestamp","name":"after"},{"_id":"5681636c96e9980d0093db73","ref":"","in":"query","required":false,"desc":"Upper bound for free-busy query, as a valid ISO8601 DateTime format.","default":"","type":"timestamp","name":"before"},{"_id":"5681645130018c0d006bf7fc","ref":"","in":"query","required":false,"desc":"The amount of time required between two events for a space to be considered \"free\", as a valid ISO8601 DateTime period. (eg. \"PT60M\")","default":"30","type":"int","name":"duration"},{"_id":"568164754047cf0d004121bf","ref":"","in":"query","required":false,"desc":"Comma separated space types. Unmatched spaces will be filtered out entirely.","default":"","type":"string","name":"types"},{"_id":"568d8dc6f676070d00be883b","ref":"","in":"query","required":false,"desc":"Comma separated amenity IDs. Unmatched spaces will be filtered out entirely.","default":"","type":"string","name":"amenity_ids"},{"_id":"5681645130018c0d006bf7fb","ref":"","in":"query","required":false,"desc":"Space name filter. Unmatched spaces will be filtered out entirely.","default":"","type":"string","name":"query"},{"_id":"568163dd25ea3717002a02f3","ref":"","in":"query","required":false,"desc":"Filter for max space capacity. Unmatched spaces will be filtered out entirely.","default":"","type":"int","name":"min_capacity"},{"_id":"568163dd25ea3717002a02f2","ref":"","in":"query","required":false,"desc":"Filter for max space capacity. Unmatched spaces will be filtered out entirely.","default":"","type":"int","name":"max_capacity"},{"_id":"5681636c96e9980d0093db71","ref":"","in":"query","required":false,"desc":"The page to return","default":"1","type":"int","name":"page"},{"_id":"5681636c96e9980d0093db70","ref":"","in":"query","required":false,"desc":"The amount of results to return per page","default":"10","type":"int","name":"per_page"}],"url":"/free-busy/spaces"},"isReference":true,"order":0,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Use this endpoint to get multiple schedules\",\n  \"body\": \"This is the best endpoint for fetching more than one space schedule at a time. It's been built with queries in mind, and will give the best performance for your app.\"\n}\n[/block]\nYou must include either `location_ids` or `space_ids` in your request. Everything else is optional.\n\nThe free-busy endpoint is great for searching schedules between spaces, locations, and associated meta. If you see the word \"filter\" in a parameter above, it implies that non-matching results are omitted entirely, vs. just ordered lower in the results.\n\nBy default, this endpoint will filter out specialty (e.g `kitchen`) [space types](http://docs.robinpowered.com/docs/space#space-types) unless explicitly provided. You can manually override via the `types` param. Types returned by default are:\n\n* `null` (No space type assigned yet)\n* `breakout`\n* `call`\n* `conference`\n* `meeting`\n* `office`\n* `study_room`","excerpt":"Search space availability based on multiple parameters and get back results in a \"Best Fit\" order","slug":"free-busy-spaces","type":"endpoint","title":"/free-busy/spaces"}

get/free-busy/spaces

Search space availability based on multiple parameters and get back results in a "Best Fit" order

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

location_ids:
string
One or more location IDs, separated by commas. Will include all spaces in the given locations in the result.
space_ids:
string
One or more space IDs, separated by commas. Can be combined with `location_ids`
after:
timestamp
Lower bound for free-busy query, as a valid ISO8601 DateTime format.
before:
timestamp
Upper bound for free-busy query, as a valid ISO8601 DateTime format.
duration:
integer30
The amount of time required between two events for a space to be considered "free", as a valid ISO8601 DateTime period. (eg. "PT60M")
types:
string
Comma separated space types. Unmatched spaces will be filtered out entirely.
amenity_ids:
string
Comma separated amenity IDs. Unmatched spaces will be filtered out entirely.
query:
string
Space name filter. Unmatched spaces will be filtered out entirely.
min_capacity:
integer
Filter for max space capacity. Unmatched spaces will be filtered out entirely.
max_capacity:
integer
Filter for max space capacity. Unmatched spaces will be filtered out entirely.
page:
integer1
The page to return
per_page:
integer10
The amount of results to return per page

Examples


Result Format


Documentation

[block:callout] { "type": "success", "title": "Use this endpoint to get multiple schedules", "body": "This is the best endpoint for fetching more than one space schedule at a time. It's been built with queries in mind, and will give the best performance for your app." } [/block] You must include either `location_ids` or `space_ids` in your request. Everything else is optional. The free-busy endpoint is great for searching schedules between spaces, locations, and associated meta. If you see the word "filter" in a parameter above, it implies that non-matching results are omitted entirely, vs. just ordered lower in the results. By default, this endpoint will filter out specialty (e.g `kitchen`) [space types](http://docs.robinpowered.com/docs/space#space-types) unless explicitly provided. You can manually override via the `types` param. Types returned by default are: * `null` (No space type assigned yet) * `breakout` * `call` * `conference` * `meeting` * `office` * `study_room`

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}