# Versions_ListSourceCommits

`GET /v1/accounts/{account}/datasets/{dataset}/versions/{version}/sourceCommits`

Lists the repository commits a tag pins, ordered by upload, so a
version can be traced to the repositories its episodes came from.
INVALID_ARGUMENT for head, which pins none.

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header

## Parameters

- `account` (path, string, required): The account id.
- `dataset` (path, string, required): The dataset id.
- `version` (path, string, required): The version id.
- `pageSize` (query, integer (int32)): At most this many commits; 0 means 100, the maximum is 500.
- `pageToken` (query, string): From a previous response's next_page_token.

## Responses

- `200` OK: `application/json` `qualia.v1.ListSourceCommitsResponse`
- `default` Default error response: `application/json` `google.rpc.Status`

## Schemas

```yaml
qualia.v1.ListSourceCommitsResponse:
  type: object
  properties:
    sourceCommits:
      type: array
      items:
        $ref: "#/components/schemas/qualia.v1.SourceCommit"
      description: One page of commits.
    nextPageToken:
      type: string
      description: Empty on the last page.
    totalSize:
      type: integer
      description: Commits the tag pins, across every page.
      format: int32
  description: Response for Versions.ListSourceCommits.
qualia.v1.SourceCommit:
  type: object
  properties:
    name:
      type: string
      description: |-
        accounts/{account}/datasets/{dataset}/versions/{version}/sourceCommits/{source_commit},
        under the tag's own name (not `stable` or a digest prefix).
    dataset:
      readOnly: true
      type: string
      description: "accounts/{account}/datasets/{dataset}: the upload the commit published."
    repoId:
      readOnly: true
      type: string
      description: The upload's Git repository, a UUID.
    gitOid:
      readOnly: true
      type: string
      description: The Git object id of the commit, lowercase hex.
    gitHashAlgorithm:
      readOnly: true
      type: string
      description: 'The hash the object id is in: "sha1" or "sha256".'
    publicationGeneration:
      readOnly: true
      type: string
      description: |-
        The publication of refs/heads/main that wrote the commit; counts up
        from 1 per repository.
    semanticCommitId:
      readOnly: true
      type: string
      description: The commit's identity across hash algorithms, a UUID.
  description: |-
    One repository commit a tag pins: where the bytes of the episodes it took
    from one upload were published. A tag's commits never change.

    The {source_commit} id is `<upload uuid>-<semantic commit uuid>`.
google.rpc.Status:
  oneOf:
    - $ref: "#/components/schemas/ApiError"
    - $ref: "#/components/schemas/GatewayError"
  description: "The body of a failed call: one of the two shapes below."
ApiError:
  title: API error
  type: object
  required:
    - code
    - message
    - retryable
    - details
  properties:
    code:
      type: string
      description: The gRPC code name in upper case, e.g. `NOT_FOUND`.
    message:
      type: string
    retryable:
      type: boolean
      description: Whether the same call may succeed if retried.
    details:
      type: array
      items:
        type: object
      description: "Empty, except when a dataset copy or move is refused: then one `google.rpc.ErrorInfo` with the refusal's `reason` code, its `domain` and, in `metadata`, the datasets it names."
  description: A refusal from the API itself.
GatewayError:
  title: Gateway error
  type: object
  required:
    - detail
  properties:
    detail:
      type: string
      description: What went wrong.
  description: A refusal from the gateway before the call reaches the API, for example `401` bad or missing API key, `403` key lacks the scope or environment closed, `413` body too large.
```
