Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ API Gateway/ API Reference/ Shared Gateway APIs (for Existing Users)/ API Management/ Publishing Multiple APIs or Taking Multiple APIs Offline

Publishing Multiple APIs or Taking Multiple APIs Offline

Updated on 2022-09-01 GMT+08:00

Function

This API is used to publish multiple APIs in an environment or to remove multiple APIs from the environment in which they have been published.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

POST

/v1.0/apigw/apis/publish[?action]

The following table lists the parameter in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

action

No

String

online: publish

offline: take offline

Request

Table 3 Parameter description

Parameter

Mandatory

Type

Description

apis

Yes

String Array

IDs of the APIs to be published or taken offline

env_id

Yes

String

Environment ID

remark

No

String

Description of the publication

The description cannot exceed 255 characters.

Example request:

{
	"apis": ["81efcfd94b8747a0b21e8c04144a4e8c","7addcd00cfab433984b1d8bf2fe08aaa"],
	"env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID",
  "remark": "Published in the production environment"
}

Response

Table 4 Parameter description

Parameter

Type

Description

success

Array

Message for successful API publication or taking offline

failure

Array

Error message and APIs that fail to be published or taken offline

Table 5 Parameter description of success (batch publishing)

Parameter

Type

Description

publish_id

String

Publication record ID

api_id

String

ID of a successfully published API

api_name

String

Name of the API

env_id

String

ID of the environment in which the API has been published

remark

String

Description of the publication

publish_time

Timestamp

Time when the API is published

version_id

String

API version

Table 6 Parameter description of success (taking offline in batches)

Parameter

Type

Description

api_id

String

ID of an API that is successfully taken offline

api_name

String

Name of the API

Table 7 Parameter description of failure

Parameter

Type

Description

api_id

String

ID of an API that fails to be published or taken offline

api_name

String

Name of the API

error_code

String

Error code

error_msg

String

Error message

Example response:

{
	"success": [{
		"publish_id": "5b729aa252764739be2c37ef0d66dc63",
		"api_id": "7addcd00cfab433984b1d8bf2fe08aaa",
                "api_name": "testApi",
		"env_id": "DEFAULT_ENVIRONMENT_RELEASE_ID",
		"version_id": "3d9dcb733ba34352b0d02f85fd16b026",
		"remark": "string",
		"publish_time": "2018-07-26T13:18:04.1079916Z"
	}],
	"failure": [{
		"api_id": "81efcfd94b8747a0b21e8c04144a4e8c",
		"error_code": "APIG.3002",
		"error_msg": "api with id 81efcfd94b8747a0b21e8c04144a4e8c not found"
	}]
}

Status Codes

Table 8 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Server Internal Error

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback