No ticket, no passport, just an address!  

Statistics
General
  Users: 16222
Stargates
  Connections: 0
  Total: 409
  Milkyway: 152
  Pegasus: 89
  Forerunner: 78
  Tollan: 90
Teleporters
  Total: 3
Miscellaneous
  AFVIs: 6
 

ASN API 1.1

1. Overview

This API is intended to mostly replicate how the 1.0 API worked, but providing valid XML and JSON responses.

The Alteran Stargate Network provides external APIs that developers can access via HTTP requests. An API key is required for authentication. API keys are not to be shared publicly or in readable form, as they grant access to sensitive services.

However, this doesn't prevent their use in customer products. To maintain security, API keys must be obfuscated or hidden, such as within 'no modify' permissioned scripts in Second Life or retrieved securely using functions like llReadKeyValue() from an experience. This ensures functionality for users while protecting the integrity of the key.

To obtain one, please submit a support ticket.

The API can return responses in JSON or XML format and supports customizable character encoding. The default format is XML, and the default character encoding is UTF-8.

Base URL

http://stargate.alpha-fox.com/api/1.1/

2. Authentication

  • API Key Required: Yes
  • How to Use: Include your API key as a query parameter in each request, for example: ?apikey=yourkeyhere

3. Request Parameters

The following parameters are recognized by the Stargate API. Some are required, while others are optional or depend on the chosen endpoint (what):

Parameter Type Required? Description
apikey string Required Your API key for authentication.
what string Required The action or endpoint to request. Valid values: info, recentgates, activegates, gatelogs, nearby, address
format string Optional Desired response format. Accepted values: json or xml. Defaults to xml.
encoding string Optional Character encoding. Accepted values: utf8 or ascii. Defaults to utf8.
limit_body integer Optional Restricts response body size (minimum: 1024 bytes). Only applies to JSON responses. Useful in environments like Second Life, which have HTTP size limits.

Additional Required Parameters by Endpoint

  • info

    • keyword (string, required): Used for filtering results.
    • network (string, optional): Specifies a Stargate network (e.g., "Milkyway", "Pegasus", "any").
  • search

    • keyword (string, required): Used for filtering results.
    • network (string, optional): Specifies a Stargate network (e.g., "Milkyway", "Pegasus", "any").
  • recentgates

    • (No additional parameters required)
  • activegates

    • (No additional parameters required)
  • gatelogs

    • (No additional parameters required)
  • nearby

    • x (float, required)
    • y (float, required)
    • z (float, required)
    • network (string, optional): Specifies a Stargate network (e.g., "Milkyway", "Pegasus", "any").
  • address

    • keyword (string, required)
    • network (string, optional): Specifies a Stargate network (e.g., "Milkyway", "Pegasus", "any").

4. Endpoints

4.1. activegates

Description: Retrieves all gates currently connected to the network.

Example Request:

