Entity Ingestion Config API
Create Entity Ingestion Config
Create an entity ingestion config that links a workflow to an entity type for periodic data synchronization. A workflow can fill several entity types: create one config per entity type, and set record_filter on each to the records it takes.
POST
/
v2
/
entity-ingestion-configs
Create Entity Ingestion Config
curl --request POST \
--url https://public.api.serval.com/v2/entity-ingestion-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": true,
"syncDeletions": true,
"internalEntityTypeId": "<string>",
"initialFieldMappings": [
{
"internalFieldId": "<string>",
"externalFieldPath": "<string>"
}
],
"syncIntervalSeconds": 123,
"allowCreateNewEntities": true,
"scopedId": "<string>",
"recordFilter": {
"filterGroups": [
{
"filters": [
{
"boolValue": {
"eq": true
},
"fieldId": "<string>",
"fieldKey": "<string>",
"sourcePath": "<string>"
}
],
"sourceFilter": {
"eq": "<string>",
"ne": "<string>"
}
}
]
}
}
'import requests
url = "https://public.api.serval.com/v2/entity-ingestion-configs"
payload = {
"teamId": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": True,
"syncDeletions": True,
"internalEntityTypeId": "<string>",
"initialFieldMappings": [
{
"internalFieldId": "<string>",
"externalFieldPath": "<string>"
}
],
"syncIntervalSeconds": 123,
"allowCreateNewEntities": True,
"scopedId": "<string>",
"recordFilter": { "filterGroups": [
{
"filters": [
{
"boolValue": { "eq": True },
"fieldId": "<string>",
"fieldKey": "<string>",
"sourcePath": "<string>"
}
],
"sourceFilter": {
"eq": "<string>",
"ne": "<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>',
appInstanceId: '<string>',
workflowId: '<string>',
enabled: true,
syncDeletions: true,
internalEntityTypeId: '<string>',
initialFieldMappings: [{internalFieldId: '<string>', externalFieldPath: '<string>'}],
syncIntervalSeconds: 123,
allowCreateNewEntities: true,
scopedId: '<string>',
recordFilter: {
filterGroups: [
{
filters: [
{
boolValue: {eq: true},
fieldId: '<string>',
fieldKey: '<string>',
sourcePath: '<string>'
}
],
sourceFilter: {eq: '<string>', ne: '<string>'}
}
]
}
})
};
fetch('https://public.api.serval.com/v2/entity-ingestion-configs', 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-ingestion-configs",
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>',
'appInstanceId' => '<string>',
'workflowId' => '<string>',
'enabled' => true,
'syncDeletions' => true,
'internalEntityTypeId' => '<string>',
'initialFieldMappings' => [
[
'internalFieldId' => '<string>',
'externalFieldPath' => '<string>'
]
],
'syncIntervalSeconds' => 123,
'allowCreateNewEntities' => true,
'scopedId' => '<string>',
'recordFilter' => [
'filterGroups' => [
[
'filters' => [
[
'boolValue' => [
'eq' => true
],
'fieldId' => '<string>',
'fieldKey' => '<string>',
'sourcePath' => '<string>'
]
],
'sourceFilter' => [
'eq' => '<string>',
'ne' => '<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-ingestion-configs"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"appInstanceId\": \"<string>\",\n \"workflowId\": \"<string>\",\n \"enabled\": true,\n \"syncDeletions\": true,\n \"internalEntityTypeId\": \"<string>\",\n \"initialFieldMappings\": [\n {\n \"internalFieldId\": \"<string>\",\n \"externalFieldPath\": \"<string>\"\n }\n ],\n \"syncIntervalSeconds\": 123,\n \"allowCreateNewEntities\": true,\n \"scopedId\": \"<string>\",\n \"recordFilter\": {\n \"filterGroups\": [\n {\n \"filters\": [\n {\n \"boolValue\": {\n \"eq\": true\n },\n \"fieldId\": \"<string>\",\n \"fieldKey\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"sourceFilter\": {\n \"eq\": \"<string>\",\n \"ne\": \"<string>\"\n }\n }\n ]\n }\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-ingestion-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"appInstanceId\": \"<string>\",\n \"workflowId\": \"<string>\",\n \"enabled\": true,\n \"syncDeletions\": true,\n \"internalEntityTypeId\": \"<string>\",\n \"initialFieldMappings\": [\n {\n \"internalFieldId\": \"<string>\",\n \"externalFieldPath\": \"<string>\"\n }\n ],\n \"syncIntervalSeconds\": 123,\n \"allowCreateNewEntities\": true,\n \"scopedId\": \"<string>\",\n \"recordFilter\": {\n \"filterGroups\": [\n {\n \"filters\": [\n {\n \"boolValue\": {\n \"eq\": true\n },\n \"fieldId\": \"<string>\",\n \"fieldKey\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"sourceFilter\": {\n \"eq\": \"<string>\",\n \"ne\": \"<string>\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/entity-ingestion-configs")
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 \"appInstanceId\": \"<string>\",\n \"workflowId\": \"<string>\",\n \"enabled\": true,\n \"syncDeletions\": true,\n \"internalEntityTypeId\": \"<string>\",\n \"initialFieldMappings\": [\n {\n \"internalFieldId\": \"<string>\",\n \"externalFieldPath\": \"<string>\"\n }\n ],\n \"syncIntervalSeconds\": 123,\n \"allowCreateNewEntities\": true,\n \"scopedId\": \"<string>\",\n \"recordFilter\": {\n \"filterGroups\": [\n {\n \"filters\": [\n {\n \"boolValue\": {\n \"eq\": true\n },\n \"fieldId\": \"<string>\",\n \"fieldKey\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"sourceFilter\": {\n \"eq\": \"<string>\",\n \"ne\": \"<string>\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": true,
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"teamId": "<string>",
"serviceName": "<string>",
"workflowName": "<string>",
"isWorkflowPublished": true,
"hasIngestionContext": true,
"syncDeletions": true,
"internalEntityTypeId": "<string>",
"syncIntervalSeconds": 123,
"allowCreateNewEntities": true,
"ingestionSourceId": "<string>",
"query": {
"filterGroups": [
{
"filters": [
{
"boolValue": {
"eq": true
},
"fieldId": "<string>",
"fieldKey": "<string>",
"sourcePath": "<string>"
}
],
"sourceFilter": {
"eq": "<string>",
"ne": "<string>"
}
}
],
"sorts": [
{
"entitySource": {},
"descending": true
}
]
}
}
}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:write |
| Workspace-scoped API key | entities:write |
| User-based token (OAuth) | Supported, subject to permissions |
- Without initial field mappings: No initial field mappings are supplied. The internal entity type must belong to the requested workspace. The app instance must belong to the requested workspace or be shared with it by another workspace. The workflow must belong to the requested workspace, or be shared with it by the workspace that owns the app instance; for a shared workflow the caller must also have access to it. Metadata-only ingestion requires a connection owned by the workflow’s workspace.
- With initial field mappings: Initial field mappings are supplied. The internal entity type must belong to the requested workspace. The app instance must belong to the requested workspace or be shared with it by another workspace. The workflow must belong to the requested workspace, or be shared with it by the workspace that owns the app instance; for a shared workflow the caller must also have access to it. Metadata-only ingestion requires a connection owned by the workflow’s workspace.
Authorizations
Body
application/json
Optional initial field mappings to create alongside the ingestion config. When provided, field mappings are created automatically so data flows from external fields into entity type fields without requiring separate inference or manual configuration.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Create Entity Ingestion Config
curl --request POST \
--url https://public.api.serval.com/v2/entity-ingestion-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"teamId": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": true,
"syncDeletions": true,
"internalEntityTypeId": "<string>",
"initialFieldMappings": [
{
"internalFieldId": "<string>",
"externalFieldPath": "<string>"
}
],
"syncIntervalSeconds": 123,
"allowCreateNewEntities": true,
"scopedId": "<string>",
"recordFilter": {
"filterGroups": [
{
"filters": [
{
"boolValue": {
"eq": true
},
"fieldId": "<string>",
"fieldKey": "<string>",
"sourcePath": "<string>"
}
],
"sourceFilter": {
"eq": "<string>",
"ne": "<string>"
}
}
]
}
}
'import requests
url = "https://public.api.serval.com/v2/entity-ingestion-configs"
payload = {
"teamId": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": True,
"syncDeletions": True,
"internalEntityTypeId": "<string>",
"initialFieldMappings": [
{
"internalFieldId": "<string>",
"externalFieldPath": "<string>"
}
],
"syncIntervalSeconds": 123,
"allowCreateNewEntities": True,
"scopedId": "<string>",
"recordFilter": { "filterGroups": [
{
"filters": [
{
"boolValue": { "eq": True },
"fieldId": "<string>",
"fieldKey": "<string>",
"sourcePath": "<string>"
}
],
"sourceFilter": {
"eq": "<string>",
"ne": "<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>',
appInstanceId: '<string>',
workflowId: '<string>',
enabled: true,
syncDeletions: true,
internalEntityTypeId: '<string>',
initialFieldMappings: [{internalFieldId: '<string>', externalFieldPath: '<string>'}],
syncIntervalSeconds: 123,
allowCreateNewEntities: true,
scopedId: '<string>',
recordFilter: {
filterGroups: [
{
filters: [
{
boolValue: {eq: true},
fieldId: '<string>',
fieldKey: '<string>',
sourcePath: '<string>'
}
],
sourceFilter: {eq: '<string>', ne: '<string>'}
}
]
}
})
};
fetch('https://public.api.serval.com/v2/entity-ingestion-configs', 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-ingestion-configs",
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>',
'appInstanceId' => '<string>',
'workflowId' => '<string>',
'enabled' => true,
'syncDeletions' => true,
'internalEntityTypeId' => '<string>',
'initialFieldMappings' => [
[
'internalFieldId' => '<string>',
'externalFieldPath' => '<string>'
]
],
'syncIntervalSeconds' => 123,
'allowCreateNewEntities' => true,
'scopedId' => '<string>',
'recordFilter' => [
'filterGroups' => [
[
'filters' => [
[
'boolValue' => [
'eq' => true
],
'fieldId' => '<string>',
'fieldKey' => '<string>',
'sourcePath' => '<string>'
]
],
'sourceFilter' => [
'eq' => '<string>',
'ne' => '<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-ingestion-configs"
payload := strings.NewReader("{\n \"teamId\": \"<string>\",\n \"appInstanceId\": \"<string>\",\n \"workflowId\": \"<string>\",\n \"enabled\": true,\n \"syncDeletions\": true,\n \"internalEntityTypeId\": \"<string>\",\n \"initialFieldMappings\": [\n {\n \"internalFieldId\": \"<string>\",\n \"externalFieldPath\": \"<string>\"\n }\n ],\n \"syncIntervalSeconds\": 123,\n \"allowCreateNewEntities\": true,\n \"scopedId\": \"<string>\",\n \"recordFilter\": {\n \"filterGroups\": [\n {\n \"filters\": [\n {\n \"boolValue\": {\n \"eq\": true\n },\n \"fieldId\": \"<string>\",\n \"fieldKey\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"sourceFilter\": {\n \"eq\": \"<string>\",\n \"ne\": \"<string>\"\n }\n }\n ]\n }\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-ingestion-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"teamId\": \"<string>\",\n \"appInstanceId\": \"<string>\",\n \"workflowId\": \"<string>\",\n \"enabled\": true,\n \"syncDeletions\": true,\n \"internalEntityTypeId\": \"<string>\",\n \"initialFieldMappings\": [\n {\n \"internalFieldId\": \"<string>\",\n \"externalFieldPath\": \"<string>\"\n }\n ],\n \"syncIntervalSeconds\": 123,\n \"allowCreateNewEntities\": true,\n \"scopedId\": \"<string>\",\n \"recordFilter\": {\n \"filterGroups\": [\n {\n \"filters\": [\n {\n \"boolValue\": {\n \"eq\": true\n },\n \"fieldId\": \"<string>\",\n \"fieldKey\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"sourceFilter\": {\n \"eq\": \"<string>\",\n \"ne\": \"<string>\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.serval.com/v2/entity-ingestion-configs")
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 \"appInstanceId\": \"<string>\",\n \"workflowId\": \"<string>\",\n \"enabled\": true,\n \"syncDeletions\": true,\n \"internalEntityTypeId\": \"<string>\",\n \"initialFieldMappings\": [\n {\n \"internalFieldId\": \"<string>\",\n \"externalFieldPath\": \"<string>\"\n }\n ],\n \"syncIntervalSeconds\": 123,\n \"allowCreateNewEntities\": true,\n \"scopedId\": \"<string>\",\n \"recordFilter\": {\n \"filterGroups\": [\n {\n \"filters\": [\n {\n \"boolValue\": {\n \"eq\": true\n },\n \"fieldId\": \"<string>\",\n \"fieldKey\": \"<string>\",\n \"sourcePath\": \"<string>\"\n }\n ],\n \"sourceFilter\": {\n \"eq\": \"<string>\",\n \"ne\": \"<string>\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": true,
"createdAt": "2025-01-15T01:30:15.000Z",
"updatedAt": "2025-01-15T01:30:15.000Z",
"teamId": "<string>",
"serviceName": "<string>",
"workflowName": "<string>",
"isWorkflowPublished": true,
"hasIngestionContext": true,
"syncDeletions": true,
"internalEntityTypeId": "<string>",
"syncIntervalSeconds": 123,
"allowCreateNewEntities": true,
"ingestionSourceId": "<string>",
"query": {
"filterGroups": [
{
"filters": [
{
"boolValue": {
"eq": true
},
"fieldId": "<string>",
"fieldKey": "<string>",
"sourcePath": "<string>"
}
],
"sourceFilter": {
"eq": "<string>",
"ne": "<string>"
}
}
],
"sorts": [
{
"entitySource": {},
"descending": true
}
]
}
}
}
