Start Streaming Dimension Build

post

/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/dimbuild

Starts an incremental dimension build to push metadata to an Essbase outline. This call generates a unique stream ID that is consumed by subsequent calls in this order:

  1. Start Dimension Build
  2. Push Dimensions
  3. End Dimension Build
  4. End Streaming Dimension Build

Request

Supported Media Types
Path Parameters
Body ()

Dimension build attributes, such as the restructure option. If empty, the default value for restructure option is PRESERVE_ALL_DATA.

Root Schema : DimBuildStartPayload
Type: object
Show Source
  • Allowed Values: [ "PRESERVE_ALL_DATA", "PRESERVE_LEAFLEVEL_DATA", "PRESERVE_INPUT_DATA", "PRESERVE_NO_DATA" ]

    Restructure option. PRESERVE_ALL_DATA to preserve all existing data (this is the default), PRESERVE_NO_DATA to discard all existing data, PRESERVE_LEAFLEVEL_DATA to preserve existing level 0 blocks (applicable to block storage only), PRESERVE_INPUT_DATA to preserve existing input-level blocks (applicable to block storage only).

Back to Top

Response

Supported Media Types

200 Response

OK

Dimension build started successfully; includes unique stream id which can be passed to subsequent requests. If links=true parameter is passed, also includes links to start dimension build with rules file.

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

400 Response

Bad Request

The logged in user may not have the appropriate application role.

500 Response

Internal Server Error.

Back to Top

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"
}
Back to Top