Skip to main content
This documentation provides an outline of the specifications for the KOR API. The API receives data through channel -757982 and responds exclusively to the requesting object on channel -757981 (unless specified otherwise in the request channel field).
Requests must be within a 15m range and utilize JSON messages for structured communication.

Request Fields

FieldDescription
id[Required] Last 12 characters of the target UUID. (e.g., ########-####-####-####-f60daf6b8876)
handleA unique identifier for your requests (max 15 chars). Facilitates request tracking by returning the value in response(s).
sizeLimit on the amount of data to return (Min 50, Max 960).
channelSpecifies the channel for responses (Defaults to -757981).
storeSimilar to fetch except only an array of JSON objects are accepted. The key would be the value of the segment name and the values as another JSON object representing the parameters. (i.e. {"Segment": {"Param1": "Value1", "Param2": "Value2"}})
eventSimilar to store except only a single JSON object is allowed. (i.e. {"Segment": {"Param1": "Value1", "Param2": "Value2"}})
fetchArray of segments to retrieve (e.g., ["colors", "designation"]).

Response Fields

FieldDescription
status200 = Success, 206 = Partial response (spans multiple messages).
sizeNumber of responses expected for the full body.
partThe index of the current response part (starting from 1).
dataThe actual data payload.

Examples

Example I

Request on -757982:
{
  "id": "f60daf6b8876",
  "handle": "TEST",
  "fetch": ["colors"]
}
Response on -757981:
{
  "handle": "TEST",
  "status": 200,
  "data": "{\"colors\":{\"color\":\"<1.00000, 0.00000, 0.00000>\",\"color-2\":\"<0.56000, 0.87500, 1.00000>\",\"color-3\":\"<1.00000, 0.00000, 0.00000>\",\"color-4\":\"<1.00000, 0.00000, 0.00000>\"}}"
}

Example II

Request on -757982:
{
  "id": "f60daf6b8876",
  "channel": -4242,
  "fetch": ["designation"]
}
Response on -4242:
{
  "status": 200,
  "data": "{\"designation\":\"Flosk 'Kobot'\"}"
}

Example III

Request on -757982:
{
  "id": "f60daf6b8876",
  "handle": "ME",
  "channel": -4242,
  "size": 50,
  "fetch": ["colors", "designation"]
}

Scripting with KOR

KOR also interacts with local scripts in the same prim using link messages.
  • Events: KOR broadcasts events on channel 1000.
  • Commands: You can send commands to KOR on channel 1001.
// Sending a command
llMessageLinked(LINK_THIS, 1001, "boot", NULL_KEY);

// Listening for events
link_message(integer sender_num, integer num, string str, key id)
{
    if (num == 1000)
    {
        llOwnerSay("KOR Event: " + str);
    }
}