End Streaming Dimension Build
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/dimbuild/{streamId}
Ends an incremental dimension build and triggers a restructuring of the cube.
Request
- application/json
- application/xml
-
applicationName(required): string
Application name.
-
databaseName(required): string
Database name.
-
streamId(required): string
Stream ID.
Response
- application/json
- application/xml
200 Response
OK
Dimension build ended successfully; includes status.
400 Response
Bad Request
Failed to end dimension build. The stream ID may be invalid.
500 Response
Internal Server Error.
Examples
The following example shows you how to perform a streaming dimension build to an Essbase cube outline. The Start Streaming Dimension Build call generates a stream ID that is consumed by the subsequent calls in the workflow. Therefore, the calls need to be issued in same HTTP session. Because the REST API is stateless, you must pass information between calls using a cookie. In this example, cookies are stored using the --cookie-jar
(or -c
) option for each call that needs to pass a cookie to the next call.
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 Streaming Dimension Build
The cURL statement starts the incremental dimension build process.
call properties.bat
curl --cookie-jar cookies.txt -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild?links=none" -H Accept:application/json -H Content-Type:application/json -d '{"ruleFileName": "Dim_Market"}' -u %User%:%Password%
Response
The JSON response includes a unique stream ID.
{
"streamId" : "346850608"
}
Start Dimension Build
The cURL statement uses the stream ID from the first call to allocate a rule file for the incremental dimension build.
call properties.bat
curl -b cookies.txt -c cookies.txt -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608/Dim_Market" -H Accept:application/json -H Content-Type:application/json -u %User%:%Password%
Response
{
"links" : [ {
"rel" : "pushData",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608",
"method" : "POST"
} ]
}
Push Dimensions
The cURL statement uses the stream ID from the first call to push comma-separated data to build dimensions in the cube outline.
call properties.bat
curl -b cookies.txt -c cookies.txt -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608" -H Content-Type:text/plain --data-binary "@./Dim_Market.txt" -u %User%:%Password%
Response
{
"links" : [ {
"rel" : "pushData",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608",
"method" : "POST"
}, {
"rel" : "endDimensionBuild",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608/Dim_Market",
"method" : "DELETE"
} ]
}
End Dimension Build
The cURL statement ends the dimension build, using the stream ID from the first call to deallocate the rule file.
call properties.bat
curl -b cookies.txt -c cookies.txt -X DELETE "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608/Dim_Market" -H Accept:application/json -H Content-Type:application/json -u %User%:%Password%
Response
{
"status" : "Dimension build completed successfully",
"links" : [ {
"rel" : "restructureCube",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608",
"method" : "DELETE"
} ]
}
End Streaming Dimension Build
The cURL statement uses the stream ID to end the incremental dimension build process and trigger an outline restructure.
call properties.bat
curl -b cookies.txt -c cookies.txt -X DELETE "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608" -H Accept:application/json -H Content-Type:application/json -u %User%:%Password%
Response
{
"status" : "Cube restructure completed successfully"
}