Create Entity Ingestion Config
Create an entity ingestion config that links a workflow to an entity type for periodic data synchronization.
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": "<unknown>"
}
'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": "<unknown>"
}
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: '<unknown>'
})
};
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' => '<unknown>'
]),
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\": \"<unknown>\"\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\": \"<unknown>\"\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\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"teamId": "<string>",
"serviceName": "<string>",
"workflowName": "<string>",
"isWorkflowPublished": true,
"hasIngestionContext": true,
"syncDeletions": true,
"internalEntityTypeId": "<string>",
"syncIntervalSeconds": "<unknown>"
}
}{
"message": "<string>",
"detail": {
"type": "<string>",
"value": "<string>",
"debug": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The ID of the team.
The ID of the app instance (e.g., a ServiceNow connection).
The ID of the workflow that performs the entity sync.
Whether the ingestion config is enabled. Defaults to true.
Whether to sync deletions. Defaults to false.
The entity type ID that this ingestion populates.
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
Minimum interval between scheduled syncs, in seconds. Unset means "auto" (platform default cadence).
Response
Success
The created ingestion config.
Show child attributes
Show child attributes
Was this page helpful?
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": "<unknown>"
}
'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": "<unknown>"
}
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: '<unknown>'
})
};
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' => '<unknown>'
]),
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\": \"<unknown>\"\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\": \"<unknown>\"\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\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"appInstanceId": "<string>",
"workflowId": "<string>",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"teamId": "<string>",
"serviceName": "<string>",
"workflowName": "<string>",
"isWorkflowPublished": true,
"hasIngestionContext": true,
"syncDeletions": true,
"internalEntityTypeId": "<string>",
"syncIntervalSeconds": "<unknown>"
}
}{
"message": "<string>",
"detail": {
"type": "<string>",
"value": "<string>",
"debug": {}
}
}
