Entity Type API
List Entity Types
List all entity types for a workspace.
GET
/
v2
/
entity-types
List Entity Types
curl --request GET \
--url https://public.api.serval.com/v2/entity-types \
--header 'Authorization: Bearer <token>'import requests
url = "https://public.api.serval.com/v2/entity-types"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.api.serval.com/v2/entity-types', 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://public.api.serval.com/v2/entity-types",
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://public.api.serval.com/v2/entity-types"
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://public.api.serval.com/v2/entity-types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/entity-types")
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{
"data": [
{
"id": "<string>",
"teamId": "<string>",
"key": "<string>",
"name": "<string>",
"parentEntityTypeId": "<string>",
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"createdByUserId": "<string>",
"updatedByUserId": "<string>",
"fields": [
{
"id": "<string>",
"entityTypeId": "<string>",
"key": "<string>",
"name": "<string>",
"dataType": "DATA_TYPE_UNSPECIFIED",
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"createdByUserId": "<string>",
"updatedByUserId": "<string>",
"enumOptions": [
{
"id": "<string>",
"value": "<string>",
"displayName": "<string>",
"displayOrder": 123,
"description": "<string>"
}
],
"isKeyField": true,
"isNameField": true,
"fieldId": "<string>",
"refEntityTypeId": "<string>",
"refEntityTypeIds": [
"<string>"
],
"description": "<string>",
"sourceEntityTypeId": "<string>",
"viewerCanViewValues": true,
"viewerCanEdit": true,
"viewerCanCreate": true,
"helpAgentVisible": true,
"sensitive": true,
"sectionId": "<string>",
"displayOptions": {
"boolean": {
"style": "STYLE_UNSPECIFIED"
}
},
"valueSource": "FIELD_VALUE_SOURCE_UNSPECIFIED",
"formula": "<string>",
"defaultFormula": "<string>",
"formulaDisabledAt": "2025-01-15T01:30:15.000Z",
"autoNumber": {
"prefix": "<string>",
"digits": 123,
"scope": "AUTO_NUMBER_SCOPE_UNSPECIFIED",
"counter": "<string>"
},
"timestampRange": {
"allowsOpenEnd": true
},
"scopedId": "<string>",
"multiSelect": true
}
],
"color": "<string>",
"iconSlug": "<string>",
"entitySchemaId": "<string>",
"helpAgentVisibility": "HELP_AGENT_ENTITY_VISIBILITY_UNSPECIFIED",
"viewerCanViewValues": true,
"viewerCanEdit": true,
"viewerCanManage": true,
"viewerCanCreate": true,
"viewerCanDelete": true,
"sections": [
{
"id": "<string>",
"entityTypeId": "<string>",
"name": "<string>",
"sourceEntityTypeId": "<string>",
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"createdByUserId": "<string>",
"updatedByUserId": "<string>"
}
],
"isEdgeType": true,
"description": "<string>",
"scopedId": "<string>"
}
],
"nextPageToken": "<string>"
}Authentication and permissions
Token requirements: User-based token (OAuth) or Organization-scoped API key or Workspace-scoped API key. Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.
| Credential | Access requirements |
|---|---|
| Organization-scoped API key | entities:read |
| Workspace-scoped API key | entities:read |
| User-based token (OAuth) | Supported, subject to permissions |
Authorizations
Query Parameters
Was this page helpful?
⌘I
List Entity Types
curl --request GET \
--url https://public.api.serval.com/v2/entity-types \
--header 'Authorization: Bearer <token>'import requests
url = "https://public.api.serval.com/v2/entity-types"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.api.serval.com/v2/entity-types', 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://public.api.serval.com/v2/entity-types",
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://public.api.serval.com/v2/entity-types"
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://public.api.serval.com/v2/entity-types")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/entity-types")
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{
"data": [
{
"id": "<string>",
"teamId": "<string>",
"key": "<string>",
"name": "<string>",
"parentEntityTypeId": "<string>",
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"createdByUserId": "<string>",
"updatedByUserId": "<string>",
"fields": [
{
"id": "<string>",
"entityTypeId": "<string>",
"key": "<string>",
"name": "<string>",
"dataType": "DATA_TYPE_UNSPECIFIED",
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"createdByUserId": "<string>",
"updatedByUserId": "<string>",
"enumOptions": [
{
"id": "<string>",
"value": "<string>",
"displayName": "<string>",
"displayOrder": 123,
"description": "<string>"
}
],
"isKeyField": true,
"isNameField": true,
"fieldId": "<string>",
"refEntityTypeId": "<string>",
"refEntityTypeIds": [
"<string>"
],
"description": "<string>",
"sourceEntityTypeId": "<string>",
"viewerCanViewValues": true,
"viewerCanEdit": true,
"viewerCanCreate": true,
"helpAgentVisible": true,
"sensitive": true,
"sectionId": "<string>",
"displayOptions": {
"boolean": {
"style": "STYLE_UNSPECIFIED"
}
},
"valueSource": "FIELD_VALUE_SOURCE_UNSPECIFIED",
"formula": "<string>",
"defaultFormula": "<string>",
"formulaDisabledAt": "2025-01-15T01:30:15.000Z",
"autoNumber": {
"prefix": "<string>",
"digits": 123,
"scope": "AUTO_NUMBER_SCOPE_UNSPECIFIED",
"counter": "<string>"
},
"timestampRange": {
"allowsOpenEnd": true
},
"scopedId": "<string>",
"multiSelect": true
}
],
"color": "<string>",
"iconSlug": "<string>",
"entitySchemaId": "<string>",
"helpAgentVisibility": "HELP_AGENT_ENTITY_VISIBILITY_UNSPECIFIED",
"viewerCanViewValues": true,
"viewerCanEdit": true,
"viewerCanManage": true,
"viewerCanCreate": true,
"viewerCanDelete": true,
"sections": [
{
"id": "<string>",
"entityTypeId": "<string>",
"name": "<string>",
"sourceEntityTypeId": "<string>",
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"createdByUserId": "<string>",
"updatedByUserId": "<string>"
}
],
"isEdgeType": true,
"description": "<string>",
"scopedId": "<string>"
}
],
"nextPageToken": "<string>"
}
