> ## 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 a hydrated revision

> Returns the integration revision enriched with live field metadata from the consumer's connected SaaS instance, such as available fields, display names, and type for each object defined in the integration.




## OpenAPI

````yaml platform get /projects/{projectIdOrName}/integrations/{integrationId}/revisions/{revisionId}:hydrate
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}/integrations/{integrationId}/revisions/{revisionId}:hydrate:
    get:
      tags:
        - Revision
      summary: Get a hydrated revision
      description: >
        Returns the integration revision enriched with live field metadata from
        the consumer's connected SaaS instance, such as available fields,
        display names, and type for each object defined in the integration.
      operationId: getHydratedRevision
      parameters:
        - name: projectIdOrName
          in: path
          required: true
          description: The Ampersand project ID or project name.
          schema:
            type: string
          example: my-project
        - name: integrationId
          in: path
          required: true
          description: The integration ID.
          schema:
            type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        - name: revisionId
          in: path
          required: true
          description: >-
            The revision ID. You can find this on the integration object's
            `latestRevision.id` field.
          schema:
            type: string
          example: f0e1d2c3-b4a5-6789-0abc-def123456789
        - name: connectionId
          in: query
          required: true
          description: >-
            The ID of the consumer's connection to the SaaS provider. This
            connection's credentials are used to fetch field metadata from the
            provider's API.
          schema:
            type: string
          example: 1a2b3c4d-5e6f-7890-abcd-ef0123456789
      responses:
        '200':
          description: Hydrated revision.
          content:
            application/json:
              schema:
                title: Hydrated Revision
                required:
                  - content
                  - createTime
                  - id
                  - specVersion
                type: object
                properties:
                  id:
                    type: string
                    description: The revision ID.
                    example: f0e1d2c3-b4a5-6789-0abc-def123456789
                  specVersion:
                    type: string
                    description: The spec version string.
                    example: 1.0.0
                  createTime:
                    type: string
                    description: The time the revision was created.
                    format: date-time
                  content:
                    title: Hydrated Integration
                    type: object
                    required:
                      - name
                      - provider
                    properties:
                      name:
                        type: string
                        example: readSalesforceAccounts
                      displayName:
                        type: string
                        example: Salesforce Accounts
                        x-go-type-skip-optional-pointer: true
                      module:
                        type: string
                        example: crm
                        x-go-type-skip-optional-pointer: true
                      provider:
                        type: string
                        example: salesforce
                      read:
                        title: Hydrated Read Integration
                        type: object
                        properties:
                          objects:
                            type: array
                            items:
                              title: Hydrated Integration Object
                              type: object
                              required:
                                - objectName
                                - displayName
                                - destination
                                - schedule
                              properties:
                                error:
                                  type: string
                                  description: >-
                                    Error message if there was an issue
                                    hydrating this object.
                                  x-go-type-skip-optional-pointer: true
                                objectName:
                                  type: string
                                  example: account
                                displayName:
                                  type: string
                                  example: Account
                                mapToName:
                                  type: string
                                  description: An object name to map to.
                                  example: accounts
                                  x-go-type-skip-optional-pointer: true
                                mapToDisplayName:
                                  type: string
                                  description: A display name to map to.
                                  example: Accounts
                                  x-go-type-skip-optional-pointer: true
                                destination:
                                  type: string
                                  example: accountWebhook
                                schedule:
                                  type: string
                                  example: '*/10 * * * *'
                                requiredFields:
                                  type: array
                                  items:
                                    title: Hydrated Integration Field
                                    oneOf:
                                      - type: object
                                        required:
                                          - fieldName
                                          - displayName
                                        properties:
                                          fieldName:
                                            type: string
                                            example: billingcity
                                          displayName:
                                            type: string
                                            example: Billing City
                                          mapToName:
                                            type: string
                                            description: >-
                                              The field name to map to in the
                                              destination.
                                            example: billing_city
                                            x-go-type-skip-optional-pointer: true
                                          mapToDisplayName:
                                            type: string
                                            description: >-
                                              The display name to map to in the
                                              destination.
                                            example: Billing City
                                            x-go-type-skip-optional-pointer: true
                                      - title: Integration Field Mapping
                                        type: object
                                        required:
                                          - mapToName
                                        properties:
                                          mapToName:
                                            type: string
                                          mapToDisplayName:
                                            type: string
                                          default:
                                            type: string
                                          prompt:
                                            type: string
                                optionalFields:
                                  type: array
                                  items:
                                    title: Hydrated Integration Field
                                    oneOf:
                                      - type: object
                                        required:
                                          - fieldName
                                          - displayName
                                        properties:
                                          fieldName:
                                            type: string
                                            example: billingcity
                                          displayName:
                                            type: string
                                            example: Billing City
                                          mapToName:
                                            type: string
                                            description: >-
                                              The field name to map to in the
                                              destination.
                                            example: billing_city
                                            x-go-type-skip-optional-pointer: true
                                          mapToDisplayName:
                                            type: string
                                            description: >-
                                              The display name to map to in the
                                              destination.
                                            example: Billing City
                                            x-go-type-skip-optional-pointer: true
                                      - title: Integration Field Mapping
                                        type: object
                                        required:
                                          - mapToName
                                        properties:
                                          mapToName:
                                            type: string
                                          mapToDisplayName:
                                            type: string
                                          default:
                                            type: string
                                          prompt:
                                            type: string
                                optionalFieldsAuto:
                                  title: Optional Fields Auto Option
                                  type: string
                                  enum:
                                    - all
                                allFieldsMetadata:
                                  description: >-
                                    This is a map of all fields on the object
                                    including their metadata (such as display
                                    name and type), the keys of the map are the
                                    field names.
                                  type: object
                                  additionalProperties:
                                    title: Field Metadata
                                    type: object
                                    description: >-
                                      Metadata about a field. Please note that
                                      different providers have different levels
                                      of support for field metadata. Please
                                      reach out to support@withampersand.com if
                                      need expanded support for a particular
                                      provider.
                                    required:
                                      - fieldName
                                      - displayName
                                    properties:
                                      fieldName:
                                        type: string
                                        description: >-
                                          The name of the field from the provider
                                          API.
                                        example: accountid
                                      displayName:
                                        type: string
                                        description: >-
                                          The display name of the field from the
                                          provider API.
                                        example: Account ID
                                      valueType:
                                        type: string
                                        description: A normalized field type
                                        enum:
                                          - string
                                          - boolean
                                          - singleSelect
                                          - multiSelect
                                          - date
                                          - datetime
                                          - int
                                          - float
                                          - reference
                                          - other
                                        x-go-type-skip-optional-pointer: true
                                      providerType:
                                        type: string
                                        description: Raw field type from the provider API.
                                        example: timestamp
                                        x-go-type-skip-optional-pointer: true
                                      readOnly:
                                        type: boolean
                                        description: Whether the field is read-only.
                                        example: false
                                      isCustom:
                                        type: boolean
                                        description: Whether the field is custom field.
                                        example: false
                                      isRequired:
                                        type: boolean
                                        description: >-
                                          Whether the field is required when
                                          creating a new record.
                                        example: false
                                      referenceTo:
                                        type: array
                                        description: >-
                                          The list of object types this field
                                          references. Only applicable if the
                                          providerType is a lookup/reference
                                          field.
                                        x-go-type-skip-optional-pointer: true
                                        items:
                                          type: string
                                      values:
                                        type: array
                                        description: >-
                                          If the valueType is singleSelect or
                                          multiSelect, this is a list of possible
                                          values
                                        x-go-type-skip-optional-pointer: true
                                        items:
                                          title: Field Value
                                          type: object
                                          required:
                                            - value
                                            - displayValue
                                          description: Represents a field value
                                          properties:
                                            value:
                                              type: string
                                              description: The internal value used by the system
                                              example: outbound
                                            displayValue:
                                              type: string
                                              description: The human-readable display value
                                              example: Outbound Campaign
                                  example:
                                    name:
                                      fieldName: name
                                      displayName: Account Name
                                      valueType: string
                                      providerType: string
                                      readOnly: false
                                      isCustom: false
                                      isRequired: true
                                    type:
                                      fieldName: type
                                      displayName: Account Type
                                      valueType: singleSelect
                                      providerType: picklist
                                      readOnly: false
                                      isCustom: false
                                      isRequired: false
                                      values:
                                        - value: prospect
                                          displayValue: Prospect
                                        - value: customer
                                          displayValue: Customer - Direct
                                allFields:
                                  description: >-
                                    This is a list of all fields on the object
                                    for a particular SaaS instance, including
                                    their display names. Prefer using
                                    allFieldsMetadata instead.
                                  type: array
                                  deprecated: true
                                  items:
                                    title: Hydrated Integration Field
                                    oneOf:
                                      - type: object
                                        required:
                                          - fieldName
                                          - displayName
                                        properties:
                                          fieldName:
                                            type: string
                                            example: billingcity
                                          displayName:
                                            type: string
                                            example: Billing City
                                          mapToName:
                                            type: string
                                            description: >-
                                              The field name to map to in the
                                              destination.
                                            example: billing_city
                                            x-go-type-skip-optional-pointer: true
                                          mapToDisplayName:
                                            type: string
                                            description: >-
                                              The display name to map to in the
                                              destination.
                                            example: Billing City
                                            x-go-type-skip-optional-pointer: true
                                      - title: Integration Field Mapping
                                        type: object
                                        required:
                                          - mapToName
                                        properties:
                                          mapToName:
                                            type: string
                                          mapToDisplayName:
                                            type: string
                                          default:
                                            type: string
                                          prompt:
                                            type: string
                                backfill:
                                  title: Backfill
                                  type: object
                                  required:
                                    - defaultPeriod
                                  properties:
                                    defaultPeriod:
                                      title: Default Period
                                      type: object
                                      properties:
                                        days:
                                          type: integer
                                          description: >-
                                            Number of days in past to backfill from.
                                            0 is no backfill. e.g) if 10, then
                                            backfill last 10 days of data. Required
                                            if fullHistory is not set.
                                          minimum: 0
                                          example: 30
                                          x-oapi-codegen-extra-tags:
                                            validate: >-
                                              required_without=FullHistory,omitempty,min=0
                                        fullHistory:
                                          type: boolean
                                          description: >-
                                            If true, backfill all history. Required
                                            if days is not set.
                                          example: false
                                          x-oapi-codegen-extra-tags:
                                            validate: required_without=Days
                      write:
                        type: object
                        properties:
                          objects:
                            type: array
                            items:
                              type: object
                              required:
                                - objectName
                                - displayName
                              properties:
                                objectName:
                                  type: string
                                  example: account
                                displayName:
                                  type: string
                                  example: Account
                                valueDefaults:
                                  title: Value Defaults
                                  type: object
                                  description: >-
                                    Configuration to set default write values
                                    for object fields.
                                  properties:
                                    allowAnyFields:
                                      type: boolean
                                      description: >-
                                        If true, users can set default values
                                        for any field.
                                      example: true
                      proxy:
                        title: Hydrated Proxy Integration
                        type: object
                        properties:
                          enabled:
                            type: boolean
                          useModule:
                            type: boolean
                            description: >-
                              Default is false. If this is set to true, the base
                              URL for the proxy action will be the module's base
                              URL. Otherwise, it is assumed that the base URL is
                              the provider's root base URL.
        default:
          description: 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
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: X-Api-Key
      in: header
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````