Updated on 2022-02-22 GMT+08:00

Querying the Number of Existing Resources

Function Description

This API is used to query the number of existing resources of a user.

URI

  • URI format

    GET /v1/{project_id}/waf/bundle/usage/{resource_type}

  • Parameter description
    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID.

    resource_type

    Yes

    String

    Specifies the resource type. The options are instance, policy, and certificate.

Request

Request parameters

None

Response

Response parameters
Table 2 Parameter description

Parameter

Type

Description

count

Integer

Specifies the number of existing resources.

Example

The following shows the response if the number of uploaded certificates is queried.

Response example
{
   "count": 2
}

Status Code

Table 3 describes the normal status code returned by the API.
Table 3 Status code

Status Code

Description

Meaning

200

OK

The request has succeeded.

For details about error status codes, see Status Codes.