Help Center/ MaaS/ API Reference/ MaaS Call Statistics/ Querying the IP Address List
Updated on 2026-07-03 GMT+08:00

Querying the IP Address List

Function

This API is used to obtain the IP addresses.

Constraints

  • Region restrictions: Only the CN-Hong Kong region is supported.
  • API rate limiting: The total number of requests for this API from all users cannot exceed 1,000 within one minute.
  • User request limit: The number of requests for this API from a single user cannot exceed 200 within one minute.
  • Rate-limiting response: When the rate limit is exceeded, the API returns the HTTP status code 429 "Too Many Requests".
  • Retry suggestion: If the rate limit is exceeded, wait 60 seconds and try again.

URI

POST /v1/{project_id}/maas/monitoring/source-ips

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID and Name.

Constraints: N/A

Range: The value can contain 32 characters. Only lowercase letters and digits are allowed.

Default Value: N/A

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details, see Authentication.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

service_type

Yes

Integer

Definition: Service type.

Constraints: N/A

Range:

Default Value: N/A

limit

Yes

Integer

Definition: Number of records on each page, that is, maximum number of returned records.

Constraints: N/A

Range: Greater than 0.

Default Value: N/A

offset

No

Integer

Definition: Pagination offset, which indicates the number of records to be skipped.

Constraints: N/A

Range: The value must be greater than or equal to 0.

Default Value: N/A

api_keys

No

Array of strings

Definition: API key tag list, which is used for filtering.

MaaS services support API key calls.

Go to the API key management page to get the API key tag. The Tag field in the API key list shows the API key tag.

Constraints: N/A

Range:

  • Example for obtaining the online experience call data: api_keys: [""].
  • When obtaining the call data of some API keys, transfer the tags of the corresponding API keys. Example: api_keys: ["test01","test02"].
  • Example for obtaining the call data of online experience and some API keys: api_keys: ["test01", "test02", ""].
  • When obtaining all call data, do not use this parameter.

Default Value: N/A

ip_search

No

String

Definition: Fuzzy query of IP addresses. If this parameter is specified, IP addresses starting with the parameter value are queried.

Constraints: N/A

Range: IPv4 address prefix, for example, 192.168 and 10.0.

Default Value: N/A

start_time

Yes

Long

Definition: Timestamp of the start time, in milliseconds.

Constraints: The end time must be within 30 days from the start time.

Range: The value must be greater than 0 and no greater than the value of end_time.

Default Value: N/A

end_time

Yes

Long

Definition: Timestamp of the end time, in milliseconds.

Constraints: The end time must be within 30 days from the start time.

Range: The value must be greater than 0.

Default Value: N/A

service_id

No

String

Definition: Service ID. You can obtain the service ID from the response body during service creation, or call the API for obtaining the service list. The service_id field indicates the service ID.

Constraints: N/A

Range: The value can contain 1 to 128 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Default Value: N/A

timezone

No

String

Definition: Time zone.

Constraints: N/A

Range: The value must comply with the IANA time zone specifications, such as Asia/Shanghai and UTC.

Default Value: Asia/Shanghai (GMT+8)

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Definition: Total number of queried data records.

Range: N/A

items

Array of strings

Definition: IP address list.

Range: N/A

count

Integer

Definition: Maximum number of data records returned on each page.

Range: The value is that of the input parameter limit.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code, which identifies the error type. For details, see MaaS Error Codes.

Range: N/A

error_msg

String

Definition: Error description. For details, see MaaS Error Codes.

Range: N/A

Request Example

Perform fuzzy query on preset services whose IP addresses start with 192 in the GMT+8 time zone. Ten records are displayed on each page, starting from the first record.

/v1/{project_id}/maas/monitoring/source-ips

{
  "limit" : 10,
  "offset" : 0,
  "start_time" : 1768406400000,
  "end_time" : 1769529757467,
  "timezone" : "Asia/Shanghai",
  "service_type" : 2,
  "ip_search" : "192"
}

Response Example

Status code: 200

Success response

{
  "total" : 2,
  "items" : [ "192.168.1.148", "192.168.4.99" ],
  "count" : 10
}

Status code: 400

Failure response

{
  "error_code" : "ModelArts.0104",
  "error_msg" : "Invalid parameter. Issue: The end time cannot be earlier than the start time."
}

Status Codes

Status Code

Description

200

Success response

400

Failure response

Error Codes

For details, see Error Codes.