GET http://stargate.alpha-fox.com/api/1.1/?what=activegates&apikey=yourkeyhere&format=json
Example Response (JSON):
{
  "Stargate": [
    {
      "ID": "1",
      "Name": "Mystery Lake",
      "Alias": "Ancient Ruins",
      "Network": "milkyway",
      "Status": "idle",
      "Shield": "0",
      "ContactTime": "1741004493",
      "InitTime": "1275138349",
      "Version": "1.1.3",
      "Combat": "0",
      "Sandbox": "0",
      "ConnectedID": "0",
      "SimFPS": "45.03181",
      "SimTimeDialation": "1",
      "SimDirectTP": "1",
      "ListedOnRandom": "1",
      "AddressMilkyway": "9,19,34,10,32,22",
      "AddressPegasus": "25,11,5,28,12,26,29",
      "ForwardAddress": [],
      "Type": "milkyway",
      "UUID": "12f50cc3-f0ce-7f7a-2978-cbe5185210c5",
      "SGCID": "PSM-388",
      "Region": "Han Loso",
      "Position": "<66.201202,195.799194,63.334061>",
      "Rotation": "<0.000000,0.000000,0.923880,0.382683>",
      "OwnerName": "Ash Qin",
      "OwnerUUID": "0f15391e-105f-4b05-91e3-48b73c60ae64"
    },
    {
      "ID": "980164",
      "Name": "Rustic Alteran Stargate",
      "Alias": [],
      "Network": "milkyway",
      "Status": "idle",
      "Shield": "0",
      "ContactTime": "1741004572",
      "InitTime": "1540744621",
      "Version": "1.1.3",
      "Combat": "0",
      "Sandbox": "0",
      "ConnectedID": "0",
      "SimFPS": "44.94407",
      "SimTimeDialation": "1",
      "SimDirectTP": "1",
      "ListedOnRandom": "1",
      "AddressMilkyway": "10,27,25,11,22,28",
      "AddressPegasus": "25,12,20,16,13,15,4",
      "ForwardAddress": [],
      "Type": "tollan",
      "UUID": "206002ed-611a-a4de-21ea-325925dad6dc",
      "SGCID": "PRY-3FA",
      "Region": "Rustic",
      "Position": "<75.354950,224.158783,23.347902>",
      "Rotation": "<-0.000000,-0.000000,0.707107,0.707107>",
      "OwnerName": "Mick Trill",
      "OwnerUUID": "eab10c01-83c4-4af9-b9bb-ef108341a0f1"
    },
    {
      "ID": "980239",
      "Name": "Rydal Alteran Stargate",
      "Alias": [],
      "Network": "pegasus",
      "Status": "idle",
      "Shield": "0",
      "ContactTime": "1741004523",
      "InitTime": "1540747456",
      "Version": "1.1.3",
      "Combat": "0",
      "Sandbox": "0",
      "ConnectedID": "0",
      "SimFPS": "45.00435",
      "SimTimeDialation": "1",
      "SimDirectTP": "1",
      "ListedOnRandom": "1",
      "AddressMilkyway": "18,10,21,19,11,31,29",
      "AddressPegasus": "12,13,28,14,24,32",
      "ForwardAddress": [],
      "Type": "pegasus",
      "UUID": "557e9ed5-57e0-7c05-067b-d8cf934a8d02",
      "SGCID": "MSK-3EB",
      "Region": "Rydal",
      "Position": "<198.551590,58.124046,26.897665>",
      "Rotation": "<0.000000,0.000000,0.694658,0.719340>",
      "OwnerName": "Yann Tatsu",
      "OwnerUUID": "aa21d783-d013-43a7-af8c-5a4680f3ec3a"
    }
  ]
}
Example Response (XML):
<StargateNetwork>
  <Stargate>
    <ID>1</ID>
    <Name>Mystery Lake</Name>
    <Alias>Ancient Ruins</Alias>
    <Network>milkyway</Network>
    <Status>idle</Status>
    <Shield>0</Shield>
    <ContactTime>1741004793</ContactTime>
    <InitTime>1275138349</InitTime>
    <Version>1.1.3</Version>
    <Combat>0</Combat>
    <Sandbox>0</Sandbox>
    <ConnectedID>0</ConnectedID>
    <SimFPS>45.00829</SimFPS>
    <SimTimeDialation>0.999284</SimTimeDialation>
    <SimDirectTP>1</SimDirectTP>
    <ListedOnRandom>1</ListedOnRandom>
    <AddressMilkyway>9,19,34,10,32,22</AddressMilkyway>
    <AddressPegasus>25,11,5,28,12,26,29</AddressPegasus>
    <ForwardAddress/>
    <Type>milkyway</Type>
    <UUID>12f50cc3-f0ce-7f7a-2978-cbe5185210c5</UUID>
    <SGCID>PSM-388</SGCID>
    <Region>Han Loso</Region>
    <Position>&lt;66.201202,195.799194,63.334061&gt;</Position>
    <Rotation>&lt;0.000000,0.000000,0.923880,0.382683&gt;</Rotation>
    <OwnerName>Ash Qin</OwnerName>
    <OwnerUUID>0f15391e-105f-4b05-91e3-48b73c60ae64</OwnerUUID>
  </Stargate>
  <Stargate>
    <ID>980164</ID>
    <Name>Rustic Alteran Stargate</Name>
    <Alias/>
    <Network>milkyway</Network>
    <Status>idle</Status>
    <Shield>0</Shield>
    <ContactTime>1741004572</ContactTime>
    <InitTime>1540744621</InitTime>
    <Version>1.1.3</Version>
    <Combat>0</Combat>
    <Sandbox>0</Sandbox>
    <ConnectedID>0</ConnectedID>
    <SimFPS>44.94407</SimFPS>
    <SimTimeDialation>1</SimTimeDialation>
    <SimDirectTP>1</SimDirectTP>
    <ListedOnRandom>1</ListedOnRandom>
    <AddressMilkyway>10,27,25,11,22,28</AddressMilkyway>
    <AddressPegasus>25,12,20,16,13,15,4</AddressPegasus>
    <ForwardAddress/>
    <Type>tollan</Type>
    <UUID>206002ed-611a-a4de-21ea-325925dad6dc</UUID>
    <SGCID>PRY-3FA</SGCID>
    <Region>Rustic</Region>
    <Position>&lt;75.354950,224.158783,23.347902&gt;</Position>
    <Rotation>&lt;-0.000000,-0.000000,0.707107,0.707107&gt;</Rotation>
    <OwnerName>Mick Trill</OwnerName>
    <OwnerUUID>eab10c01-83c4-4af9-b9bb-ef108341a0f1</OwnerUUID>
  </Stargate>
  <Stargate>
    <ID>980239</ID>
    <Name>Rydal Alteran Stargate</Name>
    <Alias/>
    <Network>pegasus</Network>
    <Status>idle</Status>
    <Shield>0</Shield>
    <ContactTime>1741004823</ContactTime>
    <InitTime>1540747456</InitTime>
    <Version>1.1.3</Version>
    <Combat>0</Combat>
    <Sandbox>0</Sandbox>
    <ConnectedID>0</ConnectedID>
    <SimFPS>45.00002</SimFPS>
    <SimTimeDialation>1</SimTimeDialation>
    <SimDirectTP>1</SimDirectTP>
    <ListedOnRandom>1</ListedOnRandom>
    <AddressMilkyway>18,10,21,19,11,31,29</AddressMilkyway>
    <AddressPegasus>12,13,28,14,24,32</AddressPegasus>
    <ForwardAddress/>
    <Type>pegasus</Type>
    <UUID>557e9ed5-57e0-7c05-067b-d8cf934a8d02</UUID>
    <SGCID>MSK-3EB</SGCID>
    <Region>Rydal</Region>
    <Position>&lt;198.551590,58.124046,26.897665&gt;</Position>
    <Rotation>&lt;0.000000,0.000000,0.694658,0.719340&gt;</Rotation>
    <OwnerName>Yann Tatsu</OwnerName>
    <OwnerUUID>aa21d783-d013-43a7-af8c-5a4680f3ec3a</OwnerUUID>
  </Stargate>
