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

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

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

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

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

ここでのバージョン とは Incredibuild API のバージョンです。

コマンドの例:

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

リクエスト形式:

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

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

本文は、使用しているAPIのバージョンによって異なります。

バージョン1.5.0のリクエスト本文

フィールド データタイプ 備考
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の割り当て

enableBuildCache

{true, false}

ブーリアン型

 

useLocalCache

{true, false}

ブーリアン型

 

remoteCacheServer

ホスト名またはIP:ポート

string

 

バージョン1.5.0の本文の例

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

バージョン1.3.0のリクエスト本文

フィールド データタイプ 備考
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の割り当て

バージョン1.3.0の本文の例

コピー
{
  "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
    }
  ]
}