Pricefx REST API Reference
- Run a Data Load
The Pricefx Backend API
Request
Uploads a chunk (batch) of data from a client resource to the storage reserved for a particular Data Source.
The uploaded data is not immediately transfered to the Data Source database table. Instead it is held (‘buffered’) in a staging area, until an explicit flush command is issued (refer to the /datamart.rundataload endpoint, "type": "DS_FLUSH"), or a Datamart dependent on the Data Source data is refreshed.
Specify header field names (table columns) of the record in the target Data Source.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.loaddata/{datasourceUniqueName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/datamart.loaddata/{datasourceUniqueName}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.loaddata/{datasourceUniqueName}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"header": [
"sku",
"label",
"attribute1",
"attribute2"
],
"options": {
"detectJoinFields": true
},
"data": [
[
"11111",
"Label One",
"EA",
"USD"
],
[
"22222",
"Label Two",
"EA",
"EUR"
],
[
"33333",
"Label Three",
"EA",
"CZK"
]
]
}
}'{ "response": { "node": "string", "data": [ … ], "status": 0 } }
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.rundataload
- URL:https://companynode.pricefx.com/pricefx/companypartition/datamart.rundataload
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.rundataload \
-H 'Content-Type: application/json' \
-d '{
"data": {
"version": 0,
"typedId": "2147483666.DMDL",
"label": "Product",
"type": "DS_FLUSH",
"targetName": "DMDS.Product",
"sourceName": "DMF.Product",
"withTargetSnapshot": false,
"schedules": [],
"numberOfItems": 0,
"calculationConfig": {
"feederInputParams": [],
"inputParams": [],
"mappingParams": [],
"outputElements": []
},
"requestTime": 1488985402000,
"lastUpdateTime": 1488985402000,
"createDate": "2017-03-08T15:03:22",
"createdBy": 2147483649,
"lastUpdateDate": "2017-03-08T15:03:22",
"lastUpdateBy": 2147483649,
"status": "DRAFT",
"isDefault": true,
"incremental": true,
"distributed": false,
"continuous": false,
"valid": true,
"isPlasma": false,
"incLoadDate": "2021-12-09T11:08:01.600Z"
}
}'{ "response": { "node": "string", "data": [ … ], "status": 0 } }
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.updatedataload
- URL:https://companynode.pricefx.com/pricefx/companypartition/datamart.updatedataload
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.updatedataload \
-H 'Content-Type: application/json' \
-d '{
"data": {
"version": 2,
"typedId": "2147484683.DMDL",
"label": "DL01",
"type": "DS_PRODUCTS",
"targetName": "DMDS.DS001",
"withTargetSnapshot": false,
"calcItemsLookupTableId": 2147484066,
"schedules": [],
"numberOfItems": 0,
"calculationConfig": {
"feederInputParams": [],
"inputParams": [],
"mappingParams": [],
"outputElements": []
},
"requestTime": 1638456932000,
"lastUpdateTime": 1638456932000,
"createDate": "2021-12-02T14:55:32",
"createdBy": 2147490696,
"lastUpdateDate": "2021-12-02T14:55:32",
"lastUpdateBy": 2147490696,
"status": "DRAFT",
"isDefault": false,
"incremental": true,
"distributed": false,
"continuous": false,
"valid": false,
"isPlasma": false
}
}'{ "response": { "node": "pricefx-cluster-app-frontend-f465f654b-wjkpv", "data": [ … ], "status": 0 } }
See the Key-Value Database Storage Knowledge Base article for more details.
Here you can find all fields of the corresponding entity (represented by the type code).
Use the /metadata.describe endpoint to find out the correct data type of the field that is used in your partition.
Comments