</StargateNetwork>

4.2. address

Description: Retrieves address information of a specific gate.

Required Parameters:

  • keyword (string)

Optional Parameters:

  • target_network (string)

Example Request:

GET http://stargate.alpha-fox.com/api/1.1/?what=address&apikey=yourkeyhere&keyword=Dolly%20Dreams&target_network=Milkyway&format=json
Example Response (JSON):
{
  "SUCCESS": "11,32,5,10,28,18"
}
Example Response (XML):
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <SUCCESS>11,32,5,10,28,18</SUCCESS>
</response>

4.3. gatelogs

Description: Retrieves logs of gate activities.

1. 0 Compatibility notes: The API originally returned only FromOwner and ToOwner which was just the Second life names. In 1.1 these have been renamed to FromOwnerName and ToOwnerName and added UUIDs, FromOwnerUUID and ToOwnerUUID.

Example Request:

GET http://stargate.alpha-fox.com/api/1.1/?what=gatelogs&apikey=yourkeyhere&format=json
Example Response (JSON):
{
  "Log": [
    {
      "ID": "4021634",
      "FromID": "1004927",
      "ToID": "1004656",
      "FromAddress": "14,23,17,4,38,18",
      "ToAddress": "16,22,24,6,28,32",
      "FromRegion": "Jacksboro",
      "ToRegion": "Demonpaws Isle",
      "Duration": "71",
      "StartTime": "1741004115",
      "FromOwnerName": "Inari Demonpaws",
      "ToOwnerName": "Inari Demonpaws",
      "FromOwnerUUID": "6e0d832a-281a-4b8b-a0d8-7bd869164f25",
      "ToOwnerUUID": "6e0d832a-281a-4b8b-a0d8-7bd869164f25",
      "FromNetwork": "milkyway",
      "ToNetwork": "pegasus",
      "ConnectionID": "9v6dg0cwe43y8jiqpgt5kqvdh9oxl77erdom"
    },
    {
      "ID": "4021632",
      "FromID": "1004656",
      "ToID": "1004927",
      "FromAddress": "16,22,24,6,28,32",
      "ToAddress": "14,23,17,4,38,18",
      "FromRegion": "Demonpaws Isle",
      "ToRegion": "Jacksboro",
      "Duration": "68",
      "StartTime": "1741003463",
      "FromOwnerName": "Inari Demonpaws",
      "ToOwnerName": "Inari Demonpaws",
      "FromOwnerUUID": "6e0d832a-281a-4b8b-a0d8-7bd869164f25",
      "ToOwnerUUID": "6e0d832a-281a-4b8b-a0d8-7bd869164f25",
      "FromNetwork": "pegasus",
      "ToNetwork": "milkyway",
      "ConnectionID": "yt96lqs79we9xvug6iour8uj2i05o4w54sld"
    },
    {
      "ID": "4021631",
      "FromID": "1004923",
      "ToID": "1004061",
      "FromAddress": "12,32,36,4,26,38",
      "ToAddress": "14,16,20,8,32,12",
      "FromRegion": "South Park",
      "ToRegion": "Multiverse",
      "Duration": "74",
      "StartTime": "1741002629",
      "FromOwnerName": "sandy4000 Resident",
      "ToOwnerName": "Vala Avro",
      "FromOwnerUUID": "e2cd6051-bfdc-4320-92fe-99f139e3518a",
      "ToOwnerUUID": "10926a74-d8a9-4dcd-946b-c9bc0e7772a1",
      "FromNetwork": "milkyway",
      "ToNetwork": "milkyway",
      "ConnectionID": "dqvkimdf7334oxrmr4ulj13tvxnm4omet23"
    }
  ]
}
Example Response (XML):
<?xml version="1.0" encoding="UTF-8"?>
<StargateLogs>
  <Log>
    <ID>4021694</ID>
    <FromID>1000372</FromID>
    <ToID>981421</ToID>
    <FromAddress>12,30,24,13,31,4</FromAddress>
    <ToAddress>12,20,8,19,2,31</ToAddress>
    <FromRegion>Hochkonig</FromRegion>
    <ToRegion>Owl</ToRegion>
    <Duration>70</Duration>
    <StartTime>1741018672</StartTime>
    <FromOwnerName>BuTyCbKa Resident</FromOwnerName>
    <ToOwnerName>Vala Vella</ToOwnerName>
    <FromOwnerUUID>cdc5983b-c42d-4768-a60c-7e56723855da</FromOwnerUUID>
    <ToOwnerUUID>12276cd5-3e23-480f-9538-afc9fa839fbc</ToOwnerUUID>
    <FromNetwork>pegasus</FromNetwork>
    <ToNetwork>milkyway</ToNetwork>
    <ConnectionID>ryhv8xf0w7ogzfci79furiu4q8gdm1r3</ConnectionID>
  </Log>
  <Log>
    <ID>4021693</ID>
    <FromID>992560</FromID>
    <ToID>981405</ToID>
    <FromAddress>12,18,6,7,33,34</FromAddress>
    <ToAddress>12,3,31,11,15,13</ToAddress>
    <FromRegion>Primavera</FromRegion>
    <ToRegion>HUMlab</ToRegion>
    <Duration>69</Duration>
    <StartTime>1741017773</StartTime>
    <FromOwnerName>Sarena Dreamscape</FromOwnerName>
    <ToOwnerName>isenhand Nightfire</ToOwnerName>
    <FromOwnerUUID>2968519a-55ef-4b9e-ab37-caa45b6e4afe</FromOwnerUUID>
    <ToOwnerUUID>9f73191b-6a4f-49c8-9d3a-8f459f0c6cf9</ToOwnerUUID>
    <FromNetwork>milkyway</FromNetwork>
    <ToNetwork>milkyway</ToNetwork>
    <ConnectionID>qek2fvur6309n7irff2uqdp9pq92mr4u0qj1</ConnectionID>
  </Log>
  <Log>
    <ID>4021692</ID>
    <FromID>992560</FromID>
    <ToID>991664</ToID>
    <FromAddress>12,18,6,7,33,34</FromAddress>
    <ToAddress>12,3,20,9,24,32</ToAddress>
    <FromRegion>Primavera</FromRegion>
    <ToRegion>Ridgehaven</ToRegion>
    <Duration>27</Duration>
    <StartTime>1741017732</StartTime>
    <FromOwnerName>Sarena Dreamscape</FromOwnerName>
    <ToOwnerName>Jarael Kimono</ToOwnerName>
    <FromOwnerUUID>2968519a-55ef-4b9e-ab37-caa45b6e4afe</FromOwnerUUID>
    <ToOwnerUUID>405c32ba-d658-4639-9635-683fefcb3107</ToOwnerUUID>
    <FromNetwork>milkyway</FromNetwork>
    <ToNetwork>pegasus</ToNetwork>
    <ConnectionID>0ftcpsm34r5yn27jluowkrrqjcr0xj8rmim</ConnectionID>
  </Log>
