No ticket, no passport, just an address!  

Statistics
General
  Users: 16210
Stargates
  Connections: 0
  Total: 408
  Milkyway: 156
  Pegasus: 92
  Forerunner: 80
  Tollan: 80
Teleporters
  Total: 3
Miscellaneous
  AFVIs: 7
 

ASN API 1.1

1. Overview

The Alteran Stargate Network provides external APIs that developers can access via HTTP requests. An API key is required for authentication. 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, required): Specifies a Stargate network (e.g., "Milkyway").
  • 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)
  • address

    • keyword (string, required)
    • target_network (string, required)

4. Endpoints

4.1. activegates

Description: Retrieves currently active gates.

Example Request:

GET http://stargate.alpha-fox.com/api/1.1/?what=activegates&apikey=yourkeyhere&format=json

Example Response (JSON):

{
  "Stargate": [
    {
      "gate_id": "980164",
      "gate_name": "Rustic Alteran Stargate",
      "gate_region": "Rustic",
      "gate_position": "<75.354950,224.158783,23.347902>",
      "gate_network": "milkyway",
      "gate_status": "idle",
      "gate_address": "10,27,25,11,22,28",
      "gate_key": "PRY-3FA"
    },
    {
      "gate_id": "980239",
      "gate_name": "Rydal Alteran Stargate",
      "gate_region": "Rydal",
      "gate_position": "<198.551590,58.124046,26.897665>",
      "gate_network": "pegasus",
      "gate_status": "idle",
      "gate_address": "12,13,28,14,24,32",
      "gate_key": "MSK-3EB"
    }
  ]
}

Example Response (XML):


<StargateNetwork>
    <Stargate>
        <gate_id>980164</gate_id>
        <gate_name>Rustic Alteran Stargate</gate_name>
        <gate_region>Rustic</gate_region>
        <gate_position>&lt;75.354950,224.158783,23.347902&gt;</gate_position>
        <gate_network>milkyway</gate_network>
        <gate_status>idle</gate_status>
        <gate_address>10,27,25,11,22,28</gate_address>
        <gate_key>PRY-3FA</gate_key>
    </Stargate>
    <Stargate>
        <gate_id>980239</gate_id>
        <gate_name>Rydal Alteran Stargate</gate_name>
        <gate_region>Rydal</gate_region>
        <gate_position>&lt;198.551590,58.124046,26.897665&gt;</gate_position>
        <gate_network>pegasus</gate_network>
        <gate_status>idle</gate_status>
        <gate_address>12,13,28,14,24,32</gate_address>
        <gate_key>MSK-3EB</gate_key>
    </Stargate>
</StargateNetwork>

4.2. address

Description: Retrieves address information of a gate.

Required Parameters:

  • keyword (string)
  • 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):

{
  "gate_id": "981209",
  "gate_name": "Dolly Dreams Alteran Stargate",
  "gate_region": "Dolly Dreams",
  "gate_position": "<189.832153,139.735123,24.887531>",
  "gate_network": "milkyway",
  "gate_status": "idle",
  "gate_address": "11,32,5,10,28,18",
  "gate_key": "PSC-464",
  "gate_parcel_name": "LSI Laboratories and Pink Evil Lair",
  "gate_parcel_desc": "A slightly zany laboratory researching virulent RLV transformations in their science lab and selling LSI products in the store, with the pink evil kitties for neighbours."
}

Example Response (XML):


<response>
    <gate_id>1002527</gate_id>
    <gate_name>Carlton Estate</gate_name>
    <gate_region>Caro Fra Sarducci</gate_region>
    <gate_position>&lt;152.500000,108.394066,2009.761230&gt;</gate_position>
    <gate_network>milkyway</gate_network>
    <gate_status>idle</gate_status>
    <gate_address>10,19,17,11,1,14</gate_address>
    <gate_key>PT5-3E6</gate_key>
    <gate_parcel_name>Carlton Estate</gate_parcel_name>
</response>

4.3. gatelogs

Description: Retrieves logs of gate activities.

Example Request:

GET http://stargate.alpha-fox.com/api/1.1/?what=gatelogs&apikey=yourkeyhere&format=json

Example Response (JSON):

