スクリプトのリスト

get

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

指定されたEssbaseアプリケーションおよびキューブから計算、MDX、MaxLまたはレポート・ライター・スクリプトを返します。

データ・ロード・ルールまたはディメンション構築ルールをリストするには、「ファイルのリストまたはダウンロード」を使用します。ドリル・スルー・レポートをリストするには、「複数のドリル・スルー・レポートの取得」を使用します。

リクエスト

パス・パラメータ
問合せパラメータ
  • 返すスクリプト・ファイルのタイプ。有効な値: calcmdxmaxlおよびreport。指定されていない場合、デフォルト値はcalcです。

    デフォルト値: calc
  • キーワードを使用してスクリプトのリストをフィルタします。

先頭に戻る

レスポンス

サポートされているメディア・タイプ

200 レスポンス

OK

スクリプトを正常に取得しました。スクリプト詳細、スクリプトを取得、編集または削除するためのリンク、その内容を取得するためのリンクが含まれています。

本体()
ルート・スキーマ : schema
型: array
ソースの表示
ネストされたスキーマ : ScriptList
型: object
ソースの表示
ネストされたスキーマ : items
型: array
ソースの表示
ネストされたスキーマ : properties
型: object
使用可能なその他のプロパティ
ソースの表示
ネストされたスキーマ : Script
型: object
ソースの表示

400 レスポンス

不正なリクエスト

スクリプトの取得に失敗しました。アプリケーション名またはデータベース名が正しくない可能性があります。

500 レスポンス

サーバーの内部エラーです。

先頭に戻る

次の例では、Essbaseキューブの計算、MDX、MaxLまたはレポート・スクリプトをリストする方法を示します。

この例では、cURLを使用して、Windowsシェル・スクリプトからREST APIにアクセスします。呼出し元ユーザーのIDおよびパスワードは変数であり、properties.bat内でその変数値が設定されています。

レスポンスでリンクを必要としない場合は、links=noneを問合せパラメータとして指定します。

cURLコマンドを含むスクリプト – 計算スクリプトのリスト

次の例では、CalcTuple.Tupleキューブで計算スクリプトを取得します。

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts?file=calc" -H "accept: application/json" -u %User%:%Password%

レスポンス本体の例

CalcTuple.Tupleキューブから5つの計算スクリプトがリストされ、便利なリンクがあります。

{
  "items" : [ {
    "name" : "copydata",
    "modifiedTime" : 1724111506602,
    "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"
    } ]
  }, {
    "name" : "svProductMarketPOVs",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 634,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketPOVs/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "svProductMarketTuples",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 93,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svProductMarketTuples/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "svTuplesViaRtsv",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 411,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/svTuplesViaRtsv/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "csSyntax",
    "modifiedTime" : 1724111506602,
    "sizeInBytes" : 1064,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/CalcTuple/databases/Tuple/scripts/csSyntax/content",
      "method" : "GET"
    } ]
  } ]
}

cURLコマンドを含むスクリプト – MDXスクリプトのリスト

次の例では、Sample.BasicキューブでMDXスクリプトを取得します。リンクは、問合せパラメータlinks=noneを使用して抑制されます。

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts?file=mdx&links=none" -H "accept: application/json" -u %User%:%Password%

レスポンス本体の例

リンクなしで、Sample.Basicキューブから2つのMDXスクリプトがリストされます。

{
  "items" : [ {
    "name" : "mdx001",
    "modifiedTime" : 1717699870561,
    "sizeInBytes" : 185
  }, {
    "name" : "mdx002",
    "modifiedTime" : 1717699895561,
    "sizeInBytes" : 98
  } ]
}

cURLコマンドを含むスクリプト – MaxLスクリプトのリスト

次の例では、Sample.BasicキューブでMaxLスクリプトを取得します。リンクは、問合せパラメータlinks=noneを使用して抑制されます。

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts?file=maxl&links=none" -H "accept: application/json" -u %User%:%Password%

レスポンス本体の例


{
  "items" : [ {
    "name" : "grantfilter",
    "modifiedTime" : 1721687178882,
    "sizeInBytes" : 46
  } ]
}

cURLコマンドを含むスクリプト – レポート・スクリプトのリスト

次の例では、Sample.Basicキューブでレポート・ライター・スクリプトを取得します。リンクは、問合せパラメータlinks=noneを使用して抑制されます。

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts?file=report&links=none" -H "accept: application/json" -u %User%:%Password%

レスポンス本体の例


{
  "items" : [ {
    "name" : "attr",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 295
  }, {
    "name" : "link",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 226
  }, {
    "name" : "bottom",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 248
  }, {
    "name" : "orderby",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 523
  }, {
    "name" : "restrict",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 245
  }, {
    "name" : "top",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 334
  }, {
    "name" : "withattr",
    "modifiedTime" : 1721666632271,
    "sizeInBytes" : 310
  }, {
    "name" : "middle",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 530
  }, {
    "name" : "rowavg",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 3804
  }, {
    "name" : "asymm",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 431
  }, {
    "name" : "actsales",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 261
  }, {
    "name" : "colgroup",
    "modifiedTime" : 1721666645271,
    "sizeInBytes" : 301
  } ]
}

cURLコマンドを含むスクリプト – キーワードによるフィルタ

次の例では、Sample.Basicキューブでレポート・ライター・スクリプトを取得します。結果は、問合せパラメータkeyword=attrを使用してフィルタされます。

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts?file=report&keyword=attr" -H "accept: application/json" -u %User%:%Password%

レスポンス本体の例


{
  "items" : [ {
    "name" : "attr",
    "modifiedTime" : 1721666632397,
    "sizeInBytes" : 295,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/attr/content",
      "method" : "GET"
    } ]
  }, {
    "name" : "withattr",
    "modifiedTime" : 1721666632397,
    "sizeInBytes" : 310,
    "links" : [ {
      "rel" : "get",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr",
      "method" : "GET"
    }, {
      "rel" : "delete",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr",
      "method" : "DELETE"
    }, {
      "rel" : "edit",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr",
      "method" : "PUT"
    }, {
      "rel" : "content",
      "href" : "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/scripts/withattr/content",
      "method" : "GET"
    } ]
  } ]
}
先頭に戻る