Skip to content

History API

history API endpoints

Quick Reference

MethodEndpointAuthDescription
GET/api/items/history/:itemType🔓GET /api/items/history/[itemType] Fetch history fo...
POST/api/items/history/snapshot🔓POST /api/items/history/snapshot Create an explici...
POST/api/items/history/restore🔓POST /api/items/history/restore Restore an item to...

Endpoints

GET /api/items/history/:itemType

GET /api/items/history/[itemType] Fetch history for a specific item (weapon, knife, or glove) Query parameters: - steamId: string (required) - loadoutId: number (required) - defindex: number (required) - team: number (required) - category: string (optional, for weapons: rifles, pistols, smgs, heavys) - limit: number (optional, default 20) - offset: number (optional, default 0)

Path Parameters

ParameterTypeRequiredDescription
itemTypestringYes-

📁 Source: server/api/items/history/[itemType].get.ts


POST /api/items/history/snapshot

POST /api/items/history/snapshot Create an explicit snapshot (pinned version) of an item's configuration Body: - steamId: string (required) - loadoutId: number (required) - itemType: 'weapon' | 'knife' | 'glove' (required) - category: string (optional, for weapons: rifles, pistols, smgs, heavys) - defindex: number (required) - team: number (required) - configuration: ItemHistorySnapshot (required) - description: string (optional)

📁 Source: server/api/items/history/snapshot.post.ts


POST /api/items/history/restore

POST /api/items/history/restore Restore an item to a previous version from history Body: - historyId: number (required) - The ID of the history record to restore - steamId: string (required) - Must match the history record owner

📁 Source: server/api/items/history/restore.post.ts


Built with ❤️ by the CS2Inspect community