</StargateLogs>

4.4. info and search

Description: Retrieves info recieves information about the specific gate, while search returns multiple results. Keyword can be an exact match to the gate id, address or a word that's contained in name, alias, or region. Search is limited to 50 entries.

Required Parameters:

  • keyword (string)

Optional Parameters:

  • network (string)

Example Request:

info:

GET http://stargate.alpha-fox.com/api/1.1/?what=info&apikey=yourkeyhere&keyword=Brighton&network=Milkyway&format=json

search:

GET http://stargate.alpha-fox.com/api/1.1/?what=search&apikey=yourkeyhere&keyword=Brighton&network=Milkyway&format=json
Example Response (JSON):
{
  "Stargate": {
    "ID": "1",
    "Name": "Mystery Lake",
    "Alias": "Ancient Ruins",
    "Network": "milkyway",
    "Status": "offline",
    "Shield": "0",
    "ContactTime": "1741009294",
    "InitTime": "1275138349",
    "Version": "1.1.3",
    "Combat": "0",
    "Sandbox": "0",
    "ConnectedID": "0",
    "SimFPS": "45.05693",
    "SimTimeDialation": "0.996261",
    "SimDirectTP": "1",
    "ListedOnRandom": "1",
    "AddressMilkyway": "9,19,34,10,32,22",
    "AddressPegasus": "25,11,5,28,12,26,29",
    "ForwardAddress": [],
    "Type": "milkyway",
    "UUID": "12f50cc3-f0ce-7f7a-2978-cbe5185210c5",
    "SGCID": "PSM-388",
    "Region": "Han Loso",
    "Position": "<66.201202,195.799194,63.334061>",
    "Rotation": "<0.000000,0.000000,0.923880,0.382683>",
    "OwnerName": "Ash Qin",
    "OwnerUUID": "0f15391e-105f-4b05-91e3-48b73c60ae64"
  }
}
Example Response (XML):
<?xml version="1.0" encoding="UTF-8"?>
<LookupResult>
  <Stargate>
    <ID>1</ID>
    <Name>Mystery Lake</Name>
    <Alias>Ancient Ruins</Alias>
    <Network>milkyway</Network>
    <Status>offline</Status>
    <Shield>0</Shield>
    <ContactTime>1741009894</ContactTime>
    <InitTime>1275138349</InitTime>
    <Version>1.1.3</Version>
    <Combat>0</Combat>
    <Sandbox>0</Sandbox>
    <ConnectedID>0</ConnectedID>
    <SimFPS>44.93901</SimFPS>
    <SimTimeDialation>1</SimTimeDialation>
    <SimDirectTP>1</SimDirectTP>
    <ListedOnRandom>1</ListedOnRandom>
    <AddressMilkyway>9,19,34,10,32,22</AddressMilkyway>
    <AddressPegasus>25,11,5,28,12,26,29</AddressPegasus>
    <ForwardAddress/>
    <Type>milkyway</Type>
    <UUID>12f50cc3-f0ce-7f7a-2978-cbe5185210c5</UUID>
    <SGCID>PSM-388</SGCID>
    <Region>Han Loso</Region>
    <Position>&lt;66.201202,195.799194,63.334061&gt;</Position>
    <Rotation>&lt;0.000000,0.000000,0.923880,0.382683&gt;</Rotation>
    <OwnerName>Ash Qin</OwnerName>
    <OwnerUUID>0f15391e-105f-4b05-91e3-48b73c60ae64</OwnerUUID>
  </Stargate>
