Push Data

post

/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/dataload/{streamId}

Pushes data for data load. Data can be pushed in chunks in CSV format by repeating this request multiple times.

Request

Supported Media Types
Path Parameters
Body ()

Comma-separated data.

Root Schema : schema
Type: string
Back to Top

Response

Supported Media Types

200 Response

OK

Data pushed successfully; includes links to push more data and end data load if links=true parameter is passed.

Body ()
Root Schema : StreamProcessStartResponse
Type: object
Show Source

400 Response

Bad Request

Failed to push data. The stream ID may be invalid.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows you how to perform a streaming data load to an Essbase cube. The Start Data Load call generates a stream ID that is consumed by the Push Data and End Data Load calls. Therefore, the calls need to be issued in same HTTP session. Because the REST API is stateless, you must store the information using a cookie. In this example, cookies are stored using the --cookie-jar option.

This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.

Start Data Load

The cURL statement starts a streaming data load.

call properties.bat
curl --cookie-jar cookies.txt -X POST https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dataload -H Accept:application/json -H Content-Type:application/json -d '{"ruleFileName": "Data"}' -u %User%:%Password%

Response

The JSON response includes a unique stream ID.

{
  "streamId" : "178641591",
  "links" : [ {
    "rel" : "pushData",
    "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dataload/178641591",
    "method" : "POST"
  } ]
}

Push Data

The cURL statement uses the stream ID from the first call to push comma-separated data from the text file into the Sample Basic cube.

call properties.bat
curl -X POST -b cookies.txt https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dataload/178641591 -H Content-Type:text/plain --data-binary "@./Data_Basic.txt" -u %User%:%Password%

Response

{
  "links" : [ {
    "rel" : "pushData",
    "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dataload/178641591",
    "method" : "POST"
  }, {
    "rel" : "endDataLoad",
    "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dataload/178641591",
    "method" : "DELETE"
  } ]
}

End Data Load

The cURL statement uses the stream ID to end the streaming data load process.

call properties.bat
curl -X DELETE -b cookies.txt https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dataload/178641591 -u %User%:%Password%

Response

{
  "status" : "Data load completed successfully"
}
Back to Top