Перейти до основного вмісту
GET
/
v1
/
datasets
Отримати набори даних
curl --request GET \
  --url https://api.example.com/v1/datasets
import requests

url = "https://api.example.com/v1/datasets"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/v1/datasets', 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.example.com/v1/datasets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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.example.com/v1/datasets"

req, _ := http.NewRequest("GET", url, nil)

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.example.com/v1/datasets")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/datasets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "id": 123,
    "name": "<string>",
    "isDisabled": true,
    "position": 123,
    "path": "<string>",
    "states": [
      {
        "id": 123,
        "dataset": "<unknown>",
        "name": "<string>",
        "color": 123,
        "position": 123
      }
    ],
    "properties": [
      {
        "id": 123,
        "dataset": "<unknown>",
        "propertyType": {
          "id": "<string>",
          "isAutomatic": true,
          "isPlural": true,
          "isSortable": true,
          "position": 123
        },
        "name": "<string>",
        "isUsedAsTitle": true,
        "isRequired": true,
        "parameters": "<string>",
        "position": 123,
        "options": [
          {
            "id": 123,
            "property": "<unknown>",
            "text": "<string>",
            "color": 123
          }
        ]
      }
    ],
    "representations": [
      {
        "id": 123,
        "dashboard": {
          "id": 123,
          "name": "<string>",
          "isDisabled": true,
          "position": 123,
          "path": "<string>",
          "representations": "<array>"
        },
        "dataset": "<unknown>",
        "representationType": {
          "id": "<string>",
          "isAggregated": true,
          "position": 123
        },
        "name": "<string>",
        "parameters": "<string>",
        "position": 123
      }
    ]
  }
]

Параметри запиту

sorting
string
offset
integer<int32>
limit
integer<int32>
fields
string

Відповідь

OK

id
integer<int32>
name
string | null
isDisabled
boolean
position
integer<int32>
path
string | null
states
object[] | null
properties
object[] | null
representations
object[] | null