Edge

Edge enrollment and the edge work channel.

16 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors

List the edge pools

GET /api/v1/account/organizations/{id}/edge-pools
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Query parameters

  • offset integer
    Number of items to skip.
    Default: 0
  • limit integer
    Maximum number of items to return.
    Default: 50 Min: 1 Max: 50
  • search string
    Case-insensitive match on the pool name.
  • enrollment string
    Only pools whose enrollment is open, or closed.
    Allowed: open, closed
  • empty boolean
    Only pools holding no edge, or only pools holding some.

Response 200 OK application/json

  • items array[object]
    • created_at string<date-time>
    • edge_count integer
    • enrollment_open boolean
    • id string<uuid>
    • name string
  • total integer

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/account/organizations/{id}/edge-pools' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "items": [
    {
      "created_at": "2026-01-01T00:00:00Z",
      "edge_count": 0,
      "enrollment_open": true,
      "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "name": "string"
    }
  ],
  "total": 0
}

Create an edge pool

POST /api/v1/account/organizations/{id}/edge-pools
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Request body application/json required

  • name string required

Response 200 OK application/json

  • created_at string<date-time>
  • edge_count integer
  • enrollment_open boolean
  • id string<uuid>
  • name string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/account/organizations/{id}/edge-pools' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'

Response 200

{
  "created_at": "2026-01-01T00:00:00Z",
  "edge_count": 0,
  "enrollment_open": true,
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "name": "string"
}

Get an edge pool

GET /api/v1/account/organizations/{id}/edge-pools/{pool_id}
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • pool_id string required

Response 200 OK application/json

  • created_at string<date-time>
  • edge_count integer
  • enrollment_open boolean
  • id string<uuid>
  • name string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/account/organizations/{id}/edge-pools/{pool_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "created_at": "2026-01-01T00:00:00Z",
  "edge_count": 0,
  "enrollment_open": true,
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "name": "string"
}

Delete an edge pool

DELETE /api/v1/account/organizations/{id}/edge-pools/{pool_id}
Badge
Refused with 409 while the pool still holds edges.

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • pool_id string required

Response 200 OK

No response body.

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}/edge-pools/{pool_id}' \
  -H 'Authorization: Bearer <badge>'

Close enrollment into an edge pool

DELETE /api/v1/account/organizations/{id}/edge-pools/{pool_id}/enrollment-key
Badge
Clears the pool’s enrollment key. Edges already enrolled are kept.

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • pool_id string required

Response 200 OK

No response body.

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}/edge-pools/{pool_id}/enrollment-key' \
  -H 'Authorization: Bearer <badge>'

Generate an edge pool enrollment key

POST /api/v1/account/organizations/{id}/edge-pools/{pool_id}/enrollment-key/generate
Badge
Opens enrollment into the pool with a fresh key, returned once. The previous key stops working.

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • pool_id string required

Response 200 OK application/json

  • enrollment_key string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/account/organizations/{id}/edge-pools/{pool_id}/enrollment-key/generate' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "enrollment_key": "string"
}

Generate an edge enrollment key

POST /api/v1/account/organizations/{id}/edge/enrollment-key/generate
Badge
Writes a fresh key into the edge settings section. Read and clear it through the settings endpoints.

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Response 200 OK application/json

  • alerting object nullable
    • email string
  • auth object nullable
    • api_key_rotation_grace_hours integer
    • api_key_rotation_ttl_days integer
    • badge_ttl_seconds integer
  • edge object nullable
    • enrollment_key string
  • mailer object nullable
    • from_address string
    • host string
    • password string
    • port integer
    • tls boolean
    • username string
  • packages object nullable
    • repository_url string
  • retention object nullable
    • min_versions integer nullable
  • security object nullable
    • mfa_enforced boolean
  • sso object nullable
    • providers array[object]
      • domains array[string]
      • provider string
  • vector object nullable
    • address string
  • webhook object nullable
    • auth_type string
    • enabled boolean
    • events map[array[string]]
    • secret string
    • url string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/account/organizations/{id}/edge/enrollment-key/generate' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "alerting": {
    "email": "string"
  },
  "auth": {
    "api_key_rotation_grace_hours": 0,
    "api_key_rotation_ttl_days": 0,
    "badge_ttl_seconds": 0
  },
  "edge": {
    "enrollment_key": "string"
  },
  "mailer": {
    "from_address": "string",
    "host": "string",
    "password": "string",
    "port": 0,
    "tls": true,
    "username": "string"
  },
  "packages": {
    "repository_url": "string"
  },
  "retention": {
    "min_versions": 0
  },
  "security": {
    "mfa_enforced": true
  },
  "sso": {
    "providers": [
      {
        "domains": [
          "string"
        ],
        "provider": "string"
      }
    ]
  },
  "vector": {
    "address": "string"
  },
  "webhook": {
    "auth_type": "string",
    "enabled": true,
    "events": {
      "key": [
        "string"
      ]
    },
    "secret": "string",
    "url": "string"
  }
}

