Get a field definition for a specific template.
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Authorization: Bearer <token>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
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(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0")) .header("Authorization", "Bearer <token>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0") .get() .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0") .get() .addHeader("Authorization", "Bearer <token>") .build()
val response = client.newCall(request).execute()<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", 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;}<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', [ 'headers' => [ 'Authorization' => 'Bearer <token>', ],]);
echo $response->getBody();import http.client
conn = http.client.HTTPSConnection("your-instance.seventhings.com")
headers = { 'Authorization': "Bearer <token>" }
conn.request("GET", "/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", headers=headers)
res = conn.getresponse()data = res.read()
print(data.decode("utf-8"))import requests
url = "https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.json())use reqwest;
#[tokio::main]pub async fn main() { let url = "https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'wget --quiet \ --method GET \ --header 'Authorization: Bearer <token>' \ --output-document \ - https://your-instance.seventhings.com/customer-api/v1/asset-tracking/asset/field-definition/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0Get a field definition for a specific template.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The template type of the asset tracking module
Example
roomThe template to get the field definitions for.
The UUID of the field definition to get.
Responses
Section titled “Responses”Success
A field definition
object
The key of the field
An attachment field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A barcode field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A boolean field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A date field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A date-time field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A decimal number field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A dropdown field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A field value comparison field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A link field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A linked assets field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A linked building field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A linked room field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A linked user field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A linked person field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A long text field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A money field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A number field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A reminder field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
A text field type
object
Array of field value constraints
A field value constraint that allows only certain values
object
Array of allowed values
A field value constraint that allows only a certain date format
object
The date format
A field value constraint that allows only a certain date-time format
object
The date-time format
A field value minimum value constraint
object
The minimum value
A field value max length constraint
object
The max length of the field value
A field value maximum value constraint
object
The maximum value
A field value regular expression constraint
object
The regular expression
The label or translation key of the field
The comment of the field
The possible values of the field
The attributes of the field
The form group of a field
object
The editable attribute of a field
object
Whether the field is internal
object
Whether the field is mandatory
object
Whether the field is mutable
object
Whether the field is a system field
object
Visibility of the field
object
Preselect the field in the app
object
Whether the field content is indexed
object
The formatting of the field value
object
The sort direction of a list field
object
The ISO 4217 currency code
object
The number of fraction digits
object
Whether the field is a name component
object
Whether the field is exposed to a specified location
object
Whether the field is generated to a specified location
object
Whether the field is unique to a specified entity
object
When a field should be visible on dashboard
object
The relations of the field
The actual field of the relation
object
The uuid of the field
The actual field of the relation
object
The uuid of the field
The actual field of the relation
object
The uuid of the field
The values to compare with
Example
{ "field_type": { "name": "ATTACHMENT", "constraints": [ { "type": "allowed_values" } ] }, "label": "general_information", "comment": "Additional info about the field", "attributes": [ { "type": "form_group", "value": "General" } ], "relations": [ { "type": "actual_field" } ]}Request body is missing or invalid or request data is invalid.
Access token is missing or invalid.
You are not permitted to perform the requested operation.
The requested resource could not be found.
The requested resource representation has no acceptable format.
Internal Server Error.

