---
title: "List source swap policies"
method: GET
path: "/v2/sourceSwapPolicies"
tags: ["Source swap policies"]
---

# List source swap policies

`GET /v2/sourceSwapPolicies`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/sourceSwapPolicies`
- Auth: HTTP bearer

Get a list of source swap policies.

  **Beta**: Getting a list of **Connection** source swap policies is in private beta and must be enabled for your organization. This documentation is subject to the [Beta features](/docs/sigma-product-releases#beta-features) disclaimer.

## Query parameters

- `page` string
- `limit` number, double

## Response `200`

The response body.

- SourceSwapPoliciesListSourceSwapPoliciesResponse200
  - `entries` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItems[], required
    - union: Get source swap policy response
      - V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItems0
        - `type` 'connection', required
        - `name` string, required: Name of the source swap policy.
        - `fromConnectionId` string, required: ID of the connection to swap.
        - `swaps` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf0Swaps, required
          - `connectionSwaps` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf0SwapsConnectionSwapsItems[], required: Swap paths to a different location in the same connection.
            - `to` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf0SwapsConnectionSwapsItemsTo, required: Specify how to swap each segment of a path to a table in your database, catalog, or project. `path0` is equivalent to a database, catalog, or project. `path` is equivalent to a schema or dataset, and `path2` is equivalent to a table or view.
              - …
        - `policyId` string, required
      - V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItems1
        - `type` 'deployment', required
        - `name` string, required: Name of the source swap policy.
        - `fromConnectionId` string, required: ID of the connection to swap.
        - `swaps` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf1Swaps, required
          - `toConnection` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf1SwapsToConnection, required
            - `swapType` 'attribute', required: Specify a user attribute to use the value of the user attribute as the value to swap.
            - `userAttributeId` string, required
          - `deploymentSwaps` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf1SwapsDeploymentSwapsItems[], required
            - `from` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf1SwapsDeploymentSwapsItemsFrom, required
              - …
            - `to` V2SourceSwapPoliciesGetResponsesContentApplicationJsonSchemaEntriesItemsOneOf1SwapsDeploymentSwapsItemsTo, required
              - …
        - `policyId` string, required
  - `nextPage` string, nullable, required
  - `total` number, double

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
