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:
- start — Initiate a new data enqueue operation
- append — Add additional records to the enqueue operation
- status — Check operation progress
- cancel — Abort the operation
Endpoints
/api/v2/SourcingData/EnqueueData— List enqueue operations/api/v2/SourcingData/EnqueueData/start— Start new enqueue operation/api/v2/SourcingData/EnqueueData/append— Append records to operation/api/v2/SourcingData/EnqueueData/{operationId}/status— Get operation status/api/v2/SourcingData/EnqueueData/{operationId}/cancel— Cancel operation
Query Parameters: /api/v2/SourcingData/EnqueueData/start (POST)
| Parameter | Type | Required | Description |
|---|---|---|---|
SourceId | string (uuid) | Yes | The data-source identifier |
clientId | string | No | Client/tenant identifier |
operationId | string | No | Explicit operation context identifier |
Query Parameters: /api/v2/SourcingData/EnqueueData/append (POST)
| Parameter | Type | Required | Description |
|---|---|---|---|
SourceId | string (uuid) | Yes | The data-source identifier |
clientId | string | No | Client/tenant identifier |
operationId | string | Yes | The operation identifier to append to |
Query Parameters: /api/v2/SourcingData/EnqueueData/{operationId}/status (GET)
| Parameter | Type | Required | Description |
|---|---|---|---|
operationId | string | Yes (path) | The operation identifier |
SourceId | string (uuid) | No | The data-source identifier |
clientId | string | No | Client/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
| Property | Type | Description |
|---|---|---|
sourceFieldName | string | Field name in source system |
modelFieldName | string | Corresponding field in target data-model |
transformationType | enum | Transformation: None, Trim, UpperCase, LowerCase, CustomCode |
transformationCode | string | Custom transformation code (for transformationType=CustomCode) |
isKey | boolean | Field is a record key |
isReferenceId | boolean | Field serves as reference identifier |
isExternalId | boolean | Field is external system identifier |
isMandatory | boolean | Field is required |
isTransient | boolean | Field not persisted |
EdgeDataRecord Properties
| Property | Type | Description |
|---|---|---|
recordId | string (uuid) | Internal record identifier (null for new records) |
externalId | string | External system record identifier |
referenceId | string | Reference identifier for lookups |
fields | object | Field name → value mappings |
isNew | boolean | Record is newly created (not yet in system) |
isDeleted | boolean | Record should be soft-deleted |
isModified | boolean | Record has been changed |
skipValidation | boolean | Skip field validations |
skipNotifications | boolean | Skip trigger notifications |
targetSourceId | string (uuid) | Target source override (optional) |
parentRecordId | string (uuid) | Parent record reference (for hierarchical models) |
createdAt | string (ISO 8601) | Record creation timestamp |
modifiedAt | string (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:
- Call
startto initiate - Call
append(zero or more times) to add records - Call
statusto verify completion - Call
cancelonly if aborting is needed
References
- DataService REST API
- QueryingData API — Complementary data querying
- DataModels API — Model structure definitions