apig__CreateOrDeletePublishRecordForApiV2
Publishes an API to a chosen environment or takes it offline in Huawei Cloud API Gateway, controlling whether the API is live for callers.
Instructions
[APIG] 对API进行发布或下线。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"api_id": "<api_id>",
"env_id": "<env_id>",
"instance_id": "<instance_id>",
"project_id": "<project_id>"
},
"name": "apig__CreateOrDeletePublishRecordForApiV2"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 需要进行的操作。 | |
| api_id | Yes | API的编号,即:需要进行发布或下线的API的编号 | |
| env_id | Yes | 环境的编号,即:API需要发布到哪个环境 | |
| remark | No | 对发布动作的简述。字符长度不超过255 | |
| project_id | Yes | 项目ID,获取方式请参见[获取项目ID](apig-api-180713009.xml)。 | |
| instance_id | Yes | 实例ID,在API网关控制台的“实例信息”中获取。 |