WebQuery discussion/help (3.12.0 onwards)

Hey, i wanna list the most inactive channels with the api.
I use ‘channellist’ to iterate through all channels. Then I want to get the inactivity information. I have tried using the ‘channelinfo’ api, but there is the inactivity information missing. Can I get the inactivity with this api?

The problem is, i only get this result: “seconds_empty”: “-1”.
All the time.

Edit: I tried a different channel, there it seems to work. But why do I get on some channel -1?

Ps it’s more efficient to ask for the channellist and add the -secondsempty parameter.

http://localhost:10080/1/channellist?-secondsempty&api-key=xyz

-1 definitely means someone is inside. Couldthe the Query in the moment you did send the request.

2 Likes

Any news about the new event system?

1 Like

Hello

How start and stop with API Teamspeak3 pls ?

I tested :http://localhost:10080/1/serverstop?api-key=APIKEYHERE
1 is my server ID and serverstop the (query) command.

return :{“status”:{“code”:1539,“message”:“parameter not found”}}

Thank you

Hello @FakE

I thought that the sid parameter was replaced by “/1/”.
I had not understood actually now that function perfectly.

And there is no need for “/1/” here is the right way to use it.

http://localhost:10080/serverstop?sid=1&api-key=APIKEYHERE
or
http://localhost:10080/serverstart?sid=1&api-key=APIKEYHERE

Thanks for the help

Depends on the command.
The /1/ specifies on which virtual server to run the command. For serverstop and some other instance commands it doesn’t matter where you run them, so it will work without specifying. But you will have still specify the parameters for the command you’re running, in this case which server to stop.
For commands that require a virtual server context it makes all the difference which one you specify.

3 Likes

Thank for information @TS_Chris

Is it normal that when creating a channel using Web Query, the characters “[” “]” are not supported and the Russian language is also not supported? Or am I doing something wrong?

Thanks for the solution. I am writing on php and using urlencode ($channelname) solved both the problems with symbols and with the Russian language.

1 Like

Want to know this, too.

1 Like

Hey, is there something new for the webquery implementation? Especially a way to subscribe to serverevents (messages, clientmove, etc.).
I started to develop some scripts and would like to do that with the new api if possible.

ATM you have to use the old telnet api for events.

@FakE, could you please give me some examples of messages to use with the “SENDTEXTMESSAGE” method?
I mean, with the old ServerQuery I was used to use the “\s” to whitespace, but with the WebQuery, for example, its a “+”. The “\n”, “\t” and BBCode, etc, doesn’t work too.

Thanks in advance for your attention.

Cheers

Hi,
I like the WebQuery, but I am little bit confused about serversnapshotdeploy
With “https://name:port/sid/serversnapshotcreate” I´m getting this “data” string.
Which parameter I will need to use for serversnapshotdeploy?
https://name:port/sid/serversnapshotdeploy?datastring” is not working
https://name:port/sid/serversnapshotdeploy?snapshot=datastring” is not working
I´m always getting 1537 “invalid parameter count”
Which parameter is missing? :frowning:

Any news on this? Looked at the changelogs and can not find something.

In my tests TS isn’t honoring Forwarded headers (Forwarded - HTTP | MDN) when enacting ip allow/deny lists. Is this correct or am I missing something? I did a quick search in the docs but couldn’t find anything related to trusted proxy settings etc… I whitelisted the reverse proxy in TS and implemented a ip whitelist within the proxy as a workaround for now, but maybe I’m just missing a setting or something?

I see that I’m not the first to ask this, but could better documentation for the Teamspeak API be a priority? I’m having to constantly search this thread for member’s who’ve documented how to use specific end-points or my self by trial and error using the existing Server Query Manual.

It’s proving incredibly tedious trying to implement the API as I can’t model interfaces, types, etc for an end-point responses until I test each one using something like Postman.

Using something like swagger.io or redoc.ly for documentation would be very useful!

I also noticed how all properties in a response are always Strings, even when some should be integer/float, such as: cid, clid, client_database_id, etc. Would be useful if these could be returned as the correct type.

2 Likes

+1

There’s a reason as to why they are returned as strings, and I assume that this is to provide more flexibility in TeamSpeak 5.