8f623f8b4ee4e7e1c12e6698a
Base URL: https://api.catquery.com
GET /connections/trakt
Authorization: Bearer <your-api-token>
{
"connection": {
"platformUsername": "myTraktSlug",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z"
}
}
GET /connections/trakt
Authorization: Bearer <your-api-token>
{
"connection": null
}
POST /connections/trakt
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"platformUsername": "myTraktSlug"
}
{
"connection": {
"platformUsername": "myTraktSlug",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z"
}
}
PUT /connections/trakt
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"platformUsername": "myNewTraktSlug"
}
{
"connection": {
"platformUsername": "myNewTraktSlug",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-06-01T00:00:00.000Z"
}
}
PUT /connections/trakt
Authorization: Bearer <your-api-token>
{
"error": "No Trakt connection found. Use POST to create one."
}
DELETE /connections/trakt
Authorization: ******
{
"success": true
}
DELETE /connections/trakt
Authorization: ******
{
"error": "No Trakt connection found."
}
GET /health
{
"status": "ok",
"uptime": "N/A",
"memory": "N/A",
"cpu": "N/A",
"channelsJoined": 0,
"totalChannels": 0,
"ws": 0,
"msgsPerMin": 0
}
GET /health
{
"status": "ok",
"uptime": "2h 34m",
"memory": "156.3 MB",
"cpu": "2.5%",
"channelsJoined": 42,
"totalChannels": 50,
"ws": 3,
"msgsPerMin": 1234
}
GET /lastWatched?userId=123456789
{
"type": "episode",
"watched_at": "2025-11-22T10:00:00Z",
"show": {
"title": "Breaking Bad",
"year": 2008
},
"episode": {
"season": 3,
"number": 7,
"title": "One Minute"
},
"movie": null
}
GET /lastWatched?userId=123456789
{
"type": "movie",
"watched_at": "2025-10-15T08:30:00Z",
"movie": {
"title": "Inception",
"year": 2010
},
"show": null,
"episode": null
}
GET /lastWatched
{
"error": "userId parameter is required"
}
GET /nameChanges?userId=123456789
{
"nameChanges": [
{
"id": 1,
"user_id": "123456789",
"old_username": "oldusername",
"new_username": "newusername",
"changed_at": "2025-11-22T10:00:00Z"
},
{
"id": 2,
"user_id": "123456789",
"old_username": "previousname",
"new_username": "oldusername",
"changed_at": "2025-10-15T08:30:00Z"
}
]
}
GET /nameChanges
{
"error": "userId parameter is required"
}
POST /reboot
Authorization: Bearer <your-api-token>
{
"status": "rebooting",
"message": "VM reboot initiated"
}
POST /reboot
{
"error": "Unauthorized"
}
POST /redirects
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com"
}
{
"redirect": {
"url": "https://r.example.com/a1b2c3d4",
"createdAt": "2025-01-01T00:00:00.000Z"
}
}
POST /redirects
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com",
"slug": "my-link"
}
{
"redirect": {
"url": "https://r.example.com/my-link",
"createdAt": "2025-01-01T00:00:00.000Z"
}
}
POST /redirects
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"url": "https://example.com"
}
{
"redirect": {
"url": "https://r.example.com/a1b2c3d4",
"createdAt": "2025-01-01T00:00:00.000Z"
}
}
POST /restart
Authorization: Bearer <your-api-token>
{
"status": "restarting",
"message": "Bot restart initiated"
}
POST /restart
{
"error": "Unauthorized"
}
POST /stream-key
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"streamKey": "live_abc123..."
}
{
"success": true
}
PUT /stream-key
Authorization: Bearer <your-api-token>
Content-Type: application/json
{
"streamKey": "live_xyz789..."
}
{
"success": true
}
PUT /stream-key
Authorization: Bearer <your-api-token>
{
"error": "No stream key found. Use POST to create one."
}
DELETE /stream-key
Authorization: ******
{
"success": true
}
DELETE /stream-key
Authorization: ******
{
"error": "No stream key found."
}