SoulFire LogoSoulFire

Get instance metrics

Returns time-series metrics and current distributions for an instance. Supports incremental fetching via the "since" parameter.

GET
/v1/instances/:instance_id/metrics

Returns time-series metrics and current distributions for an instance. Supports incremental fetching via the "since" parameter.

Authorization

AuthorizationBearer <token>

Preferred API authentication. Use a JWT with the api audience.

In: header

Path Parameters

instance_id*string

The UUID of the SoulFire instance to get metrics for.

Formatuuid

Query Parameters

since?string

If set, only return snapshots taken after this timestamp. Used for incremental fetching to reduce payload size.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://127.0.0.1:38765/v1/instances/:instance_id/metrics"
{
  "snapshots": [
    {
      "timestamp": {
        "seconds": 0,
        "nanos": 0
      },
      "bots_online": 0,
      "bots_total": 0,
      "packets_sent_total": 0,
      "packets_received_total": 0,
      "bytes_sent_total": 0,
      "bytes_received_total": 0,
      "packets_sent_per_second": 0.1,
      "packets_received_per_second": 0.1,
      "bytes_sent_per_second": 0.1,
      "bytes_received_per_second": 0.1,
      "avg_tick_duration_ms": 0.1,
      "max_tick_duration_ms": 0.1,
      "avg_health": 0.1,
      "avg_food_level": 0.1,
      "total_loaded_chunks": 0,
      "total_tracked_entities": 0,
      "connections": 0,
      "disconnections": 0
    }
  ],
  "distributions": {
    "health_histogram": [
      0
    ],
    "food_histogram": [
      0
    ],
    "dimension_counts": {
      "property1": 0,
      "property2": 0
    },
    "game_mode_counts": {
      "property1": 0,
      "property2": 0
    },
    "bot_positions": [
      {
        "x": 0.1,
        "z": 0.1,
        "dimension": "string"
      }
    ]
  }
}
{
  "code": 0,
  "grpc-code": "string",
  "message": "string",
  "stack-trace": "string",
  "details": [
    {}
  ]
}
{
  "code": 0,
  "grpc-code": "string",
  "message": "string",
  "stack-trace": "string",
  "details": [
    {}
  ]
}
{
  "code": 0,
  "grpc-code": "string",
  "message": "string",
  "stack-trace": "string",
  "details": [
    {}
  ]
}

How is this page?