> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-issue-698-scan-api-single-page.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# /v0/state/acs

> Returns the ACS in creation date ascending order, paged, for a given migration id and record time.




## OpenAPI

````yaml /openapi/splice/scan/scan.yaml post /v0/state/acs
openapi: 3.0.0
info:
  title: Scan API
  version: 0.0.1
servers:
  - url: https://scan.sv-1.global.canton.network.sync.global/api/scan
security: []
tags:
  - name: common
    description: |
      Health and status endpoints available on all nodes.
  - name: external
    description: >
      These endpoints are intended for public usage and will remain
      backward-compatible.
  - name: internal
    description: >
      For internal usage only, not guaranteed to be stable or
      backward-compatible.
  - name: deprecated
    description: |
      These endpoints are deprecated and will be removed in a future release.
  - name: scan
    description: |
      The internal and external endpoints.
  - name: pre-alpha
    description: |
      Still under active development, highly unstable. Do not use in production.
paths:
  /v0/state/acs:
    post:
      tags:
        - external
        - scan
      summary: /v0/state/acs
      description: >
        Returns the ACS in creation date ascending order, paged, for a given
        migration id and record time.
      operationId: getAcsSnapshotAt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcsRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcsResponse'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    AcsRequest:
      type: object
      required:
        - migration_id
        - record_time
        - page_size
      properties:
        migration_id:
          type: integer
          format: int64
          description: |
            The migration id for which to return the ACS.
        record_time:
          type: string
          format: date-time
          description: >
            The timestamp at which the contract set was active.

            This needs to be an exact timestamp, i.e.,

            needs to correspond to a timestamp reported by
            `/v0/state/acs/snapshot-timestamp` if `record_time_match` is set to
            `exact` (which is the default).

            If `record_time_match` is set to `at_or_before`, this can be any
            timestamp, and the most recent snapshot at or before the given
            `record_time` will be returned.
        record_time_match:
          type: string
          description: >
            How to match the record_time. "exact" requires the record_time to
            match exactly.

            "at_or_before" finds the most recent snapshot at or before the given
            record_time.
          enum:
            - exact
            - at_or_before
          default: exact
        after:
          type: integer
          format: int64
          description: >
            Pagination token for the next page of results. For this to be valid,

            this must be the `next_page_token` from a prior request with
            identical

            parameters aside from `after` and `page_size`; the response may be

            invalid otherwise.
        page_size:
          description: |
            The maximum number of created events returned for this request.
          type: integer
          format: int32
        party_ids:
          type: array
          items:
            type: string
          description: >
            Filters the ACS by contracts in which these party IDs are
            stakeholders.
        templates:
          type: array
          items:
            type: string
          description: >
            Filters the ACS by contracts with these template IDs, specified as
            "PACKAGE_NAME:MODULE_NAME:ENTITY_NAME".
    AcsResponse:
      type: object
      required:
        - record_time
        - migration_id
        - created_events
      properties:
        record_time:
          description: The same `record_time` as in the request.
          type: string
          format: date-time
        migration_id:
          description: The same `migration_id` as in the request.
          type: integer
          format: int64
        created_events:
          description: |
            Up to `page_size` contracts in the ACS.
            `create_arguments` are always encoded as `compact_json`.
          type: array
          items:
            $ref: '#/components/schemas/CreatedEvent'
        next_page_token:
          type: integer
          format: int64
          description: |
            When requesting the next page of results, pass this as `after`
            to the `AcsRequest` or `HoldingsStateRequest`.
            Will be absent when there are no more pages.
    CreatedEvent:
      type: object
      required:
        - event_type
        - event_id
        - contract_id
        - template_id
        - package_name
        - create_arguments
        - created_at
        - signatories
        - observers
      properties:
        event_type:
          type: string
        event_id:
          description: |
            The ID of this particular event. Equal to the key of this element of
            the containing `events_by_id` if this is part of a `TreeEvent`.
          type: string
        contract_id:
          description: |
            The ID of the created contract.
          type: string
        template_id:
          description: |
            The template of the created contract.
          type: string
        package_name:
          description: |
            The package name of the created contract.
          type: string
        create_arguments:
          description: |
            The arguments that have been used to create the contract, in the
            form of JSON representation of a Daml record.
          type: object
        created_at:
          description: |
            Ledger effective time of the transaction that created the contract.
          type: string
          format: date-time
        signatories:
          description: |
            Signatories to the contract, in the form of party IDs.
          type: array
          items:
            type: string
        observers:
          description: |
            Observers to the contract, in the form of party IDs.
          type: array
          items:
            type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    '400':
      description: bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '404':
      description: not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '500':
      description: internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

````