RCChat API
AI-powered RunCloud management through conversational API

API Endpoints

Base URL: https://rcchat.rcdev.my.id

Method Endpoint Purpose Request Body Response Auth
POST /init Initialize chat session {"app_key": "string"} {"status": "initialized", "roomId": "string", "userToken": "string"} None
POST /chats Send message & get AI response {"q": "string"} {"a": "string", "actions": {}} Required
GET /chats Get chat history None {"roomId": "string", "msgs": [], "app_key": "string"} Required
DELETE /chats Clear chat messages None {"status": "cleared", "message": "string"} Required

Authentication

Required Headers: All endpoints except /init require both roomId and userToken
Authorization: Bearer <userToken> X-Room-Id: <roomId>

Usage Examples

1. Initialize Session

curl -X POST https://rcchat.rcdev.my.id/init \ -H "Content-Type: application/json" \ -d '{"app_key": "my-app-123"}' # Response: {"status":"initialized","roomId":"abc123","userToken":"xyz789..."}

2. Send RunCloud Commands

curl -X POST https://rcchat.rcdev.my.id/chats \ -H "Content-Type: application/json" \ -H "Authorization: Bearer xyz789..." \ -H "X-Room-Id: abc123" \ -d '{"q": "list my servers"}' # Response: {"a": "Here are your servers: ...", "actions": {}}

3. Get Chat History

curl -X GET https://rcchat.rcdev.my.id/chats \ -H "Authorization: Bearer xyz789..." \ -H "X-Room-Id: abc123" # Response: {"roomId": "abc123", "msgs": [...], "app_key": "my-app-123"}

Example Commands

Features