How to enable Global Variables REST API

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Sometimes it is necessary to manage global variables through the REST API.

ソリューション

Bamboo does have an API for Global variables, which can list, add, update, and remove Global variables. This API is currently considered a "dark feature" meaning that it's not enabled by default.

This feature can be enabled as follows:

  1. Stop Bamboo
  2. Add -Datlassian.darkfeature.bamboo.experimental.rest.admin.enabled=true by following the instructions of Configuring your system properties
  3. Start Bamboo

With this feature, the following API endpoint will become available: <bamboo-url>/rest/admin/latest/globalVariables

機能

HTTP メソッド

エンドポイント

Payload

一覧

GET

<bamboo-url>/rest/admin/latest/globalVariables

NONE

追加

POST

<bamboo-url>/rest/admin/latest/globalVariables

JSON:

  • name (required)

  • value (optional)

[更新] を選択します

PUT

<bamboo-url>/rest/admin/latest/globalVariables/<variable-id>

JSON: Any of

  • name (optional)

  • value (optional)

Remove

削除

<bamboo-url>/rest/admin/latest/globalVariables/<variable-id>

NONE

最終更新日 2025 年 4 月 7 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.