curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/fields/global/{name}?token='import requests
url = "https://sandbox.circularo.com/api/v1/fields/global/{name}?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/fields/global/{name}?token=', 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://sandbox.circularo.com/api/v1/fields/global/{name}?token=",
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://sandbox.circularo.com/api/v1/fields/global/{name}?token="
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://sandbox.circularo.com/api/v1/fields/global/{name}?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/fields/global/{name}?token=")
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{
"fields": [
{
"format": "d.MM.yyyy",
"listCanHaveMultipleValues": true,
"listKey": "priority",
"listName": "priorities",
"name": "EXPIRATION",
"searchType": "date",
"type": "date",
"usage": [
"d_default"
],
"validation": [
{
"message": "required_standard",
"parameter": "10",
"type": "required"
}
],
"values": "[\"first\",\"second\"]"
}
]
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Get a global field
GET /fields/global/{name}
Returns one global field by name, with everything a client needs to render it - its type, the enumeration or the fixed choices it draws values from, the validation rules to enforce - together with usage, the names of the metadata definitions that currently reference it.
That usage list is what makes the field’s fate readable: a field nothing references can still be deleted, while one already in use cannot. A client importing a metadata definition also reads it here - it compares the incoming field against the stored one to decide whether to create it, leave it alone or replace it, and a field already in use is one it must not replace.
The name is given without the GF_ prefix a definition uses when it references the field. The field comes back as a single object rather than a list.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user role: admin
curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/fields/global/{name}?token='import requests
url = "https://sandbox.circularo.com/api/v1/fields/global/{name}?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/fields/global/{name}?token=', 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://sandbox.circularo.com/api/v1/fields/global/{name}?token=",
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://sandbox.circularo.com/api/v1/fields/global/{name}?token="
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://sandbox.circularo.com/api/v1/fields/global/{name}?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/fields/global/{name}?token=")
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{
"fields": [
{
"format": "d.MM.yyyy",
"listCanHaveMultipleValues": true,
"listKey": "priority",
"listName": "priorities",
"name": "EXPIRATION",
"searchType": "date",
"type": "date",
"usage": [
"d_default"
],
"validation": [
{
"message": "required_standard",
"parameter": "10",
"type": "required"
}
],
"values": "[\"first\",\"second\"]"
}
]
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}