> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layarva.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register and Archive Edge Servers

> Register a Windows Edge, pair it through Layarva, assign Screens and list or archive Edge records.

## What the API can and cannot do

The API can register a Windows Edge, list its details, assign Screens and archive its record. **Registration does not install, start or pair the software.** Edge pairing still uses the Layarva dashboard and the Edge application.

An Edge-served LAN display is different from a Screen importing an offline package. See [offline API availability](https://docs.layarva.com/developers/platform-offline.md) for package export.

## Before you start

Use the [Postman setup](https://docs.layarva.com/developers/platform-quickstart.md): `platform_base` is `https://api.layarva.com/api/platform/v1/workspaces/YOUR_WORKSPACE_ID`, with a **Platform / Workspace key**, not a Widget key.

For POST and DELETE, use **Body → raw → JSON**, `Content-Type: application/json` and a new [Idempotency-Key](https://docs.layarva.com/developers/platform-request-keys.md) per new change. GET needs no body or operation key.

Select `edges.read`, `edges.create`, `edges.archive`, and the required Screen permissions. The key's account must have the matching Queue view/manage permissions used for Edge management in Layarva. Edge and Screen plan capacity still applies.

Existing keys do not automatically gain new permissions. If necessary, create a replacement with the required scopes, update your integration, then revoke the old key.

## Step 1: List or find an Edge

Send **GET** `{{platform_base}}/edges?limit=25`.

To find a paired Edge, use `/edges?status=ACTIVE&limit=25`. Search by name with `q=Branch`, or by exact ID with `id=YOUR_EDGE_ID`.

The response contains `data` and `page`. Save the selected Edge's `id` as `edge_id`. For another page, use `after={{next_cursor}}` with the returned `page.nextCursor`; stop when null.

## Step 2: Register a new Windows Edge if needed

Send **POST** `{{platform_base}}/edges`:

```json theme={null}
{
  "name": "Branch LAN Edge",
  "platform": "WINDOWS"
}
```

The response is **201 Created** with `status: "PENDING"`. Save `data.id` as `edge_id`.

Names must be 2–120 characters and unique in your workspace, including retained archived names. `platform` is optional and defaults to `WINDOWS`; this management endpoint currently does not create an Android Edge.

## Step 3: Pair the Edge application

1. Install and open the current Windows Layarva Edge application on the branch computer.
2. Open **Screens → Edge** in your Layarva workspace.
3. Select the registered Edge and use its pairing-code action.
4. Enter that temporary code in the Edge application's pairing setup.
5. Read **GET** `{{platform_base}}/edges/{{edge_id}}` and confirm `data.status` is `ACTIVE`.

> [!NOTE]
>
> The Platform management API does not issue Edge pairing codes or return sync credentials. Use the existing dashboard pairing flow. Do not create a second registration for the Edge you already registered through the API.

Also check its reported LAN address and `lastSyncAt`. `ACTIVE` means paired, not proof that the device is currently reachable or playing content. Make sure displays can reach the Edge over the branch LAN.

## Step 4: Create a Screen assigned to this Edge

After the Edge is paired and active, send **POST** `{{platform_base}}/screens` with `screens.create`:

```json theme={null}
{
  "name": "Lobby LAN display",
  "deliveryMode": "EDGE",
  "edgeDeviceId": "{{edge_id}}",
  "channelId": "{{channel_id}}",
  "locationId": "{{location_id}}"
}
```

Save `data.id` as `screen_id`. Channel and Location are optional here; choose their IDs using the [Channel guide](https://docs.layarva.com/developers/platform-channels-locations.md). Publish Ready content to the selected Channel.

Connect/pair the physical LAN display through the Edge's supported display setup. Do not use a Cloud Player pairing code for this step. The API assignment itself does not prove the display has connected.

### Alternative: move an existing Cloud Screen to Edge

Use **POST** `{{platform_base}}/screens/{{screen_id}}/delivery` with `screens.delivery`:

```json theme={null}
{
  "mode": "EDGE",
  "edgeDeviceId": "{{edge_id}}"
}
```

An owned, paired `ACTIVE` Edge is required. Pending, disabled, archived or foreign Edge assignment is rejected. A Screen served by another Edge must first follow the supported return-to-Cloud/handover flow. Offline-package Screens cannot change mode this way.

## Step 5: Check assigned Screens

Send **GET** `{{platform_base}}/screens?edgeDeviceId={{edge_id}}&limit=25` with `screens.read`.

Check connection and playback using [the Screen guide](https://docs.layarva.com/developers/platform-screens.md#step-5-check-connection-and-playback). Registration, pairing and assignment are separate from content activation on the actual display.

## Step 6: List archived Edge records

Send **GET** `{{platform_base}}/edges?archived=true&limit=25`.

| Filter | Meaning |
| - | - |
| `archived=false` | Exclude archived records; the default |
| `archived=true` | Archived records only |
| `status` | `PENDING`, `ACTIVE`, `DISABLED`, or `ARCHIVED` |
| `q` | Name contains this text, ignoring case |
| `id` | Exact Edge ID |

`status=ARCHIVED` selects archived records if `archived` is omitted. Conflicting filters return an empty list. **GET** `/edges/{{edge_id}}` can read your archived record as well.

## Step 7: Archive an unused Edge

1. Check its assigned Screens.
2. Return/handover its Screens and Queue operations, and revoke obsolete LAN display assignments through the supported management flow.
3. Send **DELETE** `{{platform_base}}/edges/{{edge_id}}` with `{}` and `edges.archive`.
4. Confirm the response has `archived: true` and `status: "ARCHIVED"`.

If you receive `409 resource_in_use`, the Edge still has a protected assignment; review it rather than repeatedly retrying archive.

Archiving retains history and revokes cloud sync access. It does not instantly wipe or stop a Windows installation that is disconnected. An archived Edge cannot be paired again or re-enabled; create a new registration with a new name if needed.

## Common problems

* **401:** check key scopes, expiry, revocation and the issuing account's permissions.
* **409 quota:** review available Edge/Screen capacity.
* **409 duplicate name:** choose another name; archived names remain reserved.
* **Assignment refused:** check ownership, `ACTIVE` pairing state and Screen delivery mode.
* **Pairing code expired:** obtain a new code from the dashboard; do not guess or repeatedly retry.

## Related guides

* [Create and pair Screens](https://docs.layarva.com/developers/platform-screens.md)
* [Publish content to a Channel](https://docs.layarva.com/developers/platform-playlists-publication.md)
* [Windows Edge pairing](https://docs.layarva.com/edge/pairing.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.