Get detailed information about a specific user in a roster.
This endpoint returns detailed information about a specific user in a roster page. The response includes the user's name, Discord ID, rank, certifications, subdivisions, and patrol hours (if available).
Name | Type | Required | Description |
---|---|---|---|
page_id | string | Yes | The UUID of the roster page (e.g., c88006c8-b9ea-433c-8a8b-749ec1af0756) |
discord_id | string | Yes | The Discord ID of the user to retrieve information for |
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Field | Type | Description |
---|---|---|
name | string | The name of the user |
discord_id | string | The Discord ID of the user |
discord_username | string | The Discord username of the user |
rank | string | The rank of the user |
certifications | array | Array of certification names the user has |
subdivisions | array | Array of subdivision names the user belongs to |
promotion_date | string | The date the user was promoted to their current rank (YYYY-MM-DD) |
promotion_officer | string | The name of the officer who promoted the user |
patrol_hours | number | The number of patrol hours the user has (if patrol logs are enabled) |
{ "name": "John Doe", "discord_id": "123456789012345678", "discord_username": "johndoe", "rank": "Commander", "certifications": ["Firearms", "Driving"], "subdivisions": ["SWAT", "K9"], "promotion_date": "2025-01-15", "promotion_officer": "Jane Smith", "patrol_hours": 42.5 }
{ "error": "Roster page not found" }
{ "error": "User not found in roster" }
{ "error": "Invalid or missing API key" }
{ "error": "API access requires premium subscription" }
{ "error": "You do not have permission to access this roster" }
This error occurs when you try to access a roster that you don't own. For security reasons, API keys can only access rosters owned by the user who created the API key.
curl -X GET "https://autorosters.com/api/roster/c88006c8-b9ea-433c-8a8b-749ec1af0756/123456789012345678" \ -H "X-API-Key: your-api-key-here"
import requests api_key = "your-api-key-here" page_id = "c88006c8-b9ea-433c-8a8b-749ec1af0756" discord_id = "123456789012345678" url = f"https://autorosters.com/api/roster/{page_id}/{discord_id}" headers = { "X-API-Key": api_key } response = requests.get(url, headers=headers) data = response.json() print(data)
const apiKey = "your-api-key-here"; const pageId = "c88006c8-b9ea-433c-8a8b-749ec1af0756"; const discordId = "123456789012345678"; const url = `https://autorosters.com/api/roster/${pageId}/${discordId}`; fetch(url, { method: "GET", headers: { "X-API-Key": apiKey } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error("Error:", error));