> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rawchunks.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Read editor history

> Read stems, takes and newest-first commits.

Use `commits[0]?.id ?? null` as the current composition revision when merging. A commit snapshot is not a server-side undo command.

## Headers and parameters

<ParamField path="songId" type="string" required>
  Resource ID.
</ParamField>

<ParamField header="x-session-user-address" type="string" required>
  Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
</ParamField>

## Response (200)

Success.

<ResponseField name="stems" type="object[]" required>
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required />

    <ResponseField name="song_id" type="string" required />

    <ResponseField name="name" type="string" required />

    <ResponseField name="url" type="string" required />

    <ResponseField name="volume" type="number">
      Linear gain, 1 is unity. Minimum: `0`.
    </ResponseField>

    <ResponseField name="pan" type="number">
      Range: `-1` to `1`.
    </ResponseField>

    <ResponseField name="is_muted" type="boolean" />

    <ResponseField name="is_solo" type="boolean" />

    <ResponseField name="waveform_peaks_url" type="string | null" />

    <ResponseField name="created_at" type="string" />
  </Expandable>
</ResponseField>

<ResponseField name="takes" type="object[]" required>
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required />

    <ResponseField name="song_id" type="string" required />

    <ResponseField name="stem_id" type="string | null" />

    <ResponseField name="take_number" type="integer" />

    <ResponseField name="model" type="string" />

    <ResponseField name="task" type="string" />

    <ResponseField name="url" type="string" required />

    <ResponseField name="is_active" type="boolean" required />

    <ResponseField name="prompt" type="string | null" />

    <ResponseField name="lyrics" type="string | null" />

    <ResponseField name="repainting_start" type="number | null" />

    <ResponseField name="repainting_end" type="number | null" />

    <ResponseField name="seed" type="integer | null" />

    <ResponseField name="provenance" type="object | null">
      <Expandable title="Properties">
        <ResponseField name="target" type="string">
          Values: `master`, `stem`, `layer`.
        </ResponseField>

        <ResponseField name="targetStemId" type="string | null" />

        <ResponseField name="region" type="object | null">
          <Expandable title="Properties">
            <ResponseField name="start" type="number" required>
              Start on the song timeline, in seconds. Minimum: `0`.
            </ResponseField>

            <ResponseField name="end" type="number" required>
              End on the song timeline, in seconds. Must exceed start. Minimum: `0`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="regions" type="object[]">
          <Expandable title="Properties">
            <ResponseField name="start" type="number" required>
              Start on the song timeline, in seconds. Minimum: `0`.
            </ResponseField>

            <ResponseField name="end" type="number" required>
              End on the song timeline, in seconds. Must exceed start. Minimum: `0`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="audioOffset" type="number">
          Source-buffer offset for the eligible section, in seconds.
        </ResponseField>

        <ResponseField name="outputDuration" type="number | null" />

        <ResponseField name="mergedInto" type="string" />

        <ResponseField name="layerName" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="created_at" type="string" />
  </Expandable>
</ResponseField>

<ResponseField name="commits" type="object[]" required>
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required />

    <ResponseField name="song_id" type="string" required />

    <ResponseField name="user_address" type="string" />

    <ResponseField name="parent_commit_id" type="string | null" />

    <ResponseField name="message" type="string" required />

    <ResponseField name="timeline_snapshot" type="object" required />

    <ResponseField name="created_at" type="string" />
  </Expandable>
</ResponseField>

## Errors

Failed JSON responses contain an `error` string. Check the HTTP status before reading a successful result. See [job handling](/dev/guides/jobs) for interrupted or uncertain submissions.

| Status | Meaning |
| - | - |
| `400` | Invalid request. |
| `403` | Account does not match resource. |
| `404` | Resource not found. |
| `409` | Resource conflict; reload state or open an editable version. |
| `500` | Request failed. |

<RequestExample>
  ```bash cURL theme={null}
  curl --fail-with-body -X GET "$RAWCHUNKS_API/api/editing/history/$(jq -nr --arg v "$SONG_ID" '$v|@uri')" \
    -H "x-session-user-address: $USER_ADDRESS"
  ```
</RequestExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.