Session endpoints
info
these are endpoints relating to sessions
info
sessions are active users
the users executor must also support websockets
Getting session info
GET
/sessions/:session_id
Parameters
| Name | Type | Description |
|---|---|---|
| session_id | String | The sessions id |
Response
- Success
{
"success": true,
"session": {
"id": "SESSION_ID",
"user_key": "USER_KEY",
"script_id": "SCRIPT_ID",
"roblox_id": 10234711811,
"place_id": 606849621,
"job_id": "JOB_ID",
"created_at": 1770624500000,
}
}
Disconnecting a session
POST
/sessions/:session_id/disconnect
Parameters
| Name | Type | Description |
|---|---|---|
| session_id | String | The sessions id |
Response
- Success
{ "success": true }
Messaging a session
POST
/sessions/:session_id/message
tip
Check out session commands for how to handle messages
info
Request will wait up to 60 seconds for a response from the client
Parameters
| Name | Type | Description |
|---|---|---|
| session_id | String | The sessions id |
Body
| Name | Type | Nullable | Default | Description |
|---|---|---|---|---|
| key | String | ❌ | Id of function to execute | |
| data | Json | ✅ | [] | Data to send to client |
Response
- Success (processed)
- Success (not processed)
{
"success": true,
"processed": true,
"response": {
// data from client
}
}
{
"success": true,
"processed": false,
"reason": "function errored, message: .." OR "invalid return data" OR "client never responded" OR "function doesnt exist"
}
Disconnecting multiple sessions
POST
/sessions/disconnect
Body
| Name | Type | Nullable | Description |
|---|---|---|---|
| session_ids | String[] | ❌ | Array of ids to disconnect |
Response
- Success
{ "success": true }
Messaging multiple sessions
POST
/sessions/disconnect
tip
Check out session commands for how to handle messages
info
Request will wait up to 60 seconds for a response from the clients
Body
| Name | Type | Nullable | Default | Description |
|---|---|---|---|---|
| session_ids | String[] | ❌ | Array of ids to message | |
| key | String | ❌ | Id of function to execute | |
| data | Json | ✅ | [] | Data to send to client |
Response
- Success
{
"success": true,
"responses": [{
"processed": true,
"response": {
// data from client
}
}, {
"processed": false,
"reason": "function errored, message: .." OR "invalid return data" OR "client never responded" OR "function doesnt exist"
}]}