List L2 Segments

GET/v1/l2_segments

A GET request sent to /v1/l2_segments will show a list of all the L2 Segments within your account.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

FieldDetails
label_selector?
string

This parameter will filter results by labels. More details in the Labels section.

per_page?
integer

Default: 20

Range: 1–100

The number of results [ 1 .. 100 ] displayed on a page. By default, 20 results are shown.

page?
integer

Default: 1

Min: 1

The number of a page (>= 1) that will be returned. By default, it's 1.

sorting?
string

Value in: "id", "created_at", "updated_at"

Default: "id"

This parameter sorts items. By default, it's id.

direction?
string

Value in: "ASC", "DESC"

Default: "ASC"

This parameter defines if items are sorted in an ascending ASC or descending DESC order. By default, ASC is set up.

Response Body

application/json

curl -X GET "https://example.com/v1/l2_segments"
[  {    "id": "WPe9xdLy",    "name": "name906",    "type": "public",    "status": "active",    "location_group_id": 51,    "location_group_code": "location1809",    "labels": {      "environment": "production",      "service": "my-web-app",      "example.com/project": "my-project",      "example.com/owner": "my-team"    },    "updated_at": "2026-05-28T07:00:49Z",    "created_at": "2026-05-28T07:00:49Z"  },  {    "id": "nXe0vbxr",    "name": "name907",    "type": "public",    "status": "active",    "location_group_id": 51,    "location_group_code": "location1809",    "labels": {      "environment": "production",      "service": "my-web-app",      "example.com/project": "my-project",      "example.com/owner": "my-team"    },    "updated_at": "2026-05-28T07:00:50Z",    "created_at": "2026-05-28T07:00:50Z"  },  {    "id": "jnegJYdw",    "name": "name908",    "type": "public",    "status": "active",    "location_group_id": 51,    "location_group_code": "location1809",    "labels": {      "environment": "production",      "service": "my-web-app",      "example.com/project": "my-project",      "example.com/owner": "my-team"    },    "updated_at": "2026-05-28T07:00:50Z",    "created_at": "2026-05-28T07:00:50Z"  }]