List the enrolled edges

GET /api/v1/account/organizations/{id}/edges
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Query parameters

  • offset integer
    Number of items to skip.
    Default: 0
  • limit integer
    Maximum number of items to return.
    Default: 100 Min: 1 Max: 100
  • pool_id string<uuid>
    Only edges in this pool.
  • no_pool boolean
    Only edges in no pool. Cannot be combined with pool_id.
  • search string
    Case-insensitive match on edge name or hostname.

Response 200 OK application/json

  • items array[object]
    • created_at string<date-time>
    • edge_version string
    • hostname string
    • id string<uuid>
    • last_seen string<date-time> nullable
    • name string
    • organization_id string<uuid>
    • pool_id string<uuid>
    • pool_name string nullable
    • protocol_version integer
    • status string
    • system_info object
      • arch string nullable
      • go_version string nullable
      • kernel string nullable
      • kloset_version string nullable
      • num_cpu integer nullable
      • os string nullable
      • total_memory integer nullable
        Max: 1.8446744073709552e+19
    • tags array[string] nullable
  • total integer

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/account/organizations/{id}/edges' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "items": [
    {
      "created_at": "2026-01-01T00:00:00Z",
      "edge_version": "string",
      "hostname": "string",
      "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "last_seen": "2026-01-01T00:00:00Z",
      "name": "string",
      "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "pool_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "pool_name": "string",
      "protocol_version": 0,
      "status": "string",
      "system_info": {
        "arch": "string",
        "go_version": "string",
        "kernel": "string",
        "kloset_version": "string",
        "num_cpu": 0,
        "os": "string",
        "total_memory": 0
      },
      "tags": [
        "string"
      ]
    }
  ],
  "total": 0
}

Get an enrolled edge

GET /api/v1/account/organizations/{id}/edges/{edge_id}
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • edge_id string required

Response 200 OK application/json

  • created_at string<date-time>
  • edge_version string
  • hostname string
  • id string<uuid>
  • last_seen string<date-time> nullable
  • name string
  • organization_id string<uuid>
  • pool_id string<uuid>
  • pool_name string nullable
  • protocol_version integer
  • status string
  • system_info object
    • arch string nullable
    • go_version string nullable
    • kernel string nullable
    • kloset_version string nullable
    • num_cpu integer nullable
    • os string nullable
    • total_memory integer nullable
      Max: 1.8446744073709552e+19
  • tags array[string] nullable

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/account/organizations/{id}/edges/{edge_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "created_at": "2026-01-01T00:00:00Z",
  "edge_version": "string",
  "hostname": "string",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "last_seen": "2026-01-01T00:00:00Z",
  "name": "string",
  "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "pool_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "pool_name": "string",
  "protocol_version": 0,
  "status": "string",
  "system_info": {
    "arch": "string",
    "go_version": "string",
    "kernel": "string",
    "kloset_version": "string",
    "num_cpu": 0,
    "os": "string",
    "total_memory": 0
  },
  "tags": [
    "string"
  ]
}

Put an edge in a pool

PUT /api/v1/account/organizations/{id}/edges/{edge_id}/pool
Badge
Moves the edge out of the pool it was in, if any. The edge and the pool must belong to the organization.

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • edge_id string required

Request body application/json required

  • pool_id string<uuid>

Response 200 OK

No response body.

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X PUT 'https://pcp.example.com/api/v1/account/organizations/{id}/edges/{edge_id}/pool' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "pool_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}'

Take an edge out of its pool

DELETE /api/v1/account/organizations/{id}/edges/{edge_id}/pool
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • edge_id string required

Response 200 OK

No response body.

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}/edges/{edge_id}/pool' \
  -H 'Authorization: Bearer <badge>'

Enroll an edge

POST /api/v1/edge/enroll
No authentication
Exchanges the shared enrollment key in the body for a per-edge token. No other credential is needed.

Request body application/json required

  • edge_version string
  • enrollment_key string required
  • hostname string
  • name string required
  • organization_id string<uuid>
  • protocol_version integer
  • system_info object
    • arch string nullable
    • go_version string nullable
    • kernel string nullable
    • kloset_version string nullable
    • num_cpu integer nullable
    • os string nullable
    • total_memory integer nullable
      Max: 1.8446744073709552e+19

Response 200 OK application/json

  • edge_id string<uuid>
  • protocol_version integer
  • supported boolean
  • token string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/edge/enroll' \
  -H 'Content-Type: application/json' \
  -d '{
  "edge_version": "string",
  "enrollment_key": "string",
  "hostname": "string",
  "name": "string",
  "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "protocol_version": 0,
  "system_info": {
    "arch": "string",
    "go_version": "string",
    "kernel": "string",
    "kloset_version": "string",
    "num_cpu": 0,
    "os": "string",
    "total_memory": 0
  }
}'

