計算またはMDXスクリプトの取得
get
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/scripts/{scriptName}
指定されたアプリケーションおよびデータベースから、指定された計算またはMDXスクリプトを返します。
リクエスト
パス・パラメータ
- applicationName(required): string
アプリケーション名。
- databaseName(required): string
データベース名。
- scriptName(required): string
スクリプト名。
問合せパラメータ
- file: string
スクリプト・ファイルのタイプ。
デフォルト値:calc
レスポンス
サポートされているメディア・タイプ
- application/json
- application/xml
200 レスポンス
OK
スクリプトが正常に返されました。スクリプトを取得、編集または削除するためのリンク、およびその内容を取得するためのリンクが含まれています。
400 レスポンス
不正なリクエスト
スクリプトの取得に失敗しました。アプリケーション名、データベース名またはスクリプト名が正しくない可能性があります。
500 レスポンス
サーバーの内部エラーです。
例
次の例では、Essbase計算またはMDXスクリプトを取得する方法を示します。
この例では、cURLを使用して、Windowsシェル・スクリプトからREST APIにアクセスします。呼出し元ユーザーのIDおよびパスワードは変数であり、properties.bat
内でその変数値が設定されています。
計算スクリプトの取得
call properties.bat
curl -X GET https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata -H "accept: application/json" -u %User%:%Password%
レスポンス本体の例
{
"name" : "copydata",
"modifiedTime" : 1704734260799,
"sizeInBytes" : 194,
"links" : [ {
"rel" : "get",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata",
"method" : "GET"
}, {
"rel" : "delete",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata",
"method" : "DELETE"
}, {
"rel" : "edit",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata",
"method" : "PUT"
}, {
"rel" : "content",
"href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/copydata/content",
"method" : "GET"
} ]
}
MDXスクリプトの取得
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/mdx001?file=mdx&links=none" -H "accept: application/json" -u %User%:%Password%
レスポンス本体の例
{
"name" : "mdx001",
"modifiedTime" : 1717699870473,
"sizeInBytes" : 185
}