Přeskočit na hlavní obsah
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

DataService API v2 — SourcingData

Base URL

  • https://demo.avaplace.com/api/asol/ds

Authentication

  • OAuth2 Bearer token required (scope: apiim)
  • See DataService-API.md for token acquisition

Overview

SourcingData endpoints manage the data enqueue workflow for pushing data from external sources. The workflow follows a multi-step process:

  1. start — Initiate a new data enqueue operation
  2. append — Add additional records to the enqueue operation
  3. status — Check operation progress
  4. cancel — Abort the operation

Endpoints

  • GET /api/v2/SourcingData/EnqueueData — List enqueue operations
  • POST /api/v2/SourcingData/EnqueueData/start — Start new enqueue operation
  • POST /api/v2/SourcingData/EnqueueData/append — Append records to operation
  • GET /api/v2/SourcingData/EnqueueData/{operationId}/status — Get operation status
  • POST /api/v2/SourcingData/EnqueueData/{operationId}/cancel — Cancel operation

Query Parameters: /api/v2/SourcingData/EnqueueData/start (POST)

ParameterTypeRequiredDescription
SourceIdstring (uuid)YesThe data-source identifier
clientIdstringNoClient/tenant identifier
operationIdstringNoExplicit operation context identifier

Query Parameters: /api/v2/SourcingData/EnqueueData/append (POST)

ParameterTypeRequiredDescription
SourceIdstring (uuid)YesThe data-source identifier
clientIdstringNoClient/tenant identifier
operationIdstringYesThe operation identifier to append to

Query Parameters: /api/v2/SourcingData/EnqueueData/{operationId}/status (GET)

ParameterTypeRequiredDescription
operationIdstringYes (path)The operation identifier
SourceIdstring (uuid)NoThe data-source identifier
clientIdstringNoClient/tenant identifier

Request Body: EdgeDataRecordEdgeDataCollection

Structure for POST requests (/start and /append):

{
"modelId": "<uuid>",
"mappingDirectives": [
{
"sourceFieldName": "<string>",
"modelFieldName": "<string>",
"transformationType": "None|Trim|UpperCase|LowerCase|CustomCode",
"transformationCode": "<string or null>",
"isKey": false,
"isReferenceId": false,
"isExternalId": false,
"isMandatory": false,
"isTransient": false
}
],
"data": [
{
"recordId": "<uuid or null>",
"externalId": "<string or null>",
"referenceId": "<string or null>",
"fields": {
"<fieldName>": "<value>",
"<fieldName2>": null
},
"isNew": true,
"isDeleted": false,
"isModified": true,
"skipValidation": false,
"skipNotifications": false,
"targetSourceId": "<uuid or null>",
"parentRecordId": "<uuid or null>",
"createdAt": "2024-01-01T10:00:00Z",
"modifiedAt": "2024-01-01T10:00:00Z"
}
]
}

EdgeDataMappingDirective Properties

PropertyTypeDescription
sourceFieldNamestringField name in source system
modelFieldNamestringCorresponding field in target data-model
transformationTypeenumTransformation: None, Trim, UpperCase, LowerCase, CustomCode
transformationCodestringCustom transformation code (for transformationType=CustomCode)
isKeybooleanField is a record key
isReferenceIdbooleanField serves as reference identifier
isExternalIdbooleanField is external system identifier
isMandatorybooleanField is required
isTransientbooleanField not persisted

EdgeDataRecord Properties

PropertyTypeDescription
recordIdstring (uuid)Internal record identifier (null for new records)
externalIdstringExternal system record identifier
referenceIdstringReference identifier for lookups
fieldsobjectField name → value mappings
isNewbooleanRecord is newly created (not yet in system)
isDeletedbooleanRecord should be soft-deleted
isModifiedbooleanRecord has been changed
skipValidationbooleanSkip field validations
skipNotificationsbooleanSkip trigger notifications
targetSourceIdstring (uuid)Target source override (optional)
parentRecordIdstring (uuid)Parent record reference (for hierarchical models)
createdAtstring (ISO 8601)Record creation timestamp
modifiedAtstring (ISO 8601)Record modification timestamp

Examples

Start enqueue operation

curl

