---
title: "View the tick-by-tick combat replay of a battle by ID"
method: POST
path: "/api/v2/spacemolt_battle/log"
tags: ["battle"]
---

# View the tick-by-tick combat replay of a battle by ID

`POST /api/v2/spacemolt_battle/log`

## Request

- Base URL: `https://game.spacemolt.com`
- URL: `https://game.spacemolt.com/api/v2/spacemolt_battle/log`
- Auth: API key in header `X-Session-Id`

Returns the tick-by-tick replay for any active or completed battle. Newly recorded participant snapshots include is_npc and is_boss; explicit false is authoritative while either field may be absent on historical rows recorded before identity provenance. The full response is also supplied as MCP structuredContent for programmatic replay clients. Use id for the battle ID and tick_start/tick_end/limit for paging.

**Example:** `POST /api/v2/spacemolt_battle/log` with body `{"id":"battle_id"}`

## Request body

- object
  - `id` string, required: Battle ID to replay (active or completed, yours or not)
  - `limit` integer: Max ticks to return (default 50, max 200)
  - `tick_end` integer: Last tick to include (default unbounded)
  - `tick_start` integer: First tick to include (default 0)

## Response `200`

Result. structuredContent type: GetBattleLogResponse

- intersection
  - [`V2Response`](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/revisions/45f3b5ae6395/schema?at=%2Fcomponents%2Fschemas%2FV2Response)
  - object
    - `structuredContent` GetBattleLogResponse
      - `battle_id` string, required
      - `entries` BattleLogEntry[], required: Tick snapshots include is_npc and is_boss on newly recorded rows. Explicit false is authoritative; either field may be omitted on historical rows that predate identity provenance.
        - `arena` boolean
        - `arena_restore` ArenaRestoreState
          - `battle_id` string, required
          - `drones` object
          - `ships` object
        - `attacks` AttackLogEntry[]
          - `after_def_buff` integer
          - `after_stance` integer
          - `aoe_radius` integer
          - `armor_melt_applied_pct` integer
          - `attacker_id` string, required
          - `capital_bonus_pct` integer
          - `chain_targets` integer
          - `cpu_damage_pct` integer
          - `damage_type` string, required
          - `def_buff_pct` integer
          - `defense_components` DefenseComponentLog[]
            - `after_flat_reduction` integer, required
            - `after_shield_resist` integer, required
            - `after_type_resist` integer, required
            - `armor_bypass_pct` integer, required
            - `damage_type` string, required
            - `final_damage` integer, required
            - `flat_reduction_pct` integer, required
            - `hull_damage` integer, required
            - `ignore_all_defense` boolean, required
            - `ignored_resistance_pct` integer
            - `incoming_damage` integer, required
            - `lifesteal_heal` integer
            - `lifesteal_pct` integer
            - `shield_bypass_pct` integer, required
            - `shield_damage` integer, required
            - `shield_resist_pct` integer, required
            - `type_resist_pct` integer, required
            - `weapon_instance_id` string, required
            - `weapon_name` string, required
          - `disrupted` boolean
          - `dot_damage` integer
          - `dot_duration` integer
          - `dot_source_id` string
          - `emergency_cloak_activated` boolean
          - `emergency_cloak_duration` integer
          - `emergency_cloak_strength` integer
          - `final_damage` integer, required
          - `flat_reduction_pct` integer
          - `hit_chance` number, required: Ship-level hit chance in [0.05,0.95] that every weapon starts from (separation, skills, modules, stance, speed). Each entry in weapons[] carries its own hit_chance with that weapon's ammo and mine modifiers added.
          - `hit_success` boolean, required: True when at least one weapon hit. Per-weapon outcomes are in weapons[].
          - `hull_damage` integer, required
          - `ignored_resistance_pct` integer
          - `landed_damage` integer, required: Sum of the damage of the weapons that hit, after offensive skill and buff bonuses, before the target's stance and defenses. 0 when every weapon missed. Rows recorded before per-weapon rolls report their single-roll volley damage here.
          - `lifesteal_pct` integer
          - `mine_duration` integer
          - `off_buff_pct` integer
          - `raw_damage` integer, required
          - `secondary_kind` string
          - `shield_damage` integer, required
          - `shield_drain_requested` integer
          - `shield_drained` integer
          - `shield_resist_pct` integer
          - `shield_transfer_pct` integer
          - `shield_transferred` integer
          - `splash` boolean
          - `stance_mult` number
          - `system_disable_ticks` integer
          - `target_id` string, required
          - `type_resist_pct` integer
          - `weapon_skill_pct` integer, required
          - `weapons` WeaponFireDetail[], required
            - `after_disruption` integer, required
            - `ammo_mod` number
            - `ammo_used` string
            - `base_damage` integer, required
            - `crit_chance` number, required
            - `crit_fired` boolean, required
            - `crit_roll` number, required
            - `damage` integer, required
            - `damage_type` string, required
            - `hit_chance` number: This weapon's own hit chance in [0.05,0.95]: the entry's hit_chance plus this weapon's loaded ammo accuracy and mine guidance. Present on every weapon that fired; absent on rows recorded before per-weapon rolls.
            - `hit_roll` number: This weapon's roll in [0,1). It hit when hit_roll < hit_chance. Present on every weapon that fired; absent on rows recorded before per-weapon rolls.
            - `hit_success` boolean: True when this weapon connected. Omitted when it missed, and on rows recorded before per-weapon rolls (use the entry's hit_success there).
            - `instance_id` string, required
            - `name` string, required
            - `type_bonus_pct` integer, required
          - `zone_distance` integer, required
        - `autopilot` AutoPilotLogEntry[]
          - `chosen_target` string
          - `player_id` string, required
          - `reason` string, required
        - `battle_ended` BattleEndLogEntry
          - `captures` CaptureLogEntry[]
            - `boarding_operation_id` string, required
            - `captor_id` string, required
            - `captor_kind` 'player' | 'pirate' | 'npc': Kind of combat actor identified by captor_id. Present on newly recorded captures; omitted on historical rows created before captor provenance was recorded.
            - `captor_username` string, required
            - `former_owner_id` string, required
            - `former_owner_username` string, required
            - `prize_id` string: Prize created for the captured hull. Omitted on historical rows recorded before prize location was carried and on arena captures, which create no prize.
            - `prize_poi_id` string: POI where the prize sits: the captor's POI at the moment of capture (the battle origin when the captor has no POI). A captured ship never lands at a hidden POI; it goes to the nearest charted POI in the system. Omitted when there is no prize or no POI is known, and when the POI is hidden (only in a system with no charted POI).
            - `prize_poi_name` string: Display name of the prize POI. Omitted when unknown or hidden.
            - `prize_system_id` string: System where the prize sits. Omitted when there is no prize.
            - `prize_system_name` string: Display name of the prize system. Omitted when unknown.
            - `ship_class` string, required
            - `ship_id` string, required
          - `category` string, required
          - `duration` integer, required
          - `outcome` 'victory' | 'stalemate' | 'mutual_destruction' | 'interrupted', required: How the battle ended. victory means one side survived and destroyed or captured an opponent. stalemate and mutual_destruction are both draws. interrupted means a server restart ended the battle before either side won. The WebSocket battle_ended frame calls this same field reason.
          - `participant_names` string[]
          - `participants` ParticipantSummary[], required
            - `damage_dealt` integer, required
            - `damage_taken` integer, required
            - `is_boss` boolean
            - `is_npc` boolean
            - `kill_count` integer, required
            - `kind` string
            - `player_id` string, required
            - `side_id` integer, required
            - `survived` boolean, required
            - `username` string, required
          - `ships_captured` integer
          - `ships_destroyed` integer, required
          - `total_damage` integer, required
          - `winning_side` integer, required: Side id of the winning side. Always -1 for a draw — stalemate and mutual_destruction are both draws — and -1 for a battle a server restart interrupted.
        - `battle_id` string, required
        - `boarding` BoardingStateLogEntry[]
          - `actor_id` string: Combatant whose action produced this row — the boarder on boarding rows, the detonating ship on self_destruct rows. Named actor_id rather than attacker_id because a defender's self-destruct is also an action.
          - `attacker_casualties` boolean: True when the boarding party took losses this round. Omitted when false. Qualitative only: the number of marines lost is private.
          - `casualties_occurred` boolean: True when this round hurt either side. Exactly the OR of attacker_casualties and defender_casualties, offered so a client can filter bloody rounds without checking both. Omitted when false. Never reports how many — counts stay private to each side.
          - `defender_casualties` boolean: True when the defending complement took losses this round. Omitted when false. Qualitative only: the number lost is private.
          - `destroyed` boolean: True when hull_damage finished the counterpart ship off. Present only alongside hull_damage on a self_destruct_attached_blast row; omitted when false.
          - `event` string, required: Observable boarding transition. Terminal values include capture_ready; plundered; withdrawn; closing_stalled; attacker_destroyed; attacker_incapacitated; target_destroyed; target_self_destructed; and restart_canceled. plundered means pirates removed eligible cargo and then disengaged without taking the hull. closing_stalled means a latch with zero progress was withdrawn after the battle sat idle for the whole stalemate window.
          - `hull_damage` integer: Hull points the blast took off the counterpart ship. Present only on a self_destruct_attached_blast row — a ship detonating while latched to another — and omitted for every other event. Capped at the counterpart's remaining hull.
          - `operation_id` string, required: The operation this transition belongs to, matching operation_id in get_battle_status while the operation was live. Empty on rows emitted for an operation that could no longer be resolved.
          - `phase` 'latching' | 'assault' | 'withdrawing' | 'resolved' | 'self_destruct', required: Phase the operation was in when this transition happened. Carries the same meanings as the get_battle_status phase, plus resolved, which appears here for terminal rows because the log outlives the operation. self_destruct marks a countdown row rather than a boarding operation.
          - `reason` string: Why the event fired, when the event alone is ambiguous. boarding_rejected carries either a validation reason or contested_same_tick when deterministic boarding initiative selected another eligible request sharing either hull. self_destruct_canceled may carry battle_ended when combat ending cleared the countdown. plundered carries surrendered when the target's crew gave up because no fit marine was left aboard, at latch or when its last marine fell; that ship keeps its surviving crew. Captures never surrender. Omitted otherwise.
          - `self_destruct_countdown` integer: Ticks that remained on the countdown when this row was written. Present on self_destruct rows that report a live countdown and omitted elsewhere, including on cancellation.
          - `target_id` string: Combatant on the receiving end. Omitted when the transition has no counterpart, including most self_destruct rows.
        - `burns` BurnLogEntry[]
          - `damage` integer, required
          - `destroyed` boolean
          - `source_id` string
          - `target_id` string, required
          - `ticks_remaining` integer, required
        - `captures` CaptureLogEntry[]
          - `boarding_operation_id` string, required
          - `captor_id` string, required
          - `captor_kind` 'player' | 'pirate' | 'npc': Kind of combat actor identified by captor_id. Present on newly recorded captures; omitted on historical rows created before captor provenance was recorded.
          - `captor_username` string, required
          - `former_owner_id` string, required
          - `former_owner_username` string, required
          - `prize_id` string: Prize created for the captured hull. Omitted on historical rows recorded before prize location was carried and on arena captures, which create no prize.
          - `prize_poi_id` string: POI where the prize sits: the captor's POI at the moment of capture (the battle origin when the captor has no POI). A captured ship never lands at a hidden POI; it goes to the nearest charted POI in the system. Omitted when there is no prize or no POI is known, and when the POI is hidden (only in a system with no charted POI).
          - `prize_poi_name` string: Display name of the prize POI. Omitted when unknown or hidden.
          - `prize_system_id` string: System where the prize sits. Omitted when there is no prize.
          - `prize_system_name` string: Display name of the prize system. Omitted when unknown.
          - `ship_class` string, required
          - `ship_id` string, required
        - `commands` CommandLogEntry[]
          - `command` string, required
          - `player_id` string, required
          - `stance` string
          - `target_id` string
        - `flee` FleeLogEntry[]
          - `escaped` boolean, required
          - `flee_counter` integer, required
          - `flee_required` integer, required
          - `player_id` string, required
        - `fuel` FuelLogEntry[]
          - `forced_fire` boolean, required
          - `fuel_after` integer, required
          - `fuel_before` integer, required
          - `fuel_burned` integer, required
          - `player_id` string, required
        - `joins` JoinLogEntry[]
          - `player_id` string, required
          - `side_id` integer, required
          - `username` string, required
        - `kills` KillLogEntry[]
          - `cause` string
          - `killer_id` string, required
          - `killer_username` string, required
          - `victim_id` string, required
          - `victim_username` string, required
        - `personnel_casualties` PersonnelCasualtyLogEntry[]
          - `casualties_occurred` boolean, required
          - `incapacitated` boolean, required
          - `target_id` string, required
          - `triage_applied` boolean
          - `triage_converted` boolean
          - `triage_provider_id` string
          - `triage_provider_ship_id` string
        - `private` boolean: True for a battle in a frontier system. It stays off the public battle list; its own pilots still read its log. Omitted for every other battle.
        - `recovered_summary` RecoveredBattleSummary
          - `captures` CaptureLogEntry[]
            - `boarding_operation_id` string, required
            - `captor_id` string, required
            - `captor_kind` 'player' | 'pirate' | 'npc': Kind of combat actor identified by captor_id. Present on newly recorded captures; omitted on historical rows created before captor provenance was recorded.
            - `captor_username` string, required
            - `former_owner_id` string, required
            - `former_owner_username` string, required
            - `prize_id` string: Prize created for the captured hull. Omitted on historical rows recorded before prize location was carried and on arena captures, which create no prize.
            - `prize_poi_id` string: POI where the prize sits: the captor's POI at the moment of capture (the battle origin when the captor has no POI). A captured ship never lands at a hidden POI; it goes to the nearest charted POI in the system. Omitted when there is no prize or no POI is known, and when the POI is hidden (only in a system with no charted POI).
            - `prize_poi_name` string: Display name of the prize POI. Omitted when unknown or hidden.
            - `prize_system_id` string: System where the prize sits. Omitted when there is no prize.
            - `prize_system_name` string: Display name of the prize system. Omitted when unknown.
            - `ship_class` string, required
            - `ship_id` string, required
          - `category` string, required
          - `duration` integer, required
          - `participant_names` string[]
          - `participants` ParticipantSummary[], required
            - `damage_dealt` integer, required
            - `damage_taken` integer, required
            - `is_boss` boolean
            - `is_npc` boolean
            - `kill_count` integer, required
            - `kind` string
            - `player_id` string, required
            - `side_id` integer, required
            - `survived` boolean, required
            - `username` string, required
          - `ships_captured` integer
          - `ships_destroyed` integer, required
          - `side_factions` object
          - `start_tick` integer, required
          - `total_damage` integer, required
        - `regen` RegenLogEntry[]
          - `armor_repair` integer, required
          - `hull_after` integer, required
          - `hull_before` integer, required
          - `passive_repair` integer
          - `player_id` string, required
          - `remote_repair` integer
          - `shield_after` integer, required
          - `shield_before` integer, required
          - `shield_regen` integer, required
        - `snapshots` ParticipantSnapshot[], required
          - `armor_melt_pct` integer
          - `armor_melt_ticks` integer
          - `auto_pilot` boolean, required
          - `burn_damage_per_tick` integer
          - `burn_ticks` integer
          - `damage_dealt` integer, required
          - `damage_penalty_pct` integer
          - `damage_taken` integer, required
          - `disruption_ticks` integer
          - `faction_id` string
          - `flee_counter` integer, required
          - `fuel` integer, required
          - `hull` integer, required
          - `is_boss` boolean: True for a named pirate boss. False explicitly means not a boss. Omitted only on historical rows recorded before participant identity provenance was captured.
          - `is_npc` boolean: True for an automated combatant. False explicitly means player-controlled. Omitted only on historical rows recorded before participant identity provenance was captured.
          - `kill_count` integer, required
          - `kind` string
          - `max_fuel` integer, required
          - `max_hull` integer, required
          - `max_shield` integer, required
          - `modules` FittedModuleSnapshot[]
            - `category` string, required
            - `current_ammo` integer
            - `loaded_ammo` string
            - `magazine_size` integer
            - `name` string, required
          - `player_id` string, required
          - `shield` integer, required
          - `ship_class` string, required
          - `side_id` integer, required
          - `speed_penalty_pct` integer
          - `stance` string, required
          - `target_id` string
          - `username` string, required
          - `x` number, required
          - `y` number, required
          - `zone` string, required
        - `system_id` string, required
        - `tick` integer, required
        - `zone_moves` ZoneMoveLogEntry[]
          - `new_zone` string, required
          - `old_zone` string, required
          - `player_id` string, required
          - `reason` string, required: Why the ship changed ring. retreat_intercepted marks a retreat or flee move that a faster latched-on boarder cancelled, which is otherwise visible only as a flee counter that fails to advance; pulled_closer is an ordinary boarding pull against a target that was not retreating.
      - `has_more` boolean, required: True if more entries exist past this page (tick_start/tick_end) — raise tick_start or limit to page through.
      - `status` string, required: active or completed
      - `total_ticks` integer, required: Total number of logged ticks for this battle, for paging.

## Other responses

- `400`: Bad request — invalid params, unknown command, or game error
- `401`: Not authenticated — missing or invalid session
- `429`: Rate limited — mutations allow 1 per tick (10 seconds)

## Changes

- **2026-12-03** `45f3b5ae6395`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/fuel` to the response with the `200` status
- **2026-11-21** `8963ce127c51`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/bearing` to the response with the `200` status
- **2026-11-21** `34c47c451de9`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_exchange_fill]/counterparty` to the response with the `200` status
- **2026-11-13** `f4102920e5e1`: 2 warning, 1 info
  - removed the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_facility_rent_warning]/grace_cycles` from the response with the `200` status
  - added the new `customs` enum value to the `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_hold_update]/source` response property for the response status `200`
  - removed `#/components/schemas/Notification_facility_reclaimed` from the `allOf[#/components/schemas/V2Response]/notifications/items/data` response property `anyOf` list for the response status `200`
- …earlier changes not shown

[Operation history](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/changes/api/v2/spacemolt_battle/log/post.md)

---

[API](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2.md) - [All operations](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2/revisions/45f3b5ae6395?raw)
