# 仕様を作成

Availability-note[Beta](https://help.talend.com/r/en-US/Cloud/labels-on-talend-help-center/availability-beta)

ベータ版コンテンツ

このシナリオでは、Talend APIを使って仕様を作成し、プロジェクトクオリティを向上させます。

## このタスクについて

APIコールの詳細は次のとおりです:

```
Method: POST
endpoint: api/v1/projects/quality/specifications
payload:[
  {
    "name": "string",
    "description": "string",
    "rules": [
      "string"
    ],
    "threshold": {
      "operator": "string",
      "value": 0,
      "type": "Percentage"
    }
  }
]
```

![仕様をすべて取得するために選択されたAPI。](https://help.qlik.com/Resources/Images/qlik-talend-cloud-migration-toolkit-user-guide/tcmp-specs-api.png)

## 手順

1. GET /api/v1/projects/quality/rulesエンドポイントを呼び出し、ルールをすべて取得します。
2. 作成する仕様に追加したいルールのIDを書き留めておきます。
3. POST api/v1/projects/quality/specificationsエンドポイントを呼び出し、仕様を作成します。
4. [Body] (ボディ)エリアに、次の情報を入力します:
   | パラメーター名 | 値 |
   | --- | --- |
   | name | ルールの名前を入力します。 |
   | description | ルールの説明を入力します。 |
   | rules | ルールIDを1つ(または複数)入力します。 |
   | operator | しきい値と比較する演算子として次のいずれかを指定します: &lt;=、\&gt;=、=、\&gt;= |
   | value | しきい値の値を入力します。この値によって、ある条件が観察されるべき上限または境界が設定されます。このフィールドには0から始まる数値を入力できます。 |
   | type | しきい値タイプ(PercentageまたはNumeric)を入力します。 |

   例:
   ```
   {
     "name": "cloud-migration", 
     "description": "This specification contains rules related best practices for Talend Cloud Migration", 
     "rules": [
         "30599ac4-09b0-4abd", "30599ac4-09b0-4abc" 
         ], 
         "threshold": {
             "operator": "=", 
             "value": 0, 
             "type": "PERCENTAGE" 
          }
   }
   ```
5. [Execute] (実行)をクリックしてコールを発行します。

## タスクの結果

仕様が作成されます。