Request Format

Public cloud APIs follow RESTful API design rules.

Representational State Transfer (REST) allocates Uniform Resource Identifiers (URIs) to dispersed resources so that resources can be located. Applications on clients use Uniform Resource Locators (URLs) to obtain resources.

URLs are in the format of https://Endpoint/uri. Table 1 describes the parameters in a URL.

Table 1 Parameter description

Parameter

Description

Endpoint

Specifies the URL that is the entry point for a web service. Obtain the endpoint from Regions and Endpoints.

URI

Specifies a resource path, which is an API access path and obtained from the API URI module, for example, /v2/{tenant_id}/servers.

A project ID is required for some URLs when an API is called. Therefore, you need to obtain a project ID on the console before calling an API. To do so, perform the following operations:

  1. Register yourself on the management console and log in to it.

  2. Hover the mouse over the username and select Basic Information from the drop-down list.

  3. On the Account Info page, click Manage following Security Credentials.

  4. On the My Credential page, view the project ID in the project list.

    **Figure 1** Viewing project IDs

    Figure 1 Viewing project IDs