</LookupResult>

4.5. nearby

Description: Returns a list of locations near the specified coordinates.

Required Parameters:

  • x (float)
  • y (float)
  • z (float)

Optional Parameters:

  • network (string, optional): Specifies a Stargate network (e.g., "Milkyway", "Pegasus", "any").

API Insights

Included Stargates
  • There is no strict radius cutoff, so results may include far-off gates.
  • Results can include Stargates that are not on connected regions.
Excluded Stargates
  • Gates set to offline.
  • Gates with random dial disabled,
  • Gates that have the shield raised.
  • Gates that have the iris closed.
Coordinate and Position Formatting
  • GlobalCoord: The API returns X and Y coordinates as comma-separated integers, you can retrieve Z from gate_position which offers a little more precision.
  • Position: The API provides local position <X, Y, Z> reduced to three decimal places.
  • Trailing zeroes in Position are removed to conserve response size.

Example Request:

GET http://stargate.alpha-fox.com/api/1.1/?what=nearby&apikey=yourkeyhere&x=151416.600000&y=256676.600000&z=3.695306&format=json
Example Response (JSON):
{
  "Detected": [
    {
      "Region": "Ember",
      "GlobalCoord": "151296, 257024",
      "Position": "<134.924, 43.242, 22.986>",
      "Distance": "391"
    },
    {
      "Region": "Dragonglass",
      "GlobalCoord": "150528, 256512",
      "Position": "<105.458, 105.739, 23.705>",
      "Distance": "786"
    },
    {
      "Region": "Rhaegal",
      "GlobalCoord": "150272, 256768",
      "Position": "<104.756, 25.458, 2,992.984>",
      "Distance": "3167"
    }
  ]
}
Example Response (XML):
<?xml version="1.0" encoding="UTF-8"?>
<NearbyStargates>
  <Detected>
    <Region>Ember</Region>
    <GlobalCoord>151296, 257024</GlobalCoord>
    <Position>&lt;134.924, 43.242, 22.986&gt;</Position>
    <Distance>391</Distance>
  </Detected>
  <Detected>
    <Region>Dragonglass</Region>
    <GlobalCoord>150528, 256512</GlobalCoord>
    <Position>&lt;105.458, 105.739, 23.705&gt;</Position>
    <Distance>786</Distance>
  </Detected>
  <Detected>
    <Region>Rhaegal</Region>
    <GlobalCoord>150272, 256768</GlobalCoord>
    <Position>&lt;104.756, 25.458, 2,992.984&gt;</Position>
    <Distance>3167</Distance>
  </Detected>
