JSON REST API - JasXSL/GoThongs GitHub Wiki

The JSON REST API has a single endpoint: http://jasx.org/lsl/got/app/mod_api/

Authorization

To authorize a request, you must send a Got-Mod-Token header containing your mod JSON KEY from the mod editor.

Input

Input is a POST request with a single parameter tasks containing a JSON array of task objects.

Task Object

name Type Required Description
type string Yes Endpoint identifier of the call
target string/array Yes A single or multiple targets of your call, such as an array of UUIDs
data object Yes An object of properties for your call
callback string No Any callback data you want back

Output

The output is based on jsonapi http://jsonapi.org/ With a few key differences The document contains multiple jsonapi documents. The response is in the following form:

{
    "jsonapi" : (array)jsonapi_documents,
    "errors" : (array)fatal_errors
} 

Only one of jsonapi or errors key will be present. Errors contains a list of fatal errors. Once you fetch a jsonapi object, it will be mostly compliant with the specification, meaning you should be able to use any sensible library to use it.

If you don't want to use an existing library, here is a list of libraries to use.

Libraries

name language url
GoThongs API LSL lsl Official XOBJ-based library allowing you to use the API through Second Life scripts
GoThongs API PHP php Official PHP library. Can be installed via composer.
todo node.js ???
todo python Maybe chaser wants to do this?

Target Restrictions

All targets are restricted to either a user that has enabled your mod, or an asset that was official or added by your mod.

⚠️ **GitHub.com Fallback** ⚠️