---
title: "Get Peers"
method: GET
path: "/api/peers"
tags: ["peer"]
---

# Get Peers

`GET /api/peers`

This function is an API endpoint that retrieves the list of all peers in the network. It is tagged with "peer" for OpenAPI documentation.

## Parameters

- none

## Returns

If successful, this function returns a `Json<PeersResponse>` object, which includes a success message, the total number of peers, and the list of peers.  <br> If no peers are found, this function returns a `status::NotFound` error.  <br>

## Errors

This function will return an error if the system is in maintenance mode, or if no peers are found.

# Example

GET /api/peers

## Response `200`

- PeersResponse
  - `msg` string, required
  - `total` integer, required
  - `data` Peer[], required
    - `guid` string, required
    - `id` string, required
    - `status` integer, required
    - `strategy_name` string, required
    - `last_online` string, required
    - `info` PeerInfo, required
      - `cpu` string, nullable
      - `hostname` string, nullable
      - `id` string, nullable
      - `memory` string, nullable
      - `os` string, nullable
      - `username` string, nullable
      - `uuid` string, nullable
      - `version` string, nullable
      - `ip` string, nullable

## Other responses

- `404`

## Changes

- **2024-05-20** `b66a109db88a` — 1 breaking, 2 info
  - the `data` response's property type/format changed from `string`/`` to `array`/`` for status `200`
  - api tag `peer` added
  - api tag `todo` removed
- **2024-05-19** `fafd43b82c78` — 1 breaking, 2 info
  - the `data` response's property type/format changed from `array`/`` to `string`/`` for status `200`
  - api tag `todo` added
  - api tag `peer` removed

[Change history](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/changes/api/peers/get.md)

---

[API](https://skmtc.dev/nesaku/apis/sctgdesk-api-server.md) · [All operations](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nesaku/sctgdesk-api-server/revisions/b1c0e7a4434f/schema)