{
  "Stargate": [
    {
      "log_id": "4005672",
      "from_id": "981399",
      "to_id": "1001558",
      "from_address": "12,9,37,6,18,28",
      "to_address": "15,16,17,7,27,20",
      "from_region": "Xylophilous",
      "to_region": "The 100",
      "duration": "77",
      "init_time": "1738398108",
      "from_owner": "85",
      "to_owner": "21133",
      "from_network": "milkyway",
      "to_network": "pegasus",
      "connection_id": "ddpuirldhr27zv5sroft4cw5ux6c9seuru1"
    },
    {
      "log_id": "4005669",
      "from_id": "998783",
      "to_id": "1004058",
      "from_address": "13,32,16,14,7,20",
      "to_address": "12,27,4,13,26,24",
      "from_region": "Erindale",
      "to_region": "Ceilostomo",
      "duration": "62",
      "init_time": "1738397246",
      "from_owner": "20687",
      "to_owner": "20728",
      "from_network": "pegasus",
      "to_network": "pegasus",
      "connection_id": "cfy8991fg579kn1luvy4yjz9d39cr1dvou"
    }
  ]
}

Example Response (XML):


<StargateLogs>
    <Stargate>
        <log_id>4005672</log_id>
        <from_id>981399</from_id>
        <to_id>1001558</to_id>
        <from_address>12,9,37,6,18,28</from_address>
        <to_address>15,16,17,7,27,20</to_address>
        <from_region>Xylophilous</from_region>
        <to_region>The 100</to_region>
        <duration>77</duration>
        <init_time>1738398108</init_time>
        <from_owner>85</from_owner>
        <to_owner>21133</to_owner>
        <from_network>milkyway</from_network>
        <to_network>pegasus</to_network>
        <connection_id>ddpuirldhr27zv5sroft4cw5ux6c9seuru1</connection_id>
    </Stargate>
    <Stargate>
        <log_id>4005669</log_id>
        <from_id>998783</from_id>
        <to_id>1004058</to_id>
        <from_address>13,32,16,14,7,20</from_address>
        <to_address>12,27,4,13,26,24</to_address>
        <from_region>Erindale</from_region>
        <to_region>Ceilostomo</to_region>
        <duration>62</duration>
        <init_time>1738397246</init_time>
        <from_owner>20687</from_owner>
        <to_owner>20728</to_owner>
        <from_network>pegasus</from_network>
        <to_network>pegasus</to_network>
        <connection_id>cfy8991fg579kn1luvy4yjz9d39cr1dvou</connection_id>
    </Stargate>
</StargateLogs>

4.4. info

Description: Retrieves general information about the API or specific gates.

Required Parameters:

  • keyword (string)
  • network (string)

Example Request:

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

Example Response (JSON):

{
  "gate_id": "1004374",
  "gate_name": "Han Loso Alteran Stargate",
  "gate_region": "Han Loso",
  "gate_position": "<75.494987,191.773926,59.504025>",
  "gate_network": "milkyway",
  "gate_status": "idle",
  "gate_address": "9,19,34,10,32,22",
  "gate_key": "PSM-388",
  "gate_parcel_name": "Ancient Ruins"
}

Example Response (XML):


<response>
    <gate_id>980597</gate_id>
    <gate_name>Brighton Alteran Stargate</gate_name>
    <gate_region>Brighton</gate_region>
    <gate_position>&lt;162.786148,121.728210,25.635880&gt;</gate_position>
    <gate_network>milkyway</gate_network>
    <gate_status>idle</gate_status>
    <gate_address>10,17,31,12,13,32</gate_address>
    <gate_key>PWK-3E2</gate_key>
    <gate_parcel_name>Welcome to the (former) Teen Grid at Brighton (172, 128)</gate_parcel_name>
    <gate_parcel_desc>Welcome to the (former) Teen Grid!

        This continent (the continent on which this parcel lies) formed the core of Teen Second Life from 2005 to 2011,
        after which this formerly parallel world was merged with the world that exists today.
    </gate_parcel_desc>
</response>

4.5. nearby

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

Required Parameters:

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

API Insights

No Range Limit on Nearby Stargates

  • The API always returns some Stargates, regardless of distance.
  • There is no strict radius cutoff, so results may include far-off gates.

Coordinate and Position Formatting

  • gate_global_coord: The API returns X and Y coordinates as comma-separated integers, you can retrieve Z from gate_position which offers a little more precision.
  • gate_position: The API provides local position <X, Y, Z> reduced to three decimal places.
  • Trailing zeroes in gate_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):

{
  "Stargate": [
    {
      "gate_region": "Fractal",
      "gate_global_coord": "151296, 256512",
      "gate_position": "<143.092682,74.780640,5.318608>",
      "distance": "204"
    },
    {
      "gate_region": "Viserion",
      "gate_global_coord": "150784, 256768",
      "gate_position": "<68.458275,100.260338,24.328821>",
      "distance": "640"
    },
    {
      "gate_region": "Furrenburg Bay",
      "gate_global_coord": "166144, 257536",
      "gate_position": "<24.888691,25.063200,36.079487>",
      "distance": "14752"
    }
  ]
}

Example Response (XML):


