API経由でライセンスを割り当てる

この機能は、Incredibuild のEnterprise Plan でのみ利用可能です。

このAPIを使用してエージェントにライセンスを割り当てることができます。この作業にはAPI キー 、Enterpriseライセンスが必要です。

リクエストエンドポイント

POST https://<coordinatorIP>:8000/api/license/setAgentLicense?coordinatorId=<coordinator ID>&version=<API version>

ここでのバージョン とは Incredibuild API のバージョンです。ビルドデータAPIについては、現在バージョン1.3.0のみがサポートされています。

コマンドの例:

POST https://10.132.15.166:8000/api/license/setAgentLicense?coordinatorId=12345&version=1.3.0

リクエスト形式:

ヘッダー: ヘッダーには、client-api-key というキーと、API キー の値を文字列として含める必要があります。

本文: リクエストの本文はエージェントの配列で、各項目は以下のフィールドを含めることができます。フィールドは以下の順序で記述します。各リクエストは最大100エージェントまで含めることができます。

フィールド データタイプ 備考
agentName Coordinator マネージャーのエージェントリストの名前と一致させる必要があります。 string

 

helperLicense {"none", "fixed", "floating"} string

 

initiatorLicense {"none", "fixed", "floating"} string

 

ciInitiatorLicense {"none", "fixed", "floating"} string

 

requestedCores 整数 整数

ヘルパーとして使用する最大コア数。

enableAgent

{"true", "false"}

ブーリアン型

ヘルパーとして有効化

buildCache

{"true", "false"}

ブーリアン型

Build Cacheの割り当て

本文の例

コピー
{
  "agents": [
    {
      "agentName": "Agent1",
  "initiatorLicense": "Fixed"
      "helperLicense": "Fixed"
      "buildCache": true,   
      "enableAgent": true
    },
{
      "agentName": "Agent2",
      "ciInitiatorLicense":"Fixed",
      "helperLicense": "Floating"
      "requestedCores": 4,
      "buildCache": false,   
      "enableAgent": false
    },
{
      "agentName": "Agent3",
      "ciInitiatorLicense":"Floating",
      "helperLicense": "Fixed"
      "requestedCores": 8,  
      "enableAgent": true
    },
{
      "agentName": "Agent4",
      "ciInitiatorLicense":"None",
      "helperLicense": "None"
      "buildCache": false,   
      "enableAgent": false
    }
  ]
}