POST/businesses/{business}/console
Send one command to the game console. Read /logs for the answer.
Needs the commands:run scope.
Parameters
business integer, in path, required
- The business id, from GET /businesses.
Body
command string
- For example
say Restarting in 5 minutes
curl -X POST "https://helstify.com/api/v1/businesses/60/console" \
-H "Authorization: Bearer $HELSTIFY_KEY" \
-H "Content-Type: application/json" \
-d '{"command":"say Restarting in 5 minutes"}'
const res = await fetch("https://helstify.com/api/v1/businesses/60/console", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HELSTIFY_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"command": "say Restarting in 5 minutes"
}),
});
const data = await res.json();
import os, requests
res = requests.post(
"https://helstify.com/api/v1/businesses/60/console",
headers={"Authorization": f"Bearer {os.environ['HELSTIFY_KEY']}"},
json={
"command": "say Restarting in 5 minutes"
},
)
print(res.json())
Response200
{
"ok": true,
"business": "StampedeMC",
"sent": "say Restarting in 5 minutes",
"note": "Read /logs to see what the server answered."
}
POST/businesses/{business}/power
Players are disconnected by anything but start.
Needs the power scope.
Parameters
business integer, in path, required
- The business id, from GET /businesses.
Body
signal string
- For example
restart
curl -X POST "https://helstify.com/api/v1/businesses/60/power" \
-H "Authorization: Bearer $HELSTIFY_KEY" \
-H "Content-Type: application/json" \
-d '{"signal":"restart"}'
const res = await fetch("https://helstify.com/api/v1/businesses/60/power", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HELSTIFY_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"signal": "restart"
}),
});
const data = await res.json();
import os, requests
res = requests.post(
"https://helstify.com/api/v1/businesses/60/power",
headers={"Authorization": f"Bearer {os.environ['HELSTIFY_KEY']}"},
json={
"signal": "restart"
},
)
print(res.json())
Response200
{
"ok": true,
"business": "StampedeMC",
"signal": "restart"
}