SolarSystem

BETA

Documentation

API Reference

HTTP API is versioned by path parameters.

Paths without version numbers always point to the latest version.

For example https://api.solarsystemdb.com/query is equivalent to https://api.solarsystemdb.com/v1/query

The current latest version is v1.

Execute Query

Executes a query on the specified branch. The body parameter is optional and only `params`.

Request

POST /query
curl -L -X POST \
  -H "Authorization: Bearer <YOUR-API-KEY>" \
  -d '{"team_name":"my_team","cluster_name":"first_cluster","branch_name":"dev","sql":"SELECT * FROM planets","params":[]}' \
  https://api.solarsystemdb.com/query

Response

200 OK

{
  "errors": [
    {
      "code": 1000,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message"
    }
  ],
  "result": [
    {
      "meta": {
        "changed_db": true,
        "changes": 0,
        "duration": 0,
        "last_row_id": 0,
        "rows_read": 0,
        "rows_written": 0,
        "size_after": 0
      },
      "results": [
        {}
      ],
      "success": true
    }
  ],
  "success": true
}

400 Bad Request

{
  "message": "error_message"
}

402 Payment Required

{
  "message": "plan_limit_error_message"
}

500 Internal Server Error

{
  "message": "error_message"
}

Time Travel Rollback

Rolls back the specified branch to the state of UNIX time.

Request

POST /time-travel
curl -L -X POST \
  -H "Authorization: Bearer <YOUR-API-KEY>" \
  -d '{"team_name":"my_team","cluster_name":"first_cluster","branch_name":"dev","timestamp":1736931668}' \
  https://api.solarsystemdb.com/time-travel

Response

200 OK

{
  "stdout": "stdout_message",
  "stderr": "error_or_warning_message"
}

400 Bad Request

{
  "message": "error_message"
}

500 Internal Server Error

{
  "message": "error_message"
}