Skip to main content
GET
/
{version}
/
roster
List by groups
curl --request GET \
  --url https://api.perscom.io/{version}/roster \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.perscom.io/{version}/roster"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.perscom.io/{version}/roster', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.perscom.io/{version}/roster",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.perscom.io/{version}/roster"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.perscom.io/{version}/roster")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.perscom.io/{version}/roster")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "name": "<string>",
      "description": "<string>",
      "order": 123,
      "hidden": false,
      "icon": "<string>",
      "image": {
        "name": "<string>",
        "description": "<string>",
        "filename": "<string>",
        "path": "<string>",
        "image_url": "<string>"
      },
      "units": [
        {
          "name": "<string>",
          "description": "<string>",
          "order": 123,
          "hidden": false,
          "icon": "<string>",
          "image": {
            "name": "<string>",
            "description": "<string>",
            "filename": "<string>",
            "path": "<string>",
            "image_url": "<string>"
          },
          "users": [
            {
              "name": "<string>",
              "email": "<string>",
              "email_verified_at": "2023-11-07T05:31:56Z",
              "phone_number": "<string>",
              "position_id": 123,
              "rank_id": 123,
              "specialty_id": 123,
              "status_id": 123,
              "unit_id": 123,
              "approved": true,
              "online": true,
              "notes": "<string>",
              "notes_updated_at": "2023-11-07T05:31:56Z",
              "profile_photo": "<string>",
              "profile_photo_url": "<string>",
              "cover_photo": "<string>",
              "cover_photo_url": "<string>",
              "discord_user_id": "<string>",
              "timezone": "<string>",
              "last_seen_at": "2023-11-07T05:31:56Z",
              "last_assignment_change_date": "2023-11-07T05:31:56Z",
              "last_rank_change_date": "2023-11-07T05:31:56Z"
            }
          ]
        }
      ],
      "id": 123
    }
  ],
  "links": {
    "first": "<string>",
    "last": "<string>",
    "prev": "<string>",
    "next": "<string>"
  },
  "meta": {
    "current_page": 123,
    "from": 123,
    "last_page": 123,
    "path": "<string>",
    "per_page": 123,
    "to": 123,
    "total": 123
  }
}
{
"error": {
"message": "You are not authenticated. Please provide a valid API key that contains your PERSCOM ID to continue.",
"type": "AuthenticationException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}
{
"error": {
"message": "A valid subscription is required to complete this request.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}
{
"error": {
"message": "The API key provided does not have the correct permissions and/or scopes to perform the requested action.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}
{
"error": {
"message": "You have exceeded the API rate limit. Please wait a minute before trying again.",
"type": "ThrottleRequestsException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}
{
"error": {
"message": "The API is currently down for maintenance. Please check back later.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

version
enum<string>
default:v2
required

The API version to use.

Available options:
v1,
v2

Query Parameters

include
enum<string>
Available options:
image,
units,
units.image,
units.users,
units.users.position,
units.users.rank,
units.users.rank.image,
units.users.specialty,
units.users.status,
units.*

Response

OK

data
RosterResource · object[]
meta
ResourceMeta · object