StormDocs

Ingest API

Send account data to Storm Logs from your own reporter over HTTP.

If you'd rather write your own reporter than use the one Install Storm Cloud sets up, you can send data to Storm Logs over plain HTTP. There are two requests: one to send reports and one to fetch a game's fields.

All requests go to https://production.cartier.gg/api/stormx/v1. The examples use a made-up key.

The Basics

Authenticate with your account's Reporter Key as a bearer token. Never use a Storm key.

Authorization: Bearer sci_test0000000000000000000000000000

Send and expect JSON with Content-Type: application/json. When something goes wrong, the response looks like this; check code, since the message wording can change:

{ "error": { "code": "invalid_ingest_key", "message": "That ingest key isn't valid." } }

Every response has an X-Request-Id header. Include it if you ask for help.

Sending Reports

POST /logs/ingest sends up to 50 accounts for one game from one PC.

{
  "v": 1,
  "universeId": 6765805766,
  "placeId": 104715542330896,
  "jobId": "00000000-0000-0000-0000-000000000000",
  "pc": "XEON V4",
  "records": [
    {
      "username": "ExamplePlayer1",
      "userId": 123456789,
      "fields": { "wallet": 45000, "bank": 230000, "netWorth": 275000, "atmLevel": 22 }
    }
  ]
}
KeyRequiredWhat it is
vYesAlways 1.
universeIdYesThe game's universe ID (game.GameId). BlockSpin is 6765805766.
placeIdNoThe place ID (game.PlaceId).
jobIdNoThe server's job ID (game.JobId), used for sightings panels.
pcYesThe PC name, 1 to 64 characters. Accounts are grouped by it in the console.
recordsYes1 to 50 accounts.

Each account in records has:

KeyRequiredWhat it is
usernameYesThe Roblox username.
userIdNoThe Roblox user ID.
fieldsYesThe game's values, using the field names in Game Fields.
credentialsNopassword and cookie, but only as the encrypted values Storm Manager x writes to the credentials file, passed on exactly as they are. Plain text is always refused.

Keep the whole request under 64 KB. Values for fields the game doesn't have are left out, not refused. If you send the same account several times in quick succession, Storm Logs keeps the latest one.

The Response

You get a 200 whenever the request itself is valid, even if some accounts were refused:

{
  "accepted": 1,
  "rejected": [
    {
      "index": 1,
      "username": "ExamplePlayer2",
      "errors": [{ "path": "fields.atmLevel", "code": "min", "message": "Below the minimum" }]
    }
  ],
  "dropped": [{ "index": 0, "fields": ["unknownKey"] }],
  "schemaVersion": 3,
  "nextIntervalSec": 10
}
  • accepted is how many accounts were saved.
  • rejected lists refused accounts by their position in records, with what was wrong.
  • dropped lists values that were left out because the game doesn't track them.
  • schemaVersion changes when the game's fields change. When it does, fetch the fields again.
  • nextIntervalSec is how many seconds to wait before your next send. Always follow it.

Common reasons an account is refused: a value is the wrong kind or out of range, a value looks like a password or cookie, the username isn't valid, your plan's account limit is full, or the account was deleted on the website a moment ago.

Games You Haven't Added

You can report a supported game the account doesn't track yet. Storm Logs adds it on the first request and saves the reports as usual. A game that isn't supported gets 404 game_not_configured.

Fetching a Game's Fields

GET /logs/ingest/schema?universeId=6765805766 returns the fields for a game, so you can check values before sending and skip ones nobody needs.

{
  "schema": {
    "version": 1,
    "fields": [
      { "key": "wallet", "label": "Pocket", "type": "money" },
      { "key": "atmLevel", "label": "ATM", "type": "int", "min": 0 }
    ]
  },
  "schemaVersion": 3,
  "unknownFields": "drop",
  "minIntervalSec": 5
}

Errors

StatusCodeWhat to do
401invalid_ingest_keyThe key is wrong or was regenerated. Stop and ask the user for their current Reporter Key.
402entitlement_expired, entitlement_requiredThe account's plan isn't active. Pause and try again much later.
402entitlement_limitThe game couldn't be added because the plan's game limit is full. Stop reporting this game.
403account_suspendedThe account is suspended. Stop.
404game_not_configuredThe game isn't supported. Stop reporting this game.
413payload_too_largeSend fewer accounts per request.
422validation_failedThe request itself is malformed; details says how. Fix your reporter.
429rate_limitedYou're sending too much. Wait the number of seconds in the Retry-After header.
503unavailableTry again shortly, waiting longer each time.

When requests fail, wait before retrying and wait longer each time (for example 1, 2, 4 seconds and so on, up to a minute).

Example

curl https://production.cartier.gg/api/stormx/v1/logs/ingest \
  -H "Authorization: Bearer sci_test0000000000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"v":1,"universeId":6765805766,"pc":"XEON V4","records":[{"username":"ExamplePlayer1","fields":{"wallet":4800}}]}'