> This page is for version 2025-09-18 (default).
> For other versions, use one of these documentation indexes:
> - 2025-09-18 (default): https://apidocs.polytomic.com/2025-09-18/llms.txt
> - 2024-02-08: https://apidocs.polytomic.com/2024-02-08/llms.txt
> - 2023-04-25: https://apidocs.polytomic.com/2023-04-25/llms.txt
> - 2022-12-12: https://apidocs.polytomic.com/2022-12-12/llms.txt
> - 2021-05-23: https://apidocs.polytomic.com/2021-05-23/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Get Bulk Source

GET https://app.polytomic.com/api/connections/{id}/bulksync/source

Lists the schemas (tables or objects) available on a connection for use as a bulk sync source, optionally including per-schema field details.

The response reflects what the
connection currently has cached; if the upstream source has changed, trigger
a refresh first with
[`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh).

These are the schemas available for selection, not the schemas already
configured on any particular sync. To inspect schemas on a running sync, use
[`GET /api/bulk/syncs/{id}/schemas`](../../../../../api-reference/bulk-sync/schemas/list).

Pass `include_fields=true` to receive per-schema field details in a single call.
Omit it when you only need the schema list, as field enumeration can be slow for
large sources.

Reference: https://apidocs.polytomic.com/api-reference/bulk-sync/get-source

## Authentication

- `Authorization` header (bearer token, required) — Bearer user API key
- `Authorization` header (basic auth, required) — Basic organization-scoped API key

## Request

### Path parameters

- `id` (string, required) — Unique identifier of the connection

### Query parameters

- `include_fields` (boolean, optional, default: true) — When true, include per-schema field lists in the response. Set to false for a smaller payload when field details are not needed.

## Response

### 200

OK

- `data` (BulkSyncSource, optional) — Bulk sync source details for the connection

## Errors

### 400 Bad Request Error

Bad Request

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 404 Not Found Error

Not Found

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 500 Internal Server Error

Internal Server Error

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

## Types

### BulkSyncSource

- `capabilities` (BulkSyncSourceCapabilities, optional) — Bulk sync features the source supports
- `configuration` (any, optional) — Options accepted in a bulk sync's source_configuration, keyed by option name
- `schemas` (list of Schema, optional, nullable) — Schemas available on the connection

### BulkSyncSourceCapabilities

- `supports_namespaces` (boolean, optional) — When true, the portion of a schema ID before its last dot is that schema's namespace.
- `supports_tracking_fields` (boolean, optional) — Whether the source supports a tracking field for detecting changes between sync runs

### Schema

- `fields` (list of SchemaField, optional) — Fields in the schema
- `id` (string, optional) — Schema ID
- `name` (string, optional) — Display name of the schema

### SchemaField

- `association` (SchemaAssociation, optional) — Reference this field holds to records in other schemas
- `id` (string, optional) — Schema field ID
- `is_primary_key` (boolean, optional) — Whether this field is part of the schema's primary key, including any user override
- `name` (string, optional) — Display name of the field
- `path` (string, optional) — JSONPath used to extract the field from each source record; only meaningful for document-style backends
- `primary_key_override` (boolean, optional, nullable) — The user-set primary key status for this field, which takes precedence over source_primary_key; omitted when no override is set
- `remote_type` (string, optional) — The type of the field from the remote system
- `source_primary_key` (boolean, optional) — Whether the source system reports this field as part of the schema's primary key
- `type` (enum, optional) — The type classification for the field
  - Allowed values: `unknown`, `string`, `number`, `boolean`, `datetime`, `array`, `object`, `binary`
- `type_spec` (any, optional) — The type specification for the field
- `user_managed` (boolean, optional) — True when the field's effective definition came from a user override
- `values` (list of PickValue, optional) — Allowed values for the field

### SchemaAssociation

- `id` (string, optional) — Association ID
- `name` (string, optional) — Association name
- `reference_to` (list of string, optional) — Schema IDs the field references
- `referenced_field` (string, optional) — Field in the referenced schema that the field matches

### PickValue

- `depends_on` (map from string to string, optional) — Field IDs and internal values required for this option to apply. All entries must match. Omitted for independent options.
- `label` (string, optional) — Display label of the option
- `value` (string, optional) — Value of the option

## Examples

**Response**

```json
{
  "data": {
    "capabilities": {
      "supports_namespaces": true,
      "supports_tracking_fields": true
    },
    "configuration": null,
    "schemas": [
      {
        "fields": [
          {
            "association": {
              "id": "string",
              "name": "string",
              "reference_to": [
                "string"
              ],
              "referenced_field": "string"
            },
            "id": "email",
            "is_primary_key": true,
            "name": "Email",
            "path": "string",
            "primary_key_override": true,
            "remote_type": "varchar(255)",
            "source_primary_key": false,
            "type": "unknown",
            "type_spec": {},
            "user_managed": true,
            "values": [
              {
                "depends_on": {},
                "label": "string",
                "value": "string"
              }
            ]
          }
        ],
        "id": "contact",
        "name": "Contact"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```