Data Extract
Oracle WMS now supports the use of a REST API to extract data to your preferred object store by configuring the Endpoints UI.
To use the REST API for Object Store, we’ve introduced a new Endpoints Interface Protocol called “Objectstore for Data Extract”. The same service providers that are supported in Endpoint for Output Interfaces are supported here as well.
You can configure your selected service provider’s specific set of fields/parameters to setup the Endpoints for Data Extract. The following table lists the fields/parameters you can configure for each of the supported cloud storage service providers:
CLOUD STORAGE SERVICE PROVIDER | REQUIRED OR CONFIGURABLE FIELDS/PARAMETERS |
---|---|
Object Storage (OCI) |
|
Cloud Storage (GCS) | Bucket URL |
Simple Storage Service (AWS S3) |
|
Binary Large Object Storage (Azure BLOB) |
|
You can click the “Provider Configuration” button on the Endpoints UI and the system displays a set of service provider-specific information. This can be used by the cloud storage service provider to allow WMS target access for data extraction.
After you click the Provider Configuration button, the system displays the relevant configuration info for the selected service provider as follows:
CLOUD STORAGE SERVICE PROVIDER | SERVICE PROVIDER CONFIGURATION INFO |
---|---|
Object Storage (OCI) |
|
Cloud Storage (GCS) | Service Account |
Simple Storage Service (AWS S3) |
NOTE: The External ID needs to be configured as the Database OCID in the Trust Relationship.
|
Binary Large Object Storage (Azure BLOB) |
|
-
Refer to your respective cloud storage service provider’s guidelines and requirements for the credentials/parameters.
-
You can set the data extract file size ranging from 10 MB to 1 GB using the API. By default, the file size is 10 MB.
-
If any object store credentials are inputted incorrectly, the system will display an error dialog box: “Invalid data configured for: %FIELDS%".
-
If any mandatory fields are not configured, the system will display an error dialog box: "The following mandatory fields cannot be left blank: "%s List of mandatory parameters not configured %s".
Using the new API, you can extract entity-level data and push it to the configured Object Store via files in CSV, JSON or parquet formats.
Push to Object Store API URL
POST .../wms/lgfapi/v10/data_extract/push_to_object_store
Example Body
{
"options": {
"endpoint": {
"name": "dummy_endpoint",
"object_store_path": "Folder1/Folder2"
},
"file_format": "CSV",
"file_size_in_mb": 10,
"compressed": "true",
"unique_identifier": "uniqueidentifier_01"
},
"parameters": {
"entities": [
{
"entity": "inventory",
"fields": "item_id",
"filter": {
"create_ts__gt": "2024-10-01T00:00:00.000",
"status_id__lt": 90
}
},
{
"entity": "container",
"fields": "container_nbr,rcvd_ts,curr_location_id",
"filter": {
"mod_ts__gt": "2024-10-01T00:00:00.000",
"status_id__lt": 90
}
}
]
}
}
Sample Response
{
"response_check_url": ".../wms/lgfapi/v10/data_extract/export_async_status?unique_identifier=uniqueidentifier_01",
"inventory": {
"task_id": "b3cae633-b893-4e40-aefe-c037b79c2b81",
"entity_status_url": ".../wms/lgfapi/v10/entity/lgf_async_task?backend_taskid__taskid=b3cae633-b893-4e40-aefe-c037b79c2b81"
},
"container": {
"task_id": "b897ee89-2346-4d10-92a5-48572b0771c4",
"entity_status_url": ".../wms/lgfapi/v10/entity/lgf_async_task?backend_taskid__taskid=b897ee89-2346-4d10-92a5-48572b0771c4"
}
}
-
The Unique Identifier is required to group the set of entities in the payload. So, it is mandatory to specify a unique identifier for each API call.
-
The REST API supports only three filters, namely "create_ts__gt", "mod_ts__gt" and "status_id__lt". Entries for "create_ts__gt" and "mod_ts__gt" filters cannot be given simultaneously per entity. However, specifying atleast one of them is mandatory.
-
The timestamps in the API call should be specified only in UTC since the API is agnostic of the facility time zone.
Async Data Extract Flag
The “async data extract” flag allows select users to perform data extract using the API. By default, this is set as False (unchecked) in the Users UI. For data extraction, the checkbox for the async data extract flag needs to be enabled.
You can apply facility/company filtering in the query (if required), since the API is targeted towards a table-level data extract.
Export Async Status API
You can use the Export Async Status API call to check the status of the aggregated task and the system will return status results like “PENDING”, “RUNNING”, “SUCCEEDED” and “FAILED”.
URL
GET .../wms/lgfapi/v10/data_extract/export_async_status?unique_identifier=uniqueidentifier_01
Sample Response
{
"unique_identifier": "uniqueidentifier_01",
"cummulative_status": "SUCCESS",
"total_duration": 2.550852,
"entities": [
{
"inventory": {
"task_id": "b3cae633-b893-4e40-aefe-c037b79c2b81",
"file_prefix": "data_ocwms_uniqueidentifier_01_inventory_b3cae633-b893-4e40-aefe-c037b79c2b81",
"status": "SUCCESS",
"message": null,
"total_duration": 1.120942
}
},
{
"container": {
"task_id": "b897ee89-2346-4d10-92a5-48572b0771c4",
"file_prefix": "data_ocwms_uniqueidentifier_01_container_b897ee89-2346-4d10-92a5-48572b0771c4",
"status": "SUCCESS",
"message": null,
"total_duration": 1.165918
}
}
]
}
Async Task Status - Entity Level
You can use this API call to check the async task status at the entity-level.
HEAD .../lgfapi/v10/entity/lgf_async_task/{id}
You can also GET APIs to fetch results ordered by the following criteria:
For paginated results:
GET .../lgfapi/v10/entity/lgf_async_task/
For non-paginated results, filtered by specific 'ID':
GET .../lgfapi/v10/entity/lgf_async_task/{id}