List L2 Segments for a dedicated server
A GET request sent to /v1/hosts/dedicated_servers/{server_id}/l2_segments will show a list of L2 Segments where the specified server is a member. To specify a server, add its ID to the path parameter.
Authorization
bearerAuth In: header
Path Parameters
| Field | Details |
|---|---|
server_id | stringA unique identifier of a server. |
Query Parameters
| Field | Details |
|---|---|
label_selector? | stringThis parameter will filter results by labels of the L2 Segment members. More details in the Labels section. |
sorting? | stringValue in: Default: This parameter sorts items. By default, it's |
direction? | stringValue in: Default: This parameter defines if items are sorted in an ascending |
per_page? | integerDefault: Range: 1–100 The number of results [ 1 .. 100 ] displayed on a page. By default, 20 results are shown. |
page? | integerDefault: Min: The number of a page (>= 1) that will be returned. By default, it's 1. |
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/hosts/dedicated_servers/8mepRXbM/l2_segments"[ { "status": "active", "mode": "native", "vlan": null, "segment": { "id": "ELe3Mb69", "name": "name1133", "type": "public", "status": "pending", "location_group_id": 48, "location_group_code": "location1538", "labels": {}, "updated_at": "2025-12-31T00:00:00Z", "created_at": "2025-12-31T00:00:00Z" }, "created_at": "2025-12-31T00:00:00Z", "updated_at": "2025-12-31T00:00:00Z" }]