List workspaces connected to a location
Returns a paginated list of workspaces (FWS devices) connected to the specified location through its network within the authorized organization scope (includes accessible delegated tenants). If the location does not exist within the authorized scope, respond with 404. If it exists but has no devices, respond with 200 and empty data. Aggregation is not available on this endpoint.
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"has_next": false,
"data": [
{
"id": "507f1f77bcf86cd799439012",
"location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"network_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"organization_id": "507f1f77bcf86cd799439011"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization identifier.
24^[0-9a-f]{24}$Location Id (FWS Location.Oid).
Query Parameters
Page number.
x >= 1Number of items per page.
1 <= x <= 100Response fields separated by commas for each element.
2048JSON expression filters for filterable fields of the resource (location_id, network_id, organization_id).
5120Sorting expression with format :asc|desc. Sortable fields: location_id, network_id, organization_id. Default organization_id:asc.
^([a-z_]+):(asc|desc)$curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/locations/{location_id}/connected-workspaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"has_next": false,
"data": [
{
"id": "507f1f77bcf86cd799439012",
"location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"network_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"organization_id": "507f1f77bcf86cd799439011"
}
]
}