Pricefx REST API Reference
- Restore Default Data Sources
The Pricefx Backend API
Request
Exports the specified Datamart source. Typically used in an integration scenario (IM) for a given customer. The request’s body can contain a data block with a regular filter criteria definition (as, for example, used in the JSON API fetch commands), to filter the output rows.
If the Analytics database for the parition is hosted in AWS, the export file(s) will be transferred to the corresponding S3 bucket, ready for retrieval using the datamart.fetchexportfile (Get a DM Export File) endpoint. Otherwise the files are put in the local file system of the node that handles the request:
default path: server/temp/<node>/export/<partition>/
If needed, a different, absolute path can be set using an instance parameter:
datamart.database.export.path
Data is exported in the CSV format, and is always gzip-compressed. Character encoding is always UTF-8. There is no client side encryption.
A suffix appended to the standard output file name: <typeCode>_<sourceUniqueName>_<suffix>.csv.gz
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.export/{fcTypedIdOrSourceName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/datamart.export/{fcTypedIdOrSourceName}
- 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.export/DMDS.SegmentPrices?suffix=string&maxRows=string' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"criteria": [
{
"operator": "string",
"fieldName": "string",
"value": "string"
}
],
"operator": "string"
}
}'{ "response": { "node": "string", "data": [ … ], "status": 0 } }
Request
Creates a default Data Source (Product, Customer, Unit of Measures, Currencies, or Calendar). Use this endpoint if default Data Sources have not been created when setting up the partition.
Note: When no path parameter is passed, all default Data Sources are dropped and recreated - any data will be lost. Othwerise, only the Data Source indicated by the path param is dropped and recreated.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.restoredefaultds/{dataSourceName}
- URL:https://companynode.pricefx.com/pricefx/companypartition/datamart.restoredefaultds/{dataSourceName}
- 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.restoredefaultds/{dataSourceName}'Request
Uploads a file to the Data Manager (specified by typeId in the path parameter).
To import data into FieldCollection (DMT or DMDS), use the
datamart.loadfc/{typedId}endpoint.Follow these steps to upload a file:
- Create an upload slot and retrieve the slotId using the /uploadmanager.newuploadslot endpoint (see Product Image > 1. Create an Upload Slot).
- Upload the file using the /datamart.importfile/{slotId}/{typedId} endpoint.
When importing a CSV file, it is possible to include more information than just a column name.
Example:
columName1:NUMBER:KEY,columnName2:TEXT:DIM,columnName3:NUMBER
a,1,0.5
b,1,0.6
c,2,1.2
d,3,2.0In the example above you can see that columnName1 column should be the NUMBER field type and also the key (KEY).
The columnName2 column should be the TEXT type and a dimension (DIM).
The columnName3 column should be a NUMBER.
Possible field types: BOOLEAN, CURRENCY, DATE, DATETIME, INTEGER, LOB, MONEY, NUMBER, QUANTITY, TEXT, UOM
Information: When using datamart.importfile to upload a file with huge numbers (20+ significant decimal digits) it is recommended to use the Avro format. In CSV and XLSX files, you can use numbers within the double type or long type ranges.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/datamart.importfile/{slotId}/{typedId}
- URL:https://companynode.pricefx.com/pricefx/companypartition/datamart.importfile/{slotId}/{typedId}
- 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.importfile/{slotId}/2147483847.DMDS'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