Tillered Arctic

Peers API

Peer management endpoints

Peers API

Manage cluster peers.

GET /v1/peers

List all peers.

Authentication

Required. Scope: peers.read

Query Parameters

ParameterTypeDescription
is_localbooleanFilter by local status

Response

[
  {
    "id": "01HXYZ...",
    "name": "Agent A",
    "public_key": "base64...",
    "is_local": true,
    "address": "192.168.1.10:8080",
    "created_at": "2024-01-15T10:30:00Z"
  }
]

Example

curl -X GET http://agent:8080/v1/peers \
  -H "Authorization: Bearer $TOKEN"

# Filter to remote peers
curl -X GET "http://agent:8080/v1/peers?is_local=false" \
  -H "Authorization: Bearer $TOKEN"

GET /v1/peers/{id}

Get a specific peer.

Authentication

Required. Scope: peers.read

Path Parameters

ParameterDescription
idPeer ID

Response

{
  "id": "01HXYZ...",
  "name": "Agent A",
  "public_key": "base64...",
  "is_local": true,
  "address": "192.168.1.10:8080",
  "created_at": "2024-01-15T10:30:00Z"
}

Errors

StatusCodeDescription
404NOT_FOUNDPeer not found

POST /v1/peers

Add a remote peer.

Authentication

Required. Scope: peers.write

Request Body

{
  "address": "192.168.1.20:8080"
}
FieldTypeRequiredDescription
addressstringYesPeer address (host:port)

Response

{
  "id": "01HXYZ...",
  "name": "",
  "public_key": "base64...",
  "is_local": false,
  "address": "192.168.1.20:8080",
  "created_at": "2024-01-15T10:30:00Z"
}

Errors

StatusCodeDescription
400INVALID_REQUESTMissing address
409ALREADY_EXISTSPeer already in cluster
422HANDSHAKE_FAILEDHandshake failed
422NODE_LIMIT_EXCEEDEDLicense limit reached
422LICENSE_MISMATCHDifferent licenses

Example

curl -X POST http://agent:8080/v1/peers \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"address": "192.168.1.20:8080"}'

PUT /v1/peers/{id}

Update peer metadata.

Authentication

Required. Scope: peers.write

Path Parameters

ParameterDescription
idPeer ID

Request Body

{
  "name": "Production Server 1"
}
FieldTypeRequiredDescription
namestringNoNew peer name

Response

{
  "id": "01HXYZ...",
  "name": "Production Server 1",
  "public_key": "base64...",
  "is_local": false,
  "address": "192.168.1.20:8080",
  "created_at": "2024-01-15T10:30:00Z"
}

Errors

StatusCodeDescription
404NOT_FOUNDPeer not found

DELETE /v1/peers/{id}

Delete a peer.

Authentication

Required. Scope: peers.write

Path Parameters

ParameterDescription
idPeer ID

Response

{
  "deleted": true
}

Errors

StatusCodeDescription
404NOT_FOUNDPeer not found
422CANNOT_DELETE_LOCALUse /v1/peers/self

DELETE /v1/peers/self

Remove the local peer from the cluster.

Authentication

Required. Scope: admin

Response

{
  "peer_id": "01HXYZ...",
  "version": 2,
  "is_active": false,
  "deactivated_at": "2024-01-15T10:30:00Z"
}

Notes

  • Broadcasts deactivation to all cluster peers
  • Services involving this peer become inactive