tabarra / txAdmin

The official FiveM server management platform used by over 23k servers!
https://txadmin.gg/
MIT License
814 stars 549 forks source link

Idea: txAdmin simple REST API #179

Closed djmetla closed 3 years ago

djmetla commented 4 years ago

It is possible? Simple endpoint for web requests for RESTART, START, STOP server authenticated with token Bearer or something else? Maybe oAuth?

Trsak commented 4 years ago

Not sure what would this be used for? Why would you need to control server through API and not directly?

After all, you could just create users with server.control permission.

DmACKGL commented 4 years ago

Not sure what would this be used for? Why would you need to control server through API and not directly?

After all, you could just create users with server.control permission.

For more integrations, like admin websites (external for ESX), Discord Bots, Etc.

gideongrinberg commented 4 years ago

I also agree with this, we should be able to hook into txAdmin's API programmatically. My usecase for this would be adding scripts that use txAdmin features while still keeping txAdmin for manual work.

NoobKeksTV commented 3 years ago

Maybe also an api for getting the playtime of a player?

Gravxd commented 3 years ago

Having an api with an auth system to issue server commands like restart or just console based command in general

HypeLevels commented 3 years ago

Having an api with an auth system to issue server commands like restart or just console based command in general

Console commands can be executed by clicking f8 and typing it in there.

Gravxd commented 3 years ago

Having an api with an auth system to issue server commands like restart or just console based command in general

Console commands can be executed by clicking f8 and typing it in there.

Apologies I was a little unclear. I was meaning in the context of having an API usable by apps like discord bots.

udit2303 commented 3 years ago

A REST API would be very useful incase of using bots like discord bots to access txAdmin directly to ban players, warn players, etc. Maybe also add some rate limiting to prevent spam.

PLOKMJNB commented 3 years ago

Me want API too please, I give cookie too

AvarianKnight commented 3 years ago

API When? Sounds neat

coleminer0112 commented 3 years ago

TxAdmin android app.. coming soon to Google Play Store!

(Jk, I am not an android developer)

But yes, I agree that an endpoint for a POST request or the like allowing you to interface with your TxAdmin (securely) would be great for a discord bot that, for example, can ban players from the FiveM server automatically if their discord is banned from the server's Discord!

edit: Perhaps the authentication could work by creating a hash of the bot's token, then on the bot side you execute the same hashing algorithm on the token - and that becomes your authentication key for allowing API actions in TxAdmin? This obviously would mean that the bot's developer would need to Gatekeep very well and prevent unauthorized use of this by those they don't want interacting with TxAdmin's functions.. but the option would perhaps be useful to some servers

Nimplex commented 3 years ago

Great idea! REST API will be very useful when creating for example a discord bot that will have integration with the server.

caeptnlaen commented 3 years ago

Please API

n0tsiege commented 3 years ago

+1 we want an API

xDreamLand commented 3 years ago

+1 yes api

Arm-0001 commented 3 years ago

+1 api or no more menu 🔫

Nimplex commented 3 years ago

+1 api

TasoOneAsia commented 3 years ago

-1

NoobKeksTV commented 3 years ago

+1

tabarra commented 3 years ago

+1

Hey sir! No double voting! lmao

wowjeeez commented 3 years ago

tx rest api best rest api

kotzeimer commented 3 years ago

+1

Nimplex commented 3 years ago

Well, we can use RCON actually but REST API would be very cool thing

Arm-0001 commented 3 years ago

Well, we can use RCON actually but REST API would be very cool thing

don't think rest API is every coming unless someone other than tabby makes it cause he is l a z y eks dee

TasoOneAsia commented 3 years ago

Very funny Hamy, now let the contributors talk. REST API was in the task list for after stable menu release but at this time, currently unknown timeline.

ghost commented 3 years ago

😭😢

SticksDev commented 3 years ago

rest api +1

tabarra commented 3 years ago

This issue lacks a bit of focus, so I would like to invite anyone interest in using the new issue: #442

eXahostCOM commented 2 years ago

rest api +1

Aimbas commented 2 years ago

+1

GravityScriptsV2 commented 2 years ago

+1

Nimplex commented 2 years ago

This issue lacks a bit of focus, so I would like to invite anyone interest in using the new issue: #442

^^^^