Trickys API Documentation

website·Indexed 31 days ago

https://docs.trickys.gg

API documentation for Trickys, providing endpoints to query Stormworks server status, reset server uptime, perform ping tests to server locations, and retrieve global Stormworks player counts.

Tokens
1.9K
Snippets
13
Records
17
Agent score
53%

What's inside Trickys

  1. Find Game-Specific Server Documentation

    Trickys.gg provides documentation and rules for several hosted game servers. Available guides include:

    • MotorTown
    • Farming Simulator 25
    • Kerbal Space Program
    • TruckSim
    • War Thunder (including specific Event Rules)
    • Ramshackle
  2. Get started with Trickys.gg community and accounts

    New users can find essential onboarding information regarding community standards and account customization through the following resources:

    • General Rules
    • Custom Profiles setup
    • Discord Verification process
    • Discord Role information
  3. Verify API access using the Request Ping endpoint

    Use the /api/v1/ping endpoint to verify that your API key is valid and that you have access to the API. A successful request returns a 200 OK status. If the API key is missing or invalid, the server returns a 401 Unauthorized error with an ErrorResponse object containing a success boolean and a message.
    # Example using the X-API-KEY header
    curl -X GET "https://trickys.gg/api/v1/ping" \
         -H "X-API-KEY: YOUR_API_KEY"
    
    # Example using the apikey query parameter
    curl -X GET "https://trickys.gg/api/v1/ping?apikey=YOUR_API_KEY"
  4. Reference the ResetUptimeResponse object schema

    The ResetUptimeResponse object indicates the result of a request to reset the server uptime.
    {
      "type": "object",
      "properties": {
        "success": { "type": "boolean" },
        "status": { "type": "string" },
        "message": { "type": "string" }
      }
    }
  5. Stormworks server status API reference

    The Stormworks server status endpoint is a GET request to /api/v1/swserverstatus.

    Parameters:

    • server (query, required): The identifier of the Stormworks server to query.

    Authentication:

    • apikey (query parameter) OR X-API-KEY (header).

    Responses:

    • 200 OK: Successful status lookup.
    • 401 Unauthorized: Missing or invalid API key.
    • 404 Not Found: Unknown server identifier.
  6. Reference the PingResponse object schema

    The PingResponse object provides network latency statistics (min, avg, max RTT) and geographic information (country and city) for the target.
    {
      "type": "object",
      "properties": {
        "success": { "type": "boolean" },
        "updated": { "type": "integer" },
        "data": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "Info": {
                "type": "object",
                "properties": {
                  "countryCode": { "type": "string" },
                  "countryName": { "type": "string" },
                  "cityName": { "type": "string" }
                }
              },
              "pingResults": {
                "type": "object",
                "properties": {
                  "success": { "type": "boolean" },
                  "requestsSent": { "type": "integer" },
                  "requestsReceived": { "type": "integer" },
                  "rttMinMs": { "type": "number", "format": "float" },
                  "rttAvgMs": { "type": "number", "format": "float" },
                  "rttMaxMs": { "type": "number", "format": "float" }
                }
              }
            }
          }
        },
        "TrickysAPIinfo": {
          "type": "object",
          "properties": {
            "APIversion": { "type": "string" }
          }
        }
      }
    }
  7. Query Stormworks server live status

    Use the /api/v1/swserverstatus endpoint to retrieve the live status (Online or Offline) of a specific Stormworks server. This request requires a valid API key provided either as a query parameter (apikey) or in the request header (X-API-KEY).
    # Example request using curl with an API key in the header
    curl -X GET "https://trickys.gg/api/v1/swserverstatus?server=SERVER_ID" \
         -H "X-API-KEY: YOUR_API_KEY"
  8. Reference the SWServerStatusOffline object schema

    The SWServerStatusOffline object is returned when a server is offline, providing a status message and API version information.
    {
      "type": "object",
      "properties": {
        "success": { "type": "boolean" },
        "status": { "type": "string" },
        "message": { "type": "string" },
        "TrickysAPIinfo": {
          "type": "object",
          "properties": {
            "APIversion": { "type": "string" }
          }
        }
      }
    }
  9. Reference the GlobalInfoResponse object schema

    The GlobalInfoResponse object provides the total global player count across the network.
    {
      "type": "object",
      "properties": {
        "success": { "type": "boolean" },
        "globalPlayerCount": { "type": "integer" },
        "TrickysAPIinfo": {
          "type": "object",
          "properties": {
            "APIversion": { "type": "string" }
          }
        }
      }
    }
  10. Measure RTT to Stormworks server locations using the Server Ping API

    Use the /api/v1/swserverstatus/ping endpoint to perform ping tests to available Stormworks server locations and retrieve Round Trip Time (RTT) metrics. This endpoint requires a server query parameter to specify the target server identifier. Authentication is required via an API key provided either in the query string as apikey or in the request header as X-API-KEY.
    # Example request using curl
    curl -X GET "https://trickys.gg/api/v1/swserverstatus/ping?server=SERVER_ID&apikey=YOUR_API_KEY"
  11. Reference the SWServerStatusSuccess object schema

    The SWServerStatusSuccess object is returned when a server status request is successful. It contains detailed server metadata including player counts, version, DLC status, and an embedded Uptime object.
    {
      "type": "object",
      "properties": {
        "success": { "type": "boolean" },
        "status": { "type": "string" },
        "responseTimeMs": { "type": "integer" },
        "uptime": { "$ref": "#/components/schemas/Uptime" },
        "serverName": { "type": "string" },
        "onlinePlayers": { "type": "integer" },
        "maxPlayers": { "type": "integer" },
        "operatingSystem": { "type": "string" },
        "hasPassword": { "type": "string" },
        "serverId": { "type": "integer" },
        "version": { "type": "string" },
        "serverTPS": { "type": "string" },
        "isUpToDate": { "type": "boolean" },
        "isWeaponsDlc": { "type": "boolean" },
        "isIndustrialDlc": { "type": "boolean" },
        "isSpaceDlc": { "type": "boolean" },
        "owner": { "type": "string" },
        "serverLocation": { "type": "string" },
        "GblsAccess": { "type": "boolean" },
        "GblsApi": { "type": "boolean" },
        "TrickysAPIinfo": {
          "type": "object",
          "properties": {
            "APIversion": { "type": "string" }
          }
        }
      }
    }