ディメンションのプッシュ
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/dimbuild/{streamId}
ストリーミング・ディメンション構築のためにデータをプッシュします。
リクエスト
- text/plain
- text/csv
- applicationName(required): string
アプリケーション名。
- databaseName(required): string
データベース名。
- streamId(required): string
ストリームID。
CSVデータ。
string
レスポンス
- application/json
- application/xml
200 レスポンス
OK
データが正常にプッシュされました。links=true
パラメータが渡された場合は、データをさらにプッシュするためとディメンションの構築を終了するためのリンクが含まれます。
400 レスポンス
不正なリクエスト
データのプッシュに失敗しました。ストリームIDが無効か、ディメンション構築が開始されていない可能性があります。
500 レスポンス
サーバーの内部エラーです。
例
次の例では、Essbaseキューブ・アウトラインへのストリーミング・ディメンション構築を実行する方法を示します。「ストリーミング・ディメンション構築の開始」呼出しにより、ワークフロー内の後続の呼出しで使用されるストリームIDが生成されます。そのため、呼出しは同じHTTPセッションで発行される必要があります。REST APIはステートレスであるため、Cookieを使用して呼出し間で情報を渡す必要があります。この例では、Cookieをその次の呼出しに渡す必要がある呼出しごとに、--cookie-jar
(または-c
)オプションを使用して、Cookieを格納します。
この例では、cURLを使用して、Windowsシェル・スクリプトからREST APIにアクセスします。呼出し元ユーザーのIDおよびパスワードは変数であり、properties.bat
内でその変数値が設定されています。
ストリーミング・ディメンション構築の開始
cURL文で増分ディメンション構築プロセスを開始します。
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%
レスポンス
JSONレスポンスに一意のストリームIDが含まれます。
{
"streamId" : "346850608"
}
ディメンション構築の開始
cURL文で最初の呼出しのストリームIDを使用して、増分ディメンション構築用にルール・ファイルを割り当てます。
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%
レスポンス
{
"links" : [ {
"rel" : "pushData",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/dimbuild/346850608",
"method" : "POST"
} ]
}
ディメンションのプッシュ
cURL文で最初の呼出しのストリームIDを使用して、カンマ区切りデータをプッシュし、キューブ・アウトライン内にディメンションを構築します。
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%
レスポンス
{
"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"
} ]
}
ディメンション構築の終了
cURL文で最初の呼出しのストリームIDを使用して、ルール・ファイルの割当を解除し、ディメンション構築を終了します。
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%
レスポンス
{
"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"
} ]
}
ストリーミング・ディメンション構築の終了
cURL文でストリームIDを使用して、増分ディメンション構築プロセスを終了し、アウトライン再構築をトリガーします。
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%
レスポンス
{
"status" : "Cube restructure completed successfully"
}