</NearbyStargates>

Example LSL Script

string API_KEY=Your-API-key
string LIMIT_BODY_BYTES="2048"; // API will ignore any settings below 1024 bytes. This API currently supports retrieving up to 50 closest gates.
string ENCODING="utf8"; // API accepts "ascii" which can possibly fit more data, at the expense of corrupting foreign characters and emojis.

//Please see https://www.alpha-fox.com/asn/api/1.1/ for latest information on this API.

information_output(string region, string coord, string position, string distance)
{
    llOwnerSay("Region: " + region + "\nCoordinates: " + coord + "\nPosition: " + position + "\nDistance: " + distance + " meters\n");
}

default
{
    touch_start(integer i)
    {
        vector global_pos = llGetRegionCorner() + llGetPos(); // Get absolute global position
        llOwnerSay("My Information:");

        // All this extended stuff we're doing in information_output() is just to visually match the response we get from the server, these are a tweaked visually, but numerically don't matter.
        information_output(
        // Region name
        llGetRegionName(),
        // Global position converted to integer.
        (string)llCeil(global_pos.x) + ", " + (string)llCeil(global_pos.y),
        // Local position with ending zeros.
        (string)llGetPos(),
        // Our distance from ourselves.
        "0");

        // Assemble the URL we're going to use to request the API data with.
        string url = "http://stargate.alpha-fox.com/api/1.1/?apikey=" + API_KEY + "&what=nearby&x=" + (string)global_pos.x + "&y=" + (string)global_pos.y + "&z=" + (string)global_pos.z + "&format=json&encoding=utf8&limit_body="+LIMIT_BODY_BYTES;
        llHTTPRequest(url, [HTTP_METHOD, "GET", HTTP_ACCEPT, "application/json"], "");
    }

    http_response(key request_id, integer status, list metadata, string body)
    {
        if (status == 200)
        {
            string stargates_json = llJsonGetValue(body, ["Detected"]); //Access the root object Stargate.
            llOwnerSay("Nearest Stargates:"); // There is no range limit, so some Stargates should always get returned regardless.
            integer i;
            for (i = 0; i < llGetListLength(llJson2List(stargates_json)); i++)
            {
                string entry = llJsonGetValue(stargates_json, [i]);
                string region = llJsonGetValue(entry, ["Region"]);
                string coord = llJsonGetValue(entry, ["GlobalCoord"]); // API returns x and y as comma seperated integers, z isn't necessary since that's provided in gate_position with a little more precision.
                string position = llJsonGetValue(entry, ["Position"]); // API limits decimals to three places for body conservation and removes trailing zeroes.
                string distance = llJsonGetValue(entry, ["Distance"]);

                if (llStringLength(region) && llStringLength(coord) && llStringLength(position) && llStringLength(distance)) {
                    information_output(region, coord, position, distance);
                }
            }
        }
        else
        {
            llOwnerSay("Error: " + (string)status);
        }
    }
}

Example LSL Script output

My Information:

Region: Han Loso
Coordinates: 263751, 231614
Position: <70.99551, 189.18010, 58.78133>
Distance: 0 meters

Nearest Stargates:

Region: Han Loso
Coordinates: 263680, 231424
Position: <66.201, 195.799, 63.334>
Distance: 9 meters

Region: Shiot
Coordinates: 263424, 232704
Position: <77.099, 238.786, 97.337>
Distance: 1353 meters