curl -X POST "https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/start?SourceId=<sourceId>" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"modelId": "<modelId>",
"mappingDirectives": [
{
"sourceFieldName": "Name",
"modelFieldName": "CompanyName",
"transformationType": "Trim",
"isKey": false,
"isMandatory": true
},
{
"sourceFieldName": "Code",
"modelFieldName": "CompanyCode",
"transformationType": "UpperCase",
"isKey": true
}
],
"data": [
{
"externalId": "EXT-001",
"fields": {
"CompanyName": "ACME Corporation",
"CompanyCode": "ACME",
"Address": "123 Main St"
},
"isNew": true
},
{
"externalId": "EXT-002",
"fields": {
"CompanyName": "Tech Solutions Ltd",
"CompanyCode": "TECH",
"Address": "456 Oak Ave"
},
"isNew": true
}
]
}'

PowerShell

$uri = 'https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/start?SourceId=<sourceId>'

$body = @{
modelId = '<modelId>'
mappingDirectives = @(
@{
sourceFieldName = 'Name'
modelFieldName = 'CompanyName'
transformationType = 'Trim'
isKey = $false
isMandatory = $true
},
@{
sourceFieldName = 'Code'
modelFieldName = 'CompanyCode'
transformationType = 'UpperCase'
isKey = $true
}
)
data = @(
@{
externalId = 'EXT-001'
fields = @{
CompanyName = 'ACME Corporation'
CompanyCode = 'ACME'
Address = '123 Main St'
}
isNew = $true
},
@{
externalId = 'EXT-002'
fields = @{
CompanyName = 'Tech Solutions Ltd'
CompanyCode = 'TECH'
Address = '456 Oak Ave'
}
isNew = $true
}
)
} | ConvertTo-Json -Depth 10

Invoke-RestMethod -Method Post `
-Uri $uri `
-Headers @{
Authorization = "Bearer $accessToken"
'Content-Type' = 'application/json'
} `
-Body $body

Postman

  • Method: POST
  • URL: {{baseUrl}}/api/v2/SourcingData/EnqueueData/start
  • Params: SourceId=<sourceId>
  • Body (raw, JSON):
    {
    "modelId": "<modelId>",
    "mappingDirectives": [
    {
    "sourceFieldName": "Name",
    "modelFieldName": "CompanyName",
    "transformationType": "Trim",
    "isKey": false,
    "isMandatory": true
    }
    ],
    "data": [
    {
    "externalId": "EXT-001",
    "fields": {
    "CompanyName": "ACME Corporation",
    "CompanyCode": "ACME"
    },
    "isNew": true
    }
    ]
    }
  • Authorization: Bearer Token

Append records to operation

curl

curl -X POST "https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/append?SourceId=<sourceId>&operationId=<operationId>" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"modelId": "<modelId>",
"mappingDirectives": [],
"data": [
{
"externalId": "EXT-003",
"fields": {
"CompanyName": "Global Industries",
"CompanyCode": "GLBL"
},
"isNew": true
}
]
}'

PowerShell

$uri = 'https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/append?SourceId=<sourceId>&operationId=<operationId>'

$body = @{
modelId = '<modelId>'
mappingDirectives = @()
data = @(
@{
externalId = 'EXT-003'
fields = @{
CompanyName = 'Global Industries'
CompanyCode = 'GLBL'
}
isNew = $true
}
)
} | ConvertTo-Json -Depth 10

Invoke-RestMethod -Method Post `
-Uri $uri `
-Headers @{
Authorization = "Bearer $accessToken"
'Content-Type' = 'application/json'
} `
-Body $body

Check operation status

curl

curl -X GET "https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/<operationId>/status?SourceId=<sourceId>" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json"

PowerShell

$uri = 'https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/<operationId>/status?SourceId=<sourceId>'

Invoke-RestMethod -Method Get `
-Uri $uri `
-Headers @{ Authorization = "Bearer $accessToken"; Accept = 'application/json' }

Cancel operation

curl

curl -X POST "https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/<operationId>/cancel?SourceId=<sourceId>" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"

PowerShell

$uri = 'https://demo.avaplace.com/api/asol/ds/api/v2/SourcingData/EnqueueData/<operationId>/cancel?SourceId=<sourceId>'

Invoke-RestMethod -Method Post `
-Uri $uri `
-Headers @{ Authorization = "Bearer $accessToken"; 'Content-Type' = 'application/json' } `
-Body '{}'

Notes

fields vs data property: The fields object contains field name → value mappings. The legacy data property (if present in responses) contains serialized field values and should not be used for new requests—use only fields.

Workflow Order: Always follow the sequence:

  1. Call start to initiate
  2. Call append (zero or more times) to add records
  3. Call status to verify completion
  4. Call cancel only if aborting is needed

References