Workspaces
Listar discos
Retorna uma lista paginada de discos do Espaço de Trabalho para o Workspace selecionado.
GET
/
v2
/
organizations
/
{organization_id}
/
workspaces
/
{workspace_id}
/
disks
Listar discos
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/workspaces/{workspace_id}/disks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/workspaces/{workspace_id}/disks"
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}/workspaces/{workspace_id}/disks', 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}/workspaces/{workspace_id}/disks",
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}/workspaces/{workspace_id}/disks"
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}/workspaces/{workspace_id}/disks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/workspaces/{workspace_id}/disks")
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": "cd607b6eb7d74f3990e62f0f",
"name": "D:",
"device_id": "\\\\.\\PHYSICALDRIVE1",
"encrypted": "not_encrypted",
"encryption_method": "None",
"location": "Integrated : Bus 0 : Device 14 : Function 0 : Adapter 0 : Port 3 : Target 2 : LUN 0",
"media_type": "NTFS",
"os_drive": false,
"partition": "Disk #1, Partition #0",
"physical_disk_size": 953869,
"total_size": 953866,
"used_size": 953333,
"volume_label": "Data"
}
]
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
Identificador da organização.
Required string length:
24Pattern:
^[0-9a-f]{24}$Identificador do Workspace.
Required string length:
24Pattern:
^[0-9a-f]{24}$Parámetros de consulta
Número da página.
Rango requerido:
x >= 1Quantidade de elementos por página.
Rango requerido:
1 <= x <= 100Nomes de campos de elementos de resposta separados por vírgulas para incluir.
Maximum string length:
2048Expressão de filtro JSON sobre rotas de campos filtráveis de resposta.
Maximum string length:
5120Expressão de ordenação na forma :asc|desc sobre rotas de campos escalares ordenáveis da resposta.
⌘I
Listar discos
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/workspaces/{workspace_id}/disks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/workspaces/{workspace_id}/disks"
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}/workspaces/{workspace_id}/disks', 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}/workspaces/{workspace_id}/disks",
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}/workspaces/{workspace_id}/disks"
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}/workspaces/{workspace_id}/disks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/workspaces/{workspace_id}/disks")
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": "cd607b6eb7d74f3990e62f0f",
"name": "D:",
"device_id": "\\\\.\\PHYSICALDRIVE1",
"encrypted": "not_encrypted",
"encryption_method": "None",
"location": "Integrated : Bus 0 : Device 14 : Function 0 : Adapter 0 : Port 3 : Target 2 : LUN 0",
"media_type": "NTFS",
"os_drive": false,
"partition": "Disk #1, Partition #0",
"physical_disk_size": 953869,
"total_size": 953866,
"used_size": 953333,
"volume_label": "Data"
}
]
}