<NearbyStargates>
    <Stargate>
        <gate_region>Fractal</gate_region>
        <gate_global_coord>151296, 256512</gate_global_coord>
        <gate_position>&lt;143.092682,74.780640,5.318608&gt;</gate_position>
        <distance>204</distance>
    </Stargate>
    <Stargate>
        <gate_region>Viserion</gate_region>
        <gate_global_coord>150784, 256768</gate_global_coord>
        <gate_position>&lt;68.458275,100.260338,24.328821&gt;</gate_position>
        <distance>640</distance>
    </Stargate>
    <Stargate>
        <gate_region>Furrenburg Bay</gate_region>
        <gate_global_coord>166144, 257536</gate_global_coord>
        <gate_position>&lt;24.888691,25.063200,36.079487&gt;</gate_position>
        <distance>14752</distance>
    </Stargate>
</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, ["Stargate"]); //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, ["gate_region"]);
                string coord = llJsonGetValue(entry, ["gate_global_coord"]); // 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, ["gate_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:
Object: Region: Han Loso
Coordinates: 263757, 231618
Position: <76.83461, 193.70530, 58.87500>
Distance: 0 meters

Object: Nearest Stargates:
Object: Region: Han Loso
Coordinates: 263680, 231424
Position: <66.201, 195.799, 63.334>
Distance: 208 meters

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

Object: Region: Goryeo
Coordinates: 263680, 233472
Position: <204.513, 242.169, 84.58>
Distance: 1856 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": [
    {
      "gate_id": "1004375",
      "gate_name": "BaseOr",
      "gate_region": "Orwood",
      "gate_position": "<136.659943,242.649551,40.478535>",
      "gate_network": "pegasus",
      "gate_status": "idle",
      "gate_address": "12,11,4,13,19,20",
      "gate_key": "MS8-3E5"
    },
    {
      "gate_id": "1004374",
      "gate_name": "Han Loso Alteran Stargate",
      "gate_region": "Han Loso",
      "gate_position": "<75.494987,191.773926,59.504025>",
      "gate_network": "milkyway",
      "gate_status": "idle",
      "gate_address": "9,19,34,10,32,22",
      "gate_key": "PSM-388"
    },
    {
      "gate_id": "1004372",
      "gate_name": "SL Unzipped Gallery",
      "gate_region": "Lake Haven",
      "gate_position": "<183.916016,176.075302,31.392927>",
      "gate_network": "pegasus",
      "gate_status": "idle",
      "gate_address": "10,15,20,11,35,21",
      "gate_key": "MOQ-34D"
    }
  ]
}

Example Response (XML):


<StargateNetwork>
    <Stargate>
        <gate_id>1004375</gate_id>
        <gate_name>BaseOr</gate_name>
        <gate_region>Orwood</gate_region>
        <gate_position>&lt;136.659943,242.649551,40.478535&gt;</gate_position>
        <gate_network>pegasus</gate_network>
        <gate_status>idle</gate_status>
        <gate_address>12,11,4,13,19,20</gate_address>
        <gate_key>MS8-3E5</gate_key>
    </Stargate>
    <Stargate>
        <gate_id>1004374</gate_id>
        <gate_name>Han Loso Alteran Stargate</gate_name>
        <gate_region>Han Loso</gate_region>
        <gate_position>&lt;75.494987,191.773926,59.504025&gt;</gate_position>
        <gate_network>milkyway</gate_network>
        <gate_status>idle</gate_status>
        <gate_address>9,19,34,10,32,22</gate_address>
        <gate_key>PSM-388</gate_key>
    </Stargate>
    <Stargate>
        <gate_id>1004372</gate_id>
        <gate_name>SL Unzipped Gallery</gate_name>
        <gate_region>Lake Haven</gate_region>
        <gate_position>&lt;183.916016,176.075302,31.392927&gt;</gate_position>
        <gate_network>pegasus</gate_network>
        <gate_status>idle</gate_status>
        <gate_address>10,15,20,11,35,21</gate_address>
        <gate_key>MOQ-34D</gate_key>
    </Stargate>
</StargateNetwork>

5. Response Formats

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

5.1. JSON

{
  "status": "success",
  "data": {
    ...
  }
}

5.2. XML


<response>
    <status>success</status>
    <data>...</data>
</response>

(Note: The exact XML root element may vary by endpoint; for example, <StargateNetwork>, <StargateLogs>, etc.)


6. Error Handling

If an error occurs, the API will return one of the following responses:

JSON Error Response

{
  "status": "error",
  "message": "Invalid request"
}

XML Error Response


<response>
    <status>error</status>
    <message>Invalid request</message>
</response>

Common error causes include:

  • Missing or invalid API key
  • Missing required parameters
  • Unsupported what value

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