{"_id":"5526e439e69c7d0d00047e57","parentDoc":null,"__v":3,"user":"551d4f2dd4fb192f007e8350","editedParams":true,"project":"5435693035740020002a1c1c","category":{"_id":"5526e2064a7ac121004c6073","project":"5435693035740020002a1c1c","pages":["5526e2674a7ac121004c6075","5526e439e69c7d0d00047e57"],"__v":2,"version":"5435693035740020002a1c1f","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-04-09T20:33:10.475Z","from_sync":false,"order":6,"slug":"locations","title":"Locations"},"editedParams2":true,"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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-04-09T20:42:33.565Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"GET /v1.0/locations/10/spaces HTTP/1.1\nHost: api.robinpowered.com\nContent-Type: application/json\nAuthorization: Access-Token :accessToken\n","language":"http"}]},"method":"get","results":{"codes":[{"name":"","code":"{\n  \"meta\": {\n    \"status_code\": 200,\n    \"status\": \"OK\",\n    \"message\": \"\",\n    \"more_info\": {}\n  },\n  \"data\": [\n    {\n      \"id\":1,\n      \"location_id\":1,\n      \"name\": \"Conference Room 1\",\n      \"description\": \"The room\",\n      \"image\": \"getrobin.com/room.jpg\",\n      \"discovery_radius\":4\n    },\n    {\n      \"id\":2,\n      \"location_id\":1,\n      \"name\": \"Conference Room 2\",\n      \"description\": \"The second room\",\n      \"image\": \"getrobin.com/room2.jpg\",\n      \"discovery_radius\":40\n    }\n  ],\n  \"paging\": {\n    \"page\": 1,\n    \"per_page\": 10\n  }\n}","language":"json","status":200}]},"settings":"","auth":"required","params":[{"_id":"5526eae4d7ea1c2300e58a5a","ref":"","in":"path","required":true,"desc":"The ID of the location","default":"","type":"int","name":"id"},{"_id":"5526e439e69c7d0d00047e5a","ref":"","in":"query","required":false,"desc":"Will filter by a specified space name","default":"","type":"string","name":"query"},{"_id":"5526e439e69c7d0d00047e59","ref":"","in":"query","required":false,"desc":"The page of the result","default":"1","type":"int","name":"page"},{"_id":"5526e439e69c7d0d00047e58","ref":"","in":"query","required":false,"desc":"How many results are returned per page","default":"10","type":"int","name":"per_page"},{"_id":"5669010be447d61700fd9ecd","ref":"","in":"path","required":false,"desc":"Include specific models for each space (e.g. calendar)","default":"","type":"array_string","name":"include"}],"url":"/locations/:id/spaces?include=:include"},"isReference":true,"order":2,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Optional Includes\"\n}\n[/block]\nYou can optionally include each space's calendar in the response via `/location/:id/spaces?include=calendar`.\n\nThe space `state` entity is includable as well with `?include=state`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"availability\\\": \\\"available\\\",\\n  \\\"present\\\": 1,\\n  \\\"next_busy_change\\\": \\\"2016-11-14T11:30:00+0000\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe `next_busy_change` describes the next time when the space will transition from available to busy, or vice versa. If there are no busy changes in the near future, this calue may be `null`.","excerpt":"Get all of a location's spaces","slug":"get-location-spaces","type":"endpoint","title":"/locations/:id/spaces"}

get/locations/:id/spaces

Get all of a location's spaces

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
integer
The ID of the location
include:
array of strings
Include specific models for each space (e.g. calendar)

Query Params

query:
string
Will filter by a specified space name
page:
integer1
The page of the result
per_page:
integer10
How many results are returned per page

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Optional Includes" } [/block] You can optionally include each space's calendar in the response via `/location/:id/spaces?include=calendar`. The space `state` entity is includable as well with `?include=state`: [block:code] { "codes": [ { "code": "{\n \"availability\": \"available\",\n \"present\": 1,\n \"next_busy_change\": \"2016-11-14T11:30:00+0000\"\n}", "language": "json" } ] } [/block] The `next_busy_change` describes the next time when the space will transition from available to busy, or vice versa. If there are no busy changes in the near future, this calue may be `null`.

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 }}