JSON REST API Endpoint Identifiers - JasXSL/GoThongs GitHub Wiki

Endpoint identifiers are the various request types you can make to the API.

GetAssetData

  • Description: Returns information about data types.
  • Permissions: None
  • Target: Array or single entry of UUIDs if player, otherwise asset IDs.

Data:

name type required Description
type string yes A data fetch type of the type of assets you want returned
fields object yes A data fetch object explaining what data you want about each asset

Response:

  • Type: The type you specified in data
  • Id: GoT Asset ID of the type you specified
  • Data: Attributes and/or relationships of the data you specified.

SetGeneric

  • Description: Modified some simple parameters that don't need permissions.
  • Permissions: None
  • Target: A single or an array of SL UUIDs

Data:

name type required Description
add_gold integer no An integer specifying how much gold to add or subtract from a player, represented in copper. So 10 = 1 silver, 100 = 1 gold etc.

Response:

  • Type: user_modified
  • Id: SL Avatar UUID of target

Data:

name type Description
add_gold integer If gold was successfully modified, this will be the value you specified when making the call

SetMap

  • Description: Modifies map data for a user.
  • Permissions: Map
  • Target: A single or an array of SL UUIDs

Data:

name type required Description
land integer no An ID of a land to go to. When adding land to your mod, the ID is presented in the URL bar.

Response:

  • Type: user_modified
  • Id: SL Avatar UUID of target

Data:

name type Description
land integer ID of land you successfully navigated to. 0 if it failed.

SetSettings

  • Description: Modifies user settings.
  • Permissions: Settings
  • Target: A single or an array of SL UUIDs

Data:

name type required Description
active_thong integer no ID of a user_thong asset. Sets your active thong.
active_weapon integer no ID of a user_weapon asset. Sets the weapon on your active thong. If used in conjunction with active_thong, the active_thong call will go through first.
difficulty integer no Difficulty number, between 0 (casual) and 4 (brutal).

Response:

  • Type: user_modified
  • Id: SL Avatar UUID of target

Data:

name type Description
active_thong integer ID of thong activated. Only returned on success.
active_weapon integer ID of weapon activated. Only returned on success.
difficulty integer Difficulty set on avatar. Not included if the difficulty requested was -1

AddResources

  • Description: Subtract essence or reagents from users.
  • Permissions: Resources
  • Target: A single or an array of SL UUIDs

Data:

name type required Description
essence integer no A number specifying how much essence to add. Must be negative.
reagent_0 integer no A number specifying how many Common Manaflowers to add. Must be negative.
reagent_1 integer no A number specifying how many Shimmering Eggs to add. Must be negative.
reagent_2 integer no A number specifying how many Infused Tentacles to add. Must be negative.
reagent_3 integer no A number specifying how many Thuul Crystals to add. Must be negative.

Response:

  • Type: user_modified
  • Id: SL Avatar UUID of target

Data:

name type Description
essence integer Nr essence successfully added, 0 on fail.
reagent_0 integer Nr Common Manaflowers successfully added, 0 on fail.
reagent_1 integer Nr Shimmering Eggs added, 0 on fail.
reagent_2 integer Nr Infused Tentacles added, 0 on fail.
reagent_3 integer Nr Thuul Crystals added, 0 on fail.

AddExperience

  • Description: Add experience to users' active thongs.
  • Permissions: Experience
  • Target: A single or an array of SL UUIDs

Data:

name type required Description
exp integer yes Amount of experience to add. Must be positive.

Response:

  • Type: user_modified
  • Id: SL Avatar UUID of target

Data:

name type Description
levels_gained integer Nr levels the user gained

SetWebhook

  • Description: Sets the webhook url for your mod. Only recommended when you don't have a proper domain name, such as if you're using LSL HTTP IN
  • Permissions: Must have checked "Allow remote webhook URL updates" in the mod
  • Target: An empty string

Data:

name type required Description
url string yes URL to set the webhook to.

Response:

  • Type: mod_modified
  • Id: Unique ID of the mod edited

Data:

name type Description
url string The URL that was set

RefreshUserData

  • Description: Refreshes all user data on the HUD. This call is fairly heavy so use it sparingly.
  • Permissions: None
  • Target: A single or an array of SL agent UUIDs

Data:

An empty object

Response:

  • Type: user_modified
  • Id: SL agent UUID of the user modified

Data:

name type Description
updated integer 1

AddAssets

  • Description: Add one or more assets to the user's inventory.
  • Permissions: Target user does not need the mod activated, but the asset needs to be a part of your mod.
  • Target: A single or an array of SL agent UUIDs

Data:

name type Description
weapons array An array of asset tokens to add
thongs array An array of asset tokens to add
enchants array An array of asset tokens to add. Can also be an array of objects: {token:(str)token, quant:(int)quantity}

Response:

  • Type: user_modified
  • Id: SL agent UUID of the user modified

Data:

name type Description
weapons integer Nr weapons successfully unlocked
thongs integer Nr thongs successfully unlocked
enchants integer Nr enchants successfully added