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

# Get an operation

> Retrieve a single operation by ID. An operation represents an async read, write, or subscribe action for an installation. Use this endpoint to poll for status, inspect the result summary, or fetch metadata such as read progress or write outcome details.




## OpenAPI

````yaml platform get /projects/{projectIdOrName}/operations/{operationId}
openapi: 3.0.1
info:
  title: Ampersand public API
  version: 1.0.0
servers:
  - url: https://api.withampersand.com/v1
security:
  - APIKeyHeader: []
  - Bearer: []
paths:
  /projects/{projectIdOrName}/operations/{operationId}:
    get:
      tags:
        - Operation
      summary: Get an operation
      description: >
        Retrieve a single operation by ID. An operation represents an async
        read, write, or subscribe action for an installation. Use this endpoint
        to poll for status, inspect the result summary, or fetch metadata such
        as read progress or write outcome details.
      operationId: getOperation
      parameters:
        - name: projectIdOrName
          in: path
          required: true
          description: The Ampersand project ID or project name.
          schema:
            type: string
          example: my-project
        - name: operationId
          in: path
          required: true
          description: >-
            Unique identifier for the operation. Obtain from the list operations
            API endpoint, the Ampersand dashboard, or webhook payloads.
          schema:
            type: string
          example: 3efc0f0f-4bb9-498f-996c-9893d98ca4b5
      responses:
        '200':
          description: >-
            The operation, including its current status, result summary, and
            metadata (e.g. read progress or write results).
          content:
            application/json:
              schema:
                title: Operation
                required:
                  - projectId
                  - integrationId
                  - installationId
                  - configId
                  - actionType
                  - status
                  - id
                type: object
                properties:
                  projectId:
                    type: string
                    description: The Ampersand project ID.
                    example: 123e4567-e89b-12d3-a456-426614174000
                  integrationId:
                    type: string
                    description: The integration ID.
                  configId:
                    type: string
                    description: The config ID.
                    example: a1b2c3d4-e5f6-4789-a012-3456789abcde
                  actionType:
                    type: string
                    description: >
                      The type of action that was performed (`read`, `write`, or
                      `subscribe`).
                    example: read
                  id:
                    type: string
                    description: >-
                      Unique identifier for this operation. Use this to fetch
                      operation details or list logs for debugging.
                  installationId:
                    type: string
                    description: >-
                      The Ampersand installation ID (customer instance) that
                      this operation ran for.
                  status:
                    type: string
                    description: |
                      The status of the operation.
                      - `success`: The operation completed successfully
                      - `failure`: The operation failed
                      - `in_progress`: The operation is currently running
                    example: success
                  result:
                    type: string
                    description: >
                      A human-readable summary of what the operation
                      accomplished. Examples: `[contact] No new data found`,
                      `Batch write completed (3 succeeded, 1 failed)`. May be
                      absent.
                    example: '[contact] No new data found'
                  metadata:
                    type: object
                    description: >-
                      Additional operation details (e.g. objects, retry info,
                      read progress, successfulRecordIds).
                    properties:
                      objects:
                        type: array
                        items:
                          type: string
                      retry:
                        type: object
                        properties:
                          attempts:
                            type: integer
                          lastAttempt:
                            type: string
                            format: date-time
                          lastNotified:
                            type: string
                            format: date-time
                      progress:
                        type: object
                        description: >-
                          Read progress for the operation, reporting records
                          processed and, where available, the estimated total.
                          Present for all read operations.
                        properties:
                          installationId:
                            type: string
                          objectName:
                            type: string
                          operationId:
                            type: string
                          recordsProcessed:
                            type: integer
                          recordsEstimatedTotal:
                            type: integer
                            description: >-
                              Only present for some providers (e.g. Salesforce,
                              HubSpot).
                      successfulRecordIds:
                        type: array
                        items:
                          type: string
                        description: >-
                          Provider-assigned IDs of successfully created or
                          updated records. Only present for write operations.
                    example:
                      objects:
                        - contact
                      progress:
                        installationId: 66438162-5299-4669-a41d-85c5a3b1a83e
                        objectName: contact
                        operationId: 3efc0f0f-4bb9-498f-996c-9893d98ca4b5
                        recordsProcessed: 1250
                        recordsEstimatedTotal: 5000
                  createTime:
                    type: string
                    description: The time the operation was created.
                    format: date-time
                    example: '2023-07-13T21:34:44.816Z'
              examples:
                readSuccess:
                  summary: Completed read (no new data)
                  value:
                    projectId: 123e4567-e89b-12d3-a456-426614174000
                    integrationId: 113e9685-9a51-42cc-8662-9d9725b17f14
                    installationId: 66438162-5299-4669-a41d-85c5a3b1a83e
                    configId: a1b2c3d4-e5f6-4789-a012-3456789abcde
                    actionType: read
                    status: success
                    id: 3efc0f0f-4bb9-498f-996c-9893d98ca4b5
                    result: '[contact] No new data found'
                    metadata:
                      objects:
                        - contact
                    createTime: '2023-07-13T21:34:44.816354Z'
                readProgress:
                  summary: Read with progress
                  value:
                    projectId: 123e4567-e89b-12d3-a456-426614174000
                    integrationId: 113e9685-9a51-42cc-8662-9d9725b17f14
                    installationId: 66438162-5299-4669-a41d-85c5a3b1a83e
                    configId: a1b2c3d4-e5f6-4789-a012-3456789abcde
                    actionType: read
                    status: in_progress
                    id: 3efc0f0f-4bb9-498f-996c-9893d98ca4b5
                    metadata:
                      objects:
                        - contact
                      progress:
                        installationId: 66438162-5299-4669-a41d-85c5a3b1a83e
                        objectName: contact
                        operationId: 3efc0f0f-4bb9-498f-996c-9893d98ca4b5
                        recordsProcessed: 1250
                        recordsEstimatedTotal: 5000
                    createTime: '2023-07-13T21:34:44.816354Z'
                writeSuccess:
                  summary: Completed write with successful record IDs
                  value:
                    projectId: 123e4567-e89b-12d3-a456-426614174000
                    integrationId: 113e9685-9a51-42cc-8662-9d9725b17f14
                    installationId: 66438162-5299-4669-a41d-85c5a3b1a83e
                    configId: a1b2c3d4-e5f6-4789-a012-3456789abcde
                    actionType: write
                    status: success
                    id: 7a8b9c0d-1e2f-4a5b-8c9d-0e1f2a3b4c5d
                    result: Batch write completed (2 succeeded, 0 failed)
                    metadata:
                      objects:
                        - contact
                      successfulRecordIds:
                        - 001xx000003DGbYAAW
                        - 001xx000003DGbZAAW
                    createTime: '2023-07-13T22:10:00.000000Z'
        default:
          description: >
            Error response for any non-2xx status (e.g. operation not found,
            invalid project or operation ID, or server error).
          content:
            application/problem+json:
              schema:
                title: API Problem
                type: object
                allOf:
                  - title: Problem
                    description: >
                      A Problem Details object (RFC 9457).


                      Additional properties specific to the problem type may be
                      present.
                    type: object
                    properties:
                      type:
                        type: string
                        format: uri
                        description: An absolute URI that identifies the problem type
                        default: about:blank
                      href:
                        type: string
                        format: uri
                        description: >-
                          An absolute URI that, when dereferenced, provides
                          human-readable documentation for the problem type
                          (e.g. using HTML).
                      title:
                        type: string
                        description: >-
                          A short summary of the problem type. Written in
                          English and readable for engineers (usually not suited
                          for non technical stakeholders and not localized).
                        example: Service Unavailable
                      status:
                        type: integer
                        format: int32
                        description: >-
                          The HTTP status code generated by the origin server
                          for this occurrence of the problem.
                        minimum: 400
                        maximum: 600
                        exclusiveMaximum: true
                        example: 503
                      detail:
                        type: string
                        description: >-
                          A human-readable explanation specific to this
                          occurrence of the problem
                      instance:
                        type: string
                        format: uri
                        description: >-
                          An absolute URI that identifies the specific
                          occurrence of the problem. It may or may not yield
                          further information if dereferenced.
                    example:
                      type: urn:problem-type:exampleOrganization:exampleProblem
                      href: >-
                        https://www.belgif.be/specification/rest/api-guide/#standardized-problem-types
                      title: Description of the type of problem that occurred
                      status: 400
                      detail: Description of specific occurrence of the problem
                      instance: urn:uuid:123e4567-e89b-12d3-a456-426614174000
                properties:
                  subsystem:
                    type: string
                    description: The subsystem that generated the problem
                    example: api
                  time:
                    type: string
                    format: date-time
                    description: The time the problem occurred, formatted as RFC-3339
                    example: '2024-04-22T18:55:28.456076Z'
                  requestId:
                    type: string
                    description: A unique identifier for the request, useful for debugging
                    example: 89eb1ffb-2a54-4105-aaae-7bf990f1aa69#87715
                  causes:
                    type: array
                    items:
                      type: string
                      description: >-
                        A brief description of something which caused the
                        problem
                      example: database connection failed
                    example:
                      - database connection failed
                      - database query failed
                      - unable to fetch user
                    description: >
                      A list of problems that caused this problem. This can be
                      used to represent multiple

                      root causes. There is no guaranteed ordering of the
                      causes.
                  remedy:
                    type: string
                    description: A brief description of how to resolve the problem
                    example: Shorten your input to be under 100 characters
                  supportEmail:
                    type: string
                    format: email
                    description: An email address to contact for support
                    example: support@withampersand.com
                  supportPhone:
                    type: string
                    description: A phone number to contact for support
                    example: +1-555-555-5555
                  supportUrl:
                    type: string
                    format: uri
                    description: A URL to contact for support
                    example: https://withampersand.com/support
                  retryable:
                    type: boolean
                    description: Whether the request can be retried
                    example: false
                  retryAfter:
                    type: string
                    format: date-time
                    description: >-
                      A timestamp after which the request can be retried,
                      formatted as RFC-3339
                    example: '2024-04-22T18:55:28.456076Z'
                  context:
                    type: object
                    description: Additional context for the problem
                    additionalProperties: true
                    example:
                      name: Rick Sanchez
              example:
                type: https://httpstatuses.com/404
                title: Not Found
                status: 404
                detail: Operation not found for the given operation ID.
                subsystem: api
                time: '2024-04-22T18:55:28.456076Z'
                requestId: 89eb1ffb-2a54-4105-aaae-7bf990f1aa69#87715
                remedy: >-
                  Verify the operation ID and project are correct, or list
                  operations to find a valid ID.
                retryable: false
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: X-Api-Key
      in: header
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````