Updated on 2024-03-25 GMT+08:00

Querying a Custom Line

Function

This API is used to query a custom line.

Calling Method

For details, see Calling APIs.

URI

GET /v2.1/customlines

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

line_id

No

String

Resolution line ID

name

No

String

Resolution line name

limit

No

Integer

Number of resources on each page.

The value ranges from 0 to 500.

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

offset

No

Integer

Start offset of the 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.

show_detail

No

Boolean

Whether to query detailed information.

Value options:

  • true (default): Detailed information is queried.

  • false: Detailed information is not queried.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

lines

Array of line objects

Line list

metadata

metadata object

Number of resources that meet the query condition

Table 4 line

Parameter

Type

Description

line_id

String

Resolution line ID

name

String

Custom line name

ip_segments

Array of strings

IP address range

created_at

String

Time when the line was created

updated_at

String

Time when the line was updated

status

String

Resource status

description

String

Custom line description

Table 5 metadata

Parameter

Type

Description

total_count

Integer

Number of resources that meet the filter criteria. The number is irrelevant to limit or offset.

Example Requests

None

Example Responses

Status code: 200

Querying a custom line

{
  "lines" : [ {
    "line_id" : "custom_2ce45ef669fc87870169fcbada7a0007",
    "name" : "customline",
    "ip_segments" : [ "1.1.1.1-1.1.1.1", "1.1.1.2-1.1.1.3" ],
    "status" : "ACTIVE",
    "created_at" : "2019-04-10T10:03:17.827",
    "updated_at" : "2019-04-10T10:03:57.207",
    "description" : "1234"
  } ],
  "metadata" : {
    "total_count" : 1
  }
}

Status Codes

Status Code

Description

200

Querying a custom line

Error Codes

See Error Codes.