> 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 (basic auth, required) — This is the Polytomic deployment key (on-premises only) - `Authorization` header (bearer token, required) — This is the Polytomic 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` (V3BulkSyncSource, optional) ## Errors ### 400 Bad Request Error Bad Request - `key` (string, optional) - `message` (string, optional) - `metadata` (map from string to any, optional) - `status` (integer, optional) ### 401 Unauthorized Error Unauthorized - `code` (integer, optional) — Application-specific error code. - `context` (map from string to any, optional) — Application context. - `error` (string, optional) — Error message. - `status` (string, optional) — Status text. ### 404 Not Found Error Not Found - `key` (string, optional) - `message` (string, optional) - `metadata` (map from string to any, optional) - `status` (integer, optional) ### 500 Internal Server Error Internal Server Error - `key` (string, optional) - `message` (string, optional) - `metadata` (map from string to any, optional) - `status` (integer, optional) ## Types ### V3BulkSyncSource - `capabilities` (V3BulkSyncSourceCapabilities, optional) - `configuration` (any, optional) - `schemas` (list of V3Schema, optional, nullable) ### V3BulkSyncSourceCapabilities - `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) ### V3Schema - `fields` (list of SchemaField, optional) - `id` (string, optional) - `name` (string, optional) ### SchemaField - `association` (SchemaAssociation, optional) - `id` (string, optional) - `is_primary_key` (boolean, optional) — Whether this field is part of the schema's primary key, including any user override. - `name` (string, optional) - `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) - Allowed values: `unknown`, `string`, `number`, `boolean`, `datetime`, `array`, `object`, `binary` - `type_spec` (any, optional) - `user_managed` (boolean, optional) — True when the field's effective definition came from a user override. - `values` (list of PickValue, optional) ### SchemaAssociation - `id` (string, optional) - `name` (string, optional) - `reference_to` (list of string, optional) - `referenced_field` (string, optional) ### PickValue - `label` (string, optional) - `value` (string, optional) ## Examples **Response** ```json { "data": { "capabilities": { "supports_namespaces": true, "supports_tracking_fields": true }, "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", "user_managed": true, "values": [ { "label": "string", "value": "string" } ] } ], "id": "contact", "name": "Contact" } ] } } ``` **SDK Code** ```typescript import { PolytomicClient } from "polytomic"; async function main() { const client = new PolytomicClient({ token: "YOUR_TOKEN_HERE", version: "X-Polytomic-Version", }); await client.bulkSync.getSource("248df4b7-aa70-47b8-a036-33ac447e668d", {}); } main(); ``` ```python from polytomic import Polytomic client = Polytomic( token="YOUR_TOKEN_HERE", version="X-Polytomic-Version", ) client.bulk_sync.get_source( id="248df4b7-aa70-47b8-a036-33ac447e668d", ) ``` ```go package example import ( context "context" polytomic "github.com/polytomic/polytomic-go/v24" client "github.com/polytomic/polytomic-go/v24/client" option "github.com/polytomic/polytomic-go/v24/option" ) func do() { client := client.NewClient( option.WithToken( "YOUR_TOKEN_HERE", ), option.WithVersion( "X-Polytomic-Version", ), ) request := &polytomic.BulkSyncGetSourceRequest{} client.BulkSync.GetSource( context.TODO(), "248df4b7-aa70-47b8-a036-33ac447e668d", request, ) } ``` ```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["X-Polytomic-Version"] = 'X-Polytomic-Version' request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source") .header("X-Polytomic-Version", "X-Polytomic-Version") .basicAuth("", "") .asString(); ``` ```php request('GET', 'https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source', [ 'headers' => [ 'X-Polytomic-Version' => 'X-Polytomic-Version', ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); request.AddHeader("X-Polytomic-Version", "X-Polytomic-Version"); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = [ "X-Polytomic-Version": "X-Polytomic-Version", "Authorization": "Basic \(credentials)" ] 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() ```