機能の概要
このAPIは、現在の組織単位で一括してタグを作成するために使用します。同じタグキーに対して複数のタグ値を一度に作成できます。
呼び出しの説明
インターフェース制約
呼び出し元はマルチクラウドAPIにアクセスするためのキーを保有している必要があります。AccessKey IDとAccessKey Secretの取得方法については、アクセスキーの管理をご参照ください。
リクエストパス
POST /api/v2/tags
リクエストパラメータ
Body
パラメータ名 |
型 |
必須 |
説明 |
サンプル値 |
|---|---|---|---|---|
| orgId | String | はい | 組織ID | uk******** |
| tagValueList | Array | はい | 作成するタグのリスト | - |
| tagValueList[].tagKey | String | はい | タグキー | bxtest-key |
| tagValueList[].tagValue | String | はい | タグ値 | bxtest-value |
戻り値
名前 |
型 |
説明 |
サンプル値 |
|---|---|---|---|
| requestId | String | リクエストID | - |
| data | Array | 作成後のタグリスト | - |
| data[].id | Integer | タグキーID(外側) | 217 |
| data[].tagKey | String | タグキーの値 | bxtest-key |
| data[].tagValueList | Array | そのタグキーに対応する値の集合 | - |
| data[].tagValueList[].id | Integer | タグ値のID(内側)、完全なタグで使用されるID | 244 |
| data[].tagValueList[].tagKey | String | タグキー | bxtest-key |
| data[].tagValueList[].tagValue | String | タグ値 | bxtest-value |
| success | Boolean | 成功かどうか | true |
例
リクエスト例
curl --digest -u 'ak:sk' \
-X POST \
'https://api-cloud.oceanbase.com/api/v2/tags' \
-H "Content-Type: application/json" \
-d '{
"orgId": "uk********",
"tagValueList": [
{
"tagKey": "bxtest-key",
"tagValue": "bxtest-value"
}
]
}'
レスポンス例
JSON 形式
{
"data": [
{
"id": 217,
"tagKey": "bxtest-key",
"tagValueList": [
{
"id": 244,
"tagKey": "bxtest-key",
"tagValue": "bxtest-value"
}
]
}
],
"requestId": "",
"success": true
}