Does the server provide an externally accessible API?

Hi all

I’m developing a resource that needs to accept commands from an external source (i.e. a separate server). I’m wondering if it’s possible for a server-side resource to do this? I’m thinking maybe an HTTP API or similar? I’ve scoured the docs and been unable to find anything, so I’m hoping the relevant information has eluded me!

Many thanks!

You could use SetHttpHandler() example of usage is in default runcode resource or check this topic Host .json file like info.json or players.json

Thanks for the super speedy reply! SetHttpHandler() seems to be exactly what I was looking for! I’ll have a play and see what happens. Many thanks :slight_smile:

1 Like

A typical nodejs api router is possible too (server side). You’re pretty much free to do what you want on the server side. In Lua, C# and JS

1 Like

Oooh, that’s very useful to know, thanks. I’m imagining a number of different routes being required, so being able to create a proper router will make this much more manageable.