Response 200

{
  "edge_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "protocol_version": 0,
  "supported": true,
  "token": "string"
}

Download a connector package for the edge platform

GET /api/v1/edge/packages/{name}/{version}
Edge token

Path parameters

  • name string required
  • version string required

Query parameters

  • os string required
    Target operating system.
  • arch string required
    Target architecture.

Response 200 The connector package application/octet-stream

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/edge/packages/{name}/{version}' \
  -H 'Authorization: Bearer <edge-token>'

Wait for work

POST /api/v1/edge/poll
Edge token
Long-polls for the next piece of work for the calling edge.

Request body application/json required

  • edge_version string
  • hostname string
  • protocol_version integer
  • slots integer nullable
  • system_info object
    • arch string nullable
    • go_version string nullable
    • kernel string nullable
    • kloset_version string nullable
    • num_cpu integer nullable
    • os string nullable
    • total_memory integer nullable
      Max: 1.8446744073709552e+19
  • tags array[string] nullable

Response 200 A piece of work application/json

  • op string
  • source object nullable
    • data_classes array[string] nullable
    • environment string nullable
    • fields array[object]
      • key string
      • val string
    • id string<uuid>
    • integration object
      • id string<uuid>
      • name string
      • version string
    • name string
    • revision integer
    • type string
    • urn string
    • urnid string<uuid>
  • target object nullable
    • data_classes array[string] nullable
    • environment string nullable
    • fields array[object]
      • key string
      • val string
    • id string<uuid>
    • integration object
      • id string<uuid>
      • name string
      • version string
    • name string
    • revision integer
    • type string
    • urn string
    • urnid string<uuid>
  • task_config map[string]
  • work_id string<uuid>

Response 204 No work arrived before the hold expired

No response body.

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/edge/poll' \
  -H 'Authorization: Bearer <edge-token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "edge_version": "string",
  "hostname": "string",
  "protocol_version": 0,
  "slots": 0,
  "system_info": {
    "arch": "string",
    "go_version": "string",
    "kernel": "string",
    "kloset_version": "string",
    "num_cpu": 0,
    "os": "string",
    "total_memory": 0
  },
  "tags": [
    "string"
  ]
}'

Response 200

{
  "op": "string",
  "source": {
    "data_classes": [
      "string"
    ],
    "environment": "string",
    "fields": [
      {
        "key": "string",
        "val": "string"
      }
    ],
    "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
    "integration": {
      "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "name": "string",
      "version": "string"
    },
    "name": "string",
    "revision": 0,
    "type": "string",
    "urn": "string",
    "urnid": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
  },
  "target": {
    "data_classes": [
      "string"
    ],
    "environment": "string",
    "fields": [
      {
        "key": "string",
        "val": "string"
      }
    ],
    "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
    "integration": {
      "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "name": "string",
      "version": "string"
    },
    "name": "string",
    "revision": 0,
    "type": "string",
    "urn": "string",
    "urnid": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
  },
  "task_config": {
    "key": "string"
  },
  "work_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}

Enroll an edge into a pool

POST /api/v1/edge/pools/enroll
No authentication
Exchanges an edge pool’s enrollment key for a per-edge token. The edge joins that pool.

Request body application/json required

  • edge_version string
  • enrollment_key string required
  • hostname string
  • name string required
  • protocol_version integer
  • system_info object
    • arch string nullable
    • go_version string nullable
    • kernel string nullable
    • kloset_version string nullable
    • num_cpu integer nullable
    • os string nullable
    • total_memory integer nullable
      Max: 1.8446744073709552e+19

Response 200 OK application/json

  • edge_id string<uuid>
  • protocol_version integer
  • supported boolean
  • token string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/edge/pools/enroll' \
  -H 'Content-Type: application/json' \
  -d '{
  "edge_version": "string",
  "enrollment_key": "string",
  "hostname": "string",
  "name": "string",
  "protocol_version": 0,
  "system_info": {
    "arch": "string",
    "go_version": "string",
    "kernel": "string",
    "kloset_version": "string",
    "num_cpu": 0,
    "os": "string",
    "total_memory": 0
  }
}'

Response 200

{
  "edge_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "protocol_version": 0,
  "supported": true,
  "token": "string"
}

Reply to a piece of work

POST /api/v1/edge/{work_id}/reply
Edge token

Path parameters

  • work_id string required

Request body application/json required

  • message string nullable
  • report
  • state
  • type string

Response 204 No Content

No response body.

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/edge/{work_id}/reply' \
  -H 'Authorization: Bearer <edge-token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "message": "string",
  "report": {},
  "state": {},
  "type": "string"
}'