Querying Public Zones

Function

Query public zones in list.

URI

GET /v2/zones?type={type}&limit={limit}&marker={marker}&offset={offset}&tags={tags}&name={name}&status={status}

For details, see Table 1.
Table 1 Parameters in the URI

Parameter

Mandatory

Type

Description

type

No

String

Zone type, which can be public or private

  • public: Public zones are queried.
  • private: Private zones are queried.

    If the value is left blank, public zones are queried by default.

A fuzzy search will be performed.

The value is left blank by default.

marker

No

String

Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried.

limit

No

Integer

Number of resources on each page

The value ranges from 0 to 500.

Commonly used values are 10, 20, and 50. The default value is 500.

offset

No

Integer

Start offset of pagination query. The query will start from the next resource of the offset value.

The value ranges from 0 to 2147483647.

The default value is 0.

If marker is not left blank, the query starts from the resource specified by marker.

tags

No

String

Resource tag

The format is as follows: key1,value1|key2,value2.

Multiple tags are separated by vertical bar (|). The key and value of each tag are separated by comma (,).

The tags are in AND relationship.

For details, see Adding Resource Tags.

Exact matching will work. If the value starts with an asterisk (*), fuzzy matching will work for the string following the asterisk.

The value is left blank by default.

name

No

String

Zone name

A fuzzy search will be performed.

status

No

String

Resource status

For details, see Resource Status.

Request

Response

Returned Value

If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.

For details, see Status Code.