Region: Dokkaebi
Coordinates: 261632, 230912
Position: <205.309, 92.991, 66.921>
Distance: 2008 meters

4.6. recentgates

Description: Returns a list of recently used gates.

Example Request:

GET http://stargate.alpha-fox.com/api/1.1/?what=recentgates&apikey=yourkeyhere&format=json
Example Response (JSON):
{
  "Stargate": [
    {
      "ID": "1004936",
      "Name": "Carter Mainland",
      "Alias": [],
      "Network": "pegasus",
      "Status": "offline",
      "Shield": "0",
      "ContactTime": "1741010005",
      "InitTime": "1740946472",
      "Version": "1.1.3",
      "Combat": "0",
      "Sandbox": "0",
      "ConnectedID": "0",
      "SimFPS": "44.98464",
      "SimTimeDialation": "0.999643",
      "SimDirectTP": "1",
      "ListedOnRandom": "1",
      "AddressMilkyway": "18,10,33,31,11,27,24",
      "AddressPegasus": "12,27,4,13,26,24",
      "ForwardAddress": [],
      "Type": "pegasus",
      "UUID": "54fc5a5b-0a88-e80f-cf03-5901dc79ec90",
      "SGCID": "MUX-409",
      "Region": "Ceilostomo",
      "Position": "<223.897964,5.009125,83.379448>",
      "Rotation": "<-0.000000,-0.000000,-0.707107,0.707107>",
      "OwnerName": "MajorCarter Rajal",
      "OwnerUUID": "38a19ffc-8e40-44a1-a475-9664ac4ff344"
    },
    {
      "ID": "1004934",
      "Name": "Mina's Beach",
      "Alias": [],
      "Network": "milkyway",
      "Status": "offline",
      "Shield": "0",
      "ContactTime": "1741009925",
      "InitTime": "1740944061",
      "Version": "1.1.3",
      "Combat": "0",
      "Sandbox": "0",
      "ConnectedID": "0",
      "SimFPS": "44.96277",
      "SimTimeDialation": "1",
      "SimDirectTP": "1",
      "ListedOnRandom": "1",
      "AddressMilkyway": "11,5,18,12,26,31",
      "AddressPegasus": "25,13,2,24,14,26,28",
      "ForwardAddress": [],
      "Type": "milkyway",
      "UUID": "ef821814-16b6-549e-7623-7af155425692",
      "SGCID": "PUV-423",
      "Region": "Beliconas",
      "Position": "<151.788498,198.574982,24.143454>",
      "Rotation": "<0.000000,0.000000,-0.707107,0.707107>",
      "OwnerName": "MinaPhoenix Resident",
      "OwnerUUID": "97984885-727e-4f38-9bbf-aff5090d0334"
    },
    {
      "ID": "1004933",
      "Name": "Valle Garnacha Alteran Stargate",
      "Alias": [],
      "Network": "pegasus",
      "Status": "offline",
      "Shield": "0",
      "ContactTime": "1741009853",
      "InitTime": "1740930505",
      "Version": "1.1.3",
      "Combat": "0",
      "Sandbox": "0",
      "ConnectedID": "0",
      "SimFPS": "45.05586",
      "SimTimeDialation": "0.996193",
      "SimDirectTP": "1",
      "ListedOnRandom": "1",
      "AddressMilkyway": "18,10,19,17,11,4,9",
      "AddressPegasus": "12,11,20,13,1,14",
      "ForwardAddress": [],
      "Type": "forerunner",
      "UUID": "0ad2c60c-194b-b223-e85f-f1aa0ea30e4a",
      "SGCID": "MTC-3E6",
      "Region": "Valle Garnacha",
      "Position": "<245.763550,58.010212,23.107679>",
      "Rotation": "<-0.000000,-0.000000,-1.000000,0.000000>",
      "OwnerName": "LenaMarie Susanowa",
      "OwnerUUID": "c96732dd-dfe5-4b39-b251-e27e5452a53e"
    }
  ]
}
Example Response (XML):
<?xml version="1.0" encoding="UTF-8"?>
<StargateNetwork>
  <Stargate>
    <ID>1004936</ID>
    <Name>Carter Mainland</Name>
    <Alias/>
    <Network>pegasus</Network>
    <Status>offline</Status>
    <Shield>0</Shield>
    <ContactTime>1741010005</ContactTime>
    <InitTime>1740946472</InitTime>
    <Version>1.1.3</Version>
    <Combat>0</Combat>
    <Sandbox>0</Sandbox>
    <ConnectedID>0</ConnectedID>
    <SimFPS>44.98464</SimFPS>
    <SimTimeDialation>0.999643</SimTimeDialation>
    <SimDirectTP>1</SimDirectTP>
    <ListedOnRandom>1</ListedOnRandom>
    <AddressMilkyway>18,10,33,31,11,27,24</AddressMilkyway>
    <AddressPegasus>12,27,4,13,26,24</AddressPegasus>
    <ForwardAddress/>
    <Type>pegasus</Type>
    <UUID>54fc5a5b-0a88-e80f-cf03-5901dc79ec90</UUID>
    <SGCID>MUX-409</SGCID>
    <Region>Ceilostomo</Region>
    <Position>&lt;223.897964,5.009125,83.379448&gt;</Position>
    <Rotation>&lt;-0.000000,-0.000000,-0.707107,0.707107&gt;</Rotation>
    <OwnerName>MajorCarter Rajal</OwnerName>
    <OwnerUUID>38a19ffc-8e40-44a1-a475-9664ac4ff344</OwnerUUID>
  </Stargate>
  <Stargate>
    <ID>1004934</ID>
    <Name>Mina's Beach</Name>
    <Alias/>
    <Network>milkyway</Network>
    <Status>offline</Status>
    <Shield>0</Shield>
    <ContactTime>1741009925</ContactTime>
    <InitTime>1740944061</InitTime>
    <Version>1.1.3</Version>
    <Combat>0</Combat>
    <Sandbox>0</Sandbox>
    <ConnectedID>0</ConnectedID>
    <SimFPS>44.96277</SimFPS>
    <SimTimeDialation>1</SimTimeDialation>
    <SimDirectTP>1</SimDirectTP>
    <ListedOnRandom>1</ListedOnRandom>
    <AddressMilkyway>11,5,18,12,26,31</AddressMilkyway>
    <AddressPegasus>25,13,2,24,14,26,28</AddressPegasus>
    <ForwardAddress/>
    <Type>milkyway</Type>
    <UUID>ef821814-16b6-549e-7623-7af155425692</UUID>
    <SGCID>PUV-423</SGCID>
    <Region>Beliconas</Region>
    <Position>&lt;151.788498,198.574982,24.143454&gt;</Position>
    <Rotation>&lt;0.000000,0.000000,-0.707107,0.707107&gt;</Rotation>
    <OwnerName>MinaPhoenix Resident</OwnerName>
    <OwnerUUID>97984885-727e-4f38-9bbf-aff5090d0334</OwnerUUID>
  </Stargate>
  <Stargate>
    <ID>1004933</ID>
    <Name>Valle Garnacha Alteran Stargate</Name>
    <Alias/>
    <Network>pegasus</Network>
    <Status>offline</Status>
    <Shield>0</Shield>
    <ContactTime>1741009853</ContactTime>
    <InitTime>1740930505</InitTime>
    <Version>1.1.3</Version>
    <Combat>0</Combat>
    <Sandbox>0</Sandbox>
    <ConnectedID>0</ConnectedID>
    <SimFPS>45.05586</SimFPS>
    <SimTimeDialation>0.996193</SimTimeDialation>
    <SimDirectTP>1</SimDirectTP>
    <ListedOnRandom>1</ListedOnRandom>
    <AddressMilkyway>18,10,19,17,11,4,9</AddressMilkyway>
    <AddressPegasus>12,11,20,13,1,14</AddressPegasus>
    <ForwardAddress/>
    <Type>forerunner</Type>
    <UUID>0ad2c60c-194b-b223-e85f-f1aa0ea30e4a</UUID>
    <SGCID>MTC-3E6</SGCID>
    <Region>Valle Garnacha</Region>
    <Position>&lt;245.763550,58.010212,23.107679&gt;</Position>
    <Rotation>&lt;-0.000000,-0.000000,-1.000000,0.000000&gt;</Rotation>
    <OwnerName>LenaMarie Susanowa</OwnerName>
    <OwnerUUID>c96732dd-dfe5-4b39-b251-e27e5452a53e</OwnerUUID>
  </Stargate>
</StargateNetwork>

5. Response Formats

The Stargate API can return data in JSON or XML. Specify your preference using format=json or format=xml.


7. Additional Notes

  • Always include a valid API key in your requests.
  • If you do not specify a format, responses are returned in XML by default.
  • If you do not specify an encoding, UTF-8 is used by default.
  • The limit_body parameter only works with JSON responses, helping to manage response sizes in environments like Second Life that have strict HTTP size limits.

Navigation
 
Login

Username:

Password:

Remember Me?

Register an Account
Reset your Password