API Usage Guidelines

Public cloud APIs comply with the RESTful API design principles. REST-based web services are organized into resources. Each resource is identified by one or more Uniform Resource Identifiers (URIs). An application accesses a resource based on the resource's Unified Resource Locator (URL). A URL is usually in the following format: https://Endpoint/uri. In the URL, uri indicates the resource path, that is, the API access path.

Public cloud APIs use HTTPS as the transmission protocol. Requests/Responses are transmitted by using JSON messages, with media type represented by application/json.

For details about how to use APIs, see API Usage Guidelines.

Network instances can be attached to an enterprise router as its attachments. The attachment type varies depending on the network instance.

**Figure 1** Attachments

Figure 1 Attachments

Table 1 Enterprise Router attachments

Attachment Type

Network Instance

Creating an Attachment

Querying Attachment Details

Deleting an Attachment

VPC attachment

VPC

Creating a VPC Attachment

Querying Details About a VPC Attachment

Deleting a VPC Attachment

Virtual gateway attachment

Virtual gateway of Direct Connect

Create a virtual gateway by referring to Creating a Virtual Gateway and then attach it to an enterprise router.

Querying Details About an Attachment

Deleting a Virtual Gateway

VPN gateway attachment

VPN gateway

Create a VPN gateway by referring to Creating a VPN Gateway and then attach it to an enterprise router.

Querying Details About an Attachment

Deleting a VPN Gateway