Listar workspaces conectados a una ubicación
Devuelve una lista paginada de workspaces (dispositivos FWS) conectados a la ubicación indicada a través de su red, dentro del alcance de la organización autorizada (incluye tenants delegados accesibles). Si la ubicación no existe en el alcance autorizado, responde 404. Si existe pero no tiene dispositivos, responde 200 con data vacía. La agregación no está disponible en este 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"
}
]
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
Identificador de la organización.
24^[0-9a-f]{24}$Identificador de la ubicación (FWS Location.Oid).
Parámetros de consulta
Número de página.
x >= 1Número de elementos por página.
1 <= x <= 100Campos de respuesta separados por comas para cada elemento.
2048Expresión JSON de filtros sobre campos filtrables del recurso (location_id, network_id, organization_id).
5120Expresión de ordenación con el formato :asc|desc. Campos ordenables: location_id, network_id, organization_id. Por defecto 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"
}
]
}