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

label_selector?string

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

per_page?integer

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

Range1 <= value <= 100
Default20
page?integer

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

Range1 <= value
Default1
sorting?string

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

Default"id"

Value in

  • "id"
  • "created_at"
  • "updated_at"
direction?string

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

Default"ASC"

Value in

  • "ASC"
  • "DESC"

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"  }]