List labels
curl --request GET \
--url https://gateway.app.clavata.ai:8443/v1/labels \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.app.clavata.ai:8443/v1/labels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.app.clavata.ai:8443/v1/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8443",
CURLOPT_URL => "https://gateway.app.clavata.ai:8443/v1/labels",
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://gateway.app.clavata.ai:8443/v1/labels"
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://gateway.app.clavata.ai:8443/v1/labels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.app.clavata.ai:8443/v1/labels")
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{
"labels": [
{
"labelId": "<string>",
"name": "<string>",
"customerId": "<string>",
"policyId": "<string>",
"disabled": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"expunged": true,
"description": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"tags": [
{
"labelTagId": "<string>",
"customerId": "<string>",
"name": "<string>",
"color": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"expunged": true
}
],
"importProvenance": {
"libraryLabelId": "<string>",
"libraryVersionId": "<string>",
"libraryName": "<string>",
"importedAt": "2023-11-07T05:31:56Z"
}
}
],
"nextPageToken": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Labels
List labels
Lists labels in the authenticated account, newest first. Omitting page_size uses the default of 100. The maximum page_size is 1000. Negative page_size is rejected. Use page_token from the previous response to fetch the next page.
GET
/
v1
/
labels
List labels
curl --request GET \
--url https://gateway.app.clavata.ai:8443/v1/labels \
--header 'Authorization: Bearer <token>'import requests
url = "https://gateway.app.clavata.ai:8443/v1/labels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://gateway.app.clavata.ai:8443/v1/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8443",
CURLOPT_URL => "https://gateway.app.clavata.ai:8443/v1/labels",
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://gateway.app.clavata.ai:8443/v1/labels"
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://gateway.app.clavata.ai:8443/v1/labels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.app.clavata.ai:8443/v1/labels")
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{
"labels": [
{
"labelId": "<string>",
"name": "<string>",
"customerId": "<string>",
"policyId": "<string>",
"disabled": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"expunged": true,
"description": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"tags": [
{
"labelTagId": "<string>",
"customerId": "<string>",
"name": "<string>",
"color": "<string>",
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"expunged": true
}
],
"importProvenance": {
"libraryLabelId": "<string>",
"libraryVersionId": "<string>",
"libraryName": "<string>",
"importedAt": "2023-11-07T05:31:56Z"
}
}
],
"nextPageToken": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Whether to include archived labels
Pagination: maximum number of items to return. When unset or 0, defaults to 100. Maximum 1000.
Pagination token for keyset pagination
Filter labels by tag IDs (returns labels that have any of the specified tags)
Was this page helpful?