Entity Type API
Search Entity Types
Search for entity types by key or other filters.
POST
/
v2
/
entity-types
/
search
Search Entity Types
curl --request POST \
--url https://public.api.serval.com/v2/entity-types/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "<string>",
"key": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"scopedId": "<string>"
}
'import requests
url = "https://public.api.serval.com/v2/entity-types/search"
payload = {
"teamId": "<string>",
"key": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"scopedId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
teamId: '<string>',
key: '<string>',
pageSize: 123,
pageToken: '<string>',
scopedId: '<string>'
})
};
fetch('https://public.api.serval.com/v2/entity-types/search', 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/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'teamId' => '<string>',
'key' => '<string>',
'pageSize' => 123,
'pageToken' => '<string>',
'scopedId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public.api.serval.com/v2/entity-types/search"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"key\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"scopedId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public.api.serval.com/v2/entity-types/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"key\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"scopedId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/entity-types/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamId\": \"<string>\",\n \"key\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"scopedId\": \"<string>\"\n}"
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
Body
application/json
Was this page helpful?
⌘I
Search Entity Types
curl --request POST \
--url https://public.api.serval.com/v2/entity-types/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "<string>",
"key": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"scopedId": "<string>"
}
'import requests
url = "https://public.api.serval.com/v2/entity-types/search"
payload = {
"teamId": "<string>",
"key": "<string>",
"pageSize": 123,
"pageToken": "<string>",
"scopedId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
teamId: '<string>',
key: '<string>',
pageSize: 123,
pageToken: '<string>',
scopedId: '<string>'
})
};
fetch('https://public.api.serval.com/v2/entity-types/search', 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/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'teamId' => '<string>',
'key' => '<string>',
'pageSize' => 123,
'pageToken' => '<string>',
'scopedId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public.api.serval.com/v2/entity-types/search"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"key\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"scopedId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public.api.serval.com/v2/entity-types/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"key\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"scopedId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/entity-types/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamId\": \"<string>\",\n \"key\": \"<string>\",\n \"pageSize\": 123,\n \"pageToken\": \"<string>\",\n \"scopedId\": \"<string>\"\n}"
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>"
}
