BanCreate
Description: Create a new ban entry.
Permissions: tshock.rest.bans.manage
Nouns:
ip(Optional) [String] - The IP to ban, at least this or name must be specified.
name(Optional) [String] - The name to ban, at least this or ip must be specified.
reason(Optional) [String] - The reason to assign to the ban.
token(Required) [String] - The REST authentication token.
Example Usage: /bans/create?ip=ip&name=name&reason=reason&token=token
BanDestroyV2
Description: Delete an existing ban entry.
Permissions: tshock.rest.bans.manage
Nouns:
ban(Required) [String] - The search criteria, either an IP address or a name.
type(Required) [String] - The type of search criteria, 'ip' or 'name'. Also used as the method of removing from the database.
caseinsensitive(Optional) [Boolean] - Name lookups should be case insensitive.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/bans/destroy?ban=ban&type=type&caseinsensitive=caseinsensitive&token=token
BanInfoV2
Description: View the details of a specific ban.
Permissions: tshock.rest.bans.view
Nouns:
ban(Required) [String] - The search criteria, either an IP address or a name.
type(Required) [String] - The type of search criteria, 'ip' or 'name'.
caseinsensitive(Optional) [Boolean] - Name lookups should be case insensitive.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/bans/read?ban=ban&type=type&caseinsensitive=caseinsensitive&token=token
BanListV2
Description: View all bans in the TShock database.
Permissions: tshock.rest.bans.view
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v2/bans/list?token=token
GroupCreate
Description: Create a new group.
Permissions: tshock.rest.groups.manage
Nouns:
group(Required) [String] - The name of the new group.
parent(Optional) [String] - The name of the parent group.
permissions(Optional) [String] - A comma seperated list of permissions for the new group.
chatcolor(Optional) [String] - A r,g,b string representing the color for this groups chat.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/groups/create?group=group&parent=parent&permissions=permissions&chatcolor=chatcolor&token=token
GroupDestroy
Description: Delete a group.
Permissions: tshock.rest.groups.manage
Nouns:
group(Required) [String] - The group name to delete.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/groups/destroy?group=group&token=token
GroupInfo
Description: Display information of a group.
Permissions: tshock.rest.groups.view
Nouns:
group(Required) [String] - The group name to get information on.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/groups/read?group=group&token=token
GroupList
Description: View all groups in the TShock database.
Permissions: tshock.rest.groups.view
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v2/groups/list?token=token
PlayerBanV2
Description: Add a ban to the database.
Permissions: tshock.rest.ban, tshock.rest.bans.manage
Nouns:
player(Required) [String] - The player to kick.
reason(Optional) [String] - The reason the user was banned.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/players/ban?player=player&reason=reason&token=token
PlayerKickV2
Description: Kick a player off the server.
Permissions: tshock.rest.kick
Nouns:
player(Required) [String] - The player to kick.
reason(Optional) [String] - The reason the player was kicked.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/players/kick?player=player&reason=reason&token=token
PlayerKill
Description: Kill a player.
Permissions: tshock.rest.kill
Nouns:
player(Required) [String] - The player to kick.
from(Optional) [String] - Who killed the player.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/players/kill?player=player&from=from&token=token
PlayerList
Description: List all player names that are currently on the server.
No special permissions are required for this route.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /lists/players?token=token
PlayerListV2
Description: Fetches detailed user information on all connected users, and can be filtered by specifying a key value pair filter users where the key is a field and the value is a users field value.
No special permissions are required for this route.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v2/players/list?token=token
PlayerMute
Description: Mute a player.
Permissions: tshock.rest.mute
Nouns:
player(Required) [String] - The player to mute.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/players/mute?player=player&token=token
PlayerReadV3
Description: Get information for a user.
Permissions: tshock.rest.users.info
Nouns:
player(Required) [String] - The player to lookup
token(Required) [String] - The REST authentication token.
Example Usage: /v3/players/read?player=player&token=token
PlayerUnMute
Description: Unmute a player.
Permissions: tshock.rest.mute
Nouns:
player(Required) [String] - The player to mute.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/players/unmute?player=player&token=token
ServerBroadcast
Description: Broadcast a server wide message.
No special permissions are required for this route.
Nouns:
msg(Required) [String] - The message to broadcast.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/server/broadcast?msg=msg&token=token
ServerCommandV3
Description: Executes a remote command on the server, and returns the output of the command.
Permissions: tshock.rest.command
Nouns:
cmd(Required) [String] - The command and arguments to execute.
token(Required) [String] - The REST authentication token.
Example Usage: /v3/server/rawcmd?cmd=cmd&token=token
ServerMotd
Description: Returns the motd, if it exists.
No special permissions are required for this route.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v3/server/motd?token=token
ServerOff
Description: Turn the server off.
Permissions: tshock.rest.maintenance
Nouns:
confirm(Required) [Boolean] - Required to confirm that actually want to turn the server off.
message(Optional) [String] - The shutdown message.
nosave(Optional) [Boolean] - Shutdown without saving.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/server/off?confirm=confirm&message=message&nosave=nosave&token=token
ServerReload
Description: Reload config files for the server.
Permissions: tshock.rest.cfg
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v3/server/reload?token=token
ServerRestart
Description: Attempt to restart the server.
Permissions: tshock.rest.maintenance
Nouns:
confirm(Required) [Boolean] - Confirm that you actually want to restart the server
message(Optional) [String] - The shutdown message.
nosave(Optional) [Boolean] - Shutdown without saving.
token(Required) [String] - The REST authentication token.
Example Usage: /v3/server/restart?confirm=confirm&message=message&nosave=nosave&token=token
ServerRules
Description: Returns the rules, if they exist.
No special permissions are required for this route.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v3/server/rules?token=token
ServerStatusV2
Description: Get a list of information about the current TShock server.
No special permissions are required for this route.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v2/server/status?token=token
ServerTokenTest
Description: Test if a token is still valid.
No special permissions are required for this route.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /tokentest?token=token
UserActiveListV2
Description: Returns the list of user accounts that are currently in use on the server.
Permissions: tshock.rest.users.view
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v2/users/activelist?token=token
UserCreateV2
Description: Create a new TShock user account.
Permissions: tshock.rest.users.manage
Nouns:
user(Required) [String] - The user account name for the new account.
group(Optional) [String] - The group the new account should be assigned.
password(Required) [String] - The password for the new account.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/users/create?user=user&group=group&password=password&token=token
UserDestroyV2
Description: Destroy a TShock user account.
Permissions: tshock.rest.users.manage
Nouns:
user(Required) [String] - The search criteria (name or id of account to lookup).
type(Required) [String] - The search criteria type (name for name lookup, id for id lookup).
token(Required) [String] - The REST authentication token.
Example Usage: /v2/users/destroy?user=user&type=type&token=token
UserInfoV2
Description: List detailed information for a user account.
Permissions: tshock.rest.users.view
Nouns:
user(Required) [String] - The search criteria (name or id of account to lookup).
type(Required) [String] - The search criteria type (name for name lookup, id for id lookup).
token(Required) [String] - The REST authentication token.
Example Usage: /v2/users/read?user=user&type=type&token=token
UserListV2
Description: Lists all user accounts in the TShock database.
Permissions: tshock.rest.users.view
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v2/users/list?token=token
UserUpdateV2
Description: Update a users information.
Permissions: tshock.rest.users.manage
Nouns:
user(Required) [String] - The search criteria (name or id of account to lookup).
type(Required) [String] - The search criteria type (name for name lookup, id for id lookup).
password(Optional) [String] - The users new password, and at least this or group must be defined.
group(Optional) [String] - The new group for the user, at least this or password must be defined.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/users/update?user=user&type=type&password=password&group=group&token=token
WorldBloodmoon
Description: Toggle the status of blood moon.
Permissions: tshock.rest.causeevents
Verbs:
bloodmoon(Required) [Boolean] - State of bloodmoon.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /world/bloodmoon/{bloodmoon}?token=token
WorldButcher
Description: Butcher npcs.
Permissions: tshock.rest.butcher
Nouns:
killfriendly(Optional) [Boolean] - Should friendly npcs be butchered.
token(Required) [String] - The REST authentication token.
Example Usage: /v2/world/butcher?killfriendly=killfriendly&token=token
WorldMeteor
Description: Drops a meteor on the world.
Permissions: tshock.rest.causeevents
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /world/meteor?token=token
WorldRead
Description: Get information regarding the world.
No special permissions are required for this route.
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /world/read?token=token
WorldSave
Description: Save the world.
Permissions: tshock.rest.cfg
Nouns:
token(Required) [String] - The REST authentication token.
Example Usage: /v2/world/save?token=token