Skip to main content

Sources

A source describes an external data location — a web site, an S3 or GCS bucket, Google Drive, Jira, Confluence, or a managed file upload — that VectorAmp can ingest into a dataset. You register a source once, then start jobs or schedules against it. All source management endpoints live under the unprefixed /ingestion/sources namespace.

info

All source and dataset IDs are UUIDs.

Unprefixed paths

Use the unprefixed /ingestion/sources/... paths. The legacy /v1/ingestion/sources/... prefix is deprecated, and /api/v1/... is not routed (404).

End-to-end flow

  1. Register a source with POST /ingestion/sources (optionally validate the config first).
  2. Start a job with POST /ingestion/jobs, passing source_id and dataset_id.
  3. Track progress with the Jobs endpoints, or automate recurring syncs with Schedules.

For file_upload sources, use the presigned upload flow instead of pulling from an external system.

Authenticated sources

Ingesting from Google Drive, GCS, Jira, or Confluence? See Authenticating sources for the two supported ways to grant access — a fully headless service account, or a reusable, browser-granted connection.

Finished with a source, or want to find ones nothing is using? See Delete Source, List Unused Sources, and Clean Up Unused Sources.


Source Object

FieldTypeDescription
idUUIDUnique source identifier
org_idUUIDOwning organization
typestringSource type (web, s3, gcs, gdrive, jira, confluence, file_upload)
namestringHuman-readable name
descriptionstring | nullOptional description
configobjectType-specific configuration (secrets are redacted in responses)
metadataobjectArbitrary client metadata
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp
Redaction

Secret-bearing config fields (access keys, tokens, passwords, credentials) are redacted to ******** in every source response. Public source responses also omit created_by.


List Sources

GET /ingestion/sources

Returns registered sources for the authenticated organization.

Query Parameters

NameTypeRequiredDescription
limitintegerMax results to return. Defaults to 50, max 200
offsetintegerPagination offset. Defaults to 0
curl "https://api.vectoramp.com/ingestion/sources?limit=50&offset=0" \
-H "X-API-Key: vsk_<64hex>"

The response shape is { "sources": [...], "total": number, "limit": number, "offset": number }.


Get Source

GET /ingestion/sources/:sourceId

ParameterTypeInDescription
sourceIdUUIDpathSource identifier

Returns a single source object.

curl https://api.vectoramp.com/ingestion/sources/c3d4e5f6-a7b8-9012-cdef-123456789012 \
-H "X-API-Key: vsk_<64hex>"

Validate Source Config

POST /ingestion/sources/validate

Validate a source configuration without persisting it. Use this to check credentials and surface sample documents before registering a source.

Request Body

NameTypeRequiredDescription
source_typestringSource type to validate
configobjectType-specific config (see Source Types)
curl -X POST https://api.vectoramp.com/ingestion/sources/validate \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"source_type": "web",
"config": { "start_urls": ["https://docs.example.com"] }
}'

Create Source

POST /ingestion/sources

Register a new ingestion source. The config object must match the chosen source_type (see Source Types).

Request Body

NameTypeRequiredDescription
source_typestringOne of web, s3, gcs, gdrive, jira, confluence, file_upload
namestringHuman-readable source name
configobjectType-specific configuration
descriptionstringOptional description
metadataobjectArbitrary client metadata
curl -X POST https://api.vectoramp.com/ingestion/sources \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"source_type": "web",
"name": "Docs crawler",
"config": {
"start_urls": ["https://docs.example.com"],
"max_depth": 3,
"max_pages": 1000
}
}'

Authenticating sources

Connectors that read from a private system — gdrive, gcs, jira, and confluence — need credentials. VectorAmp supports two ways to supply them. Pick based on whether a human can complete a one-time browser consent.

ApproachBest forBrowser consentHow
Service accountServers, CI, fully headless automationNeverPut a service-account JSON in the source config
Connection referenceInteractive setup that is then reused (incl. by schedules)Once, up frontGrant a connection once, then reference it by connection_id

Option 1 — Service account (headless)

For gdrive and gcs, pass a Google service-account JSON directly in config.service_account_json. No browser, no consent screen — ideal for servers and CI. Share the target Drive folder or GCS bucket with the service account's email first.

curl -X POST https://api.vectoramp.com/ingestion/sources \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"source_type": "gdrive",
"name": "Drive (service account)",
"config": {
"folder_ids": ["1AbC2dEf3GhI"],
"auth_mode": "service_account",
"service_account_json": { "type": "service_account", "client_email": "ingest@my-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n…\n-----END PRIVATE KEY-----\n", "project_id": "my-project" }
}
}'
Secrets are redacted

service_account_json (and every other secret-bearing field) is redacted to ******** in all source responses. Store the original JSON in your own secret manager.

Option 2 — Connection reference (interactive once, reusable)

Create a connection once — the user grants access through the provider's OAuth consent screen — then reference that connection from any number of sources with connection_id. Works for gdrive, gcs, confluence, and jira.

# 1. Create the connection and open authorization_url in a browser (see Connections).
curl -X POST https://api.vectoramp.com/connections \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{ "provider": "google", "source_type": "gdrive" }'

# 2. After status == "connected", create the source referencing the connection.
curl -X POST https://api.vectoramp.com/ingestion/sources \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"source_type": "gdrive",
"name": "Drive (connection)",
"config": {
"folder_ids": ["1AbC2dEf3GhI"],
"connection_id": "d1e2f3a4-b5c6-7890-abcd-ef0123456789"
}
}'

Credentials are resolved and refreshed server-side at ingest time, so a source backed by a connection_id keeps working for schedules and long-running syncs without re-consent. See the full Connections reference for the grant flow, polling, and the end-to-end authenticated Google Drive walkthrough.


Delete Source

DELETE /ingestion/sources/:sourceId

Permanently deletes a source.

Query Parameters

NameTypeRequiredDescription
forcebooleanForce deletion even when the source is in use. Defaults to false

If the source is attached to an active schedule or referenced by an in-flight job, the request returns 409 Conflict unless you pass force=true. With force=true, VectorAmp also disables the source's schedules before deleting it. Returns 204 No Content on success.

# Fails with 409 if the source is attached to an active schedule or in-flight job.
curl -X DELETE https://api.vectoramp.com/ingestion/sources/c3d4e5f6-a7b8-9012-cdef-123456789012 \
-H "X-API-Key: vsk_<64hex>"

# Force: disables the source's schedules, then deletes.
curl -X DELETE "https://api.vectoramp.com/ingestion/sources/c3d4e5f6-a7b8-9012-cdef-123456789012?force=true" \
-H "X-API-Key: vsk_<64hex>"
Check before deleting

Call Get Source References first to see exactly what would block a delete, or use List Unused Sources / Clean Up Unused Sources to remove only sources nothing is using.


Get Source References

GET /ingestion/sources/:sourceId/references

Returns everything currently using a source: active schedules and in-flight jobs. Use it to decide whether a source is safe to delete.

ParameterTypeInDescription
sourceIdUUIDpathSource identifier
curl https://api.vectoramp.com/ingestion/sources/c3d4e5f6-a7b8-9012-cdef-123456789012/references \
-H "X-API-Key: vsk_<64hex>"

in_use is true when schedule_count or active_job_count is non-zero — i.e. when a plain delete would return 409.


List Unused Sources

GET /ingestion/sources/unused

Returns sources that are not attached to any active schedule and have no in-flight job — the sources that are safe to delete. The response shape matches List Sources.

curl https://api.vectoramp.com/ingestion/sources/unused \
-H "X-API-Key: vsk_<64hex>"

Clean Up Unused Sources

POST /ingestion/sources/cleanup

Deletes all unused sources (every source that List Unused Sources would return) in one call. Sources attached to an active schedule or in-flight job are left untouched.

curl -X POST https://api.vectoramp.com/ingestion/sources/cleanup \
-H "X-API-Key: vsk_<64hex>"

Source Types

Each source_type has its own config schema. The tables below list the required fields and the most common optional fields with their defaults. You can also discover the supported types and their schemas programmatically.

Discover Source Types

GET /ingestion/source-types

Lists the supported source types and their high-level capabilities. Now exposed publicly through the gateway, so SDKs and agents can stay forward-compatible as new connectors ship.

curl https://api.vectoramp.com/ingestion/source-types \
-H "X-API-Key: vsk_<64hex>"

GET /ingestion/source-types/:type

Returns the JSON config schema for a single source type, including which fields are required and which are secrets.

curl https://api.vectoramp.com/ingestion/source-types/gdrive \
-H "X-API-Key: vsk_<64hex>"

web

FieldRequiredDefaultDescription
start_urlsArray of seed URLs to crawl
max_depth3Maximum crawl depth
max_pages1000Maximum pages to fetch
allowed_domains[]Restrict crawling to these domains
include_assetstrueCrawl linked assets (PDFs, Office docs, images)
max_assets_per_page5Max assets fetched per page
selectors{ content, title, exclude } CSS selectors
headers{}Extra HTTP request headers

s3

FieldRequiredDefaultDescription
bucketS3 bucket name
access_key_idAWS access key id
secret_access_keyAWS secret access key
prefixKey prefix to scope ingestion
regionus-east-1AWS region
file_patterns["*.pdf","*.docx","*.txt","*.csv"]Glob patterns to include
max_file_size_mb100Skip files larger than this
sync_modeincrementalfull or incremental

gcs

FieldRequiredDefaultDescription
bucketGCS bucket name
prefixObject prefix to scope ingestion
project_idGCP project id
auth_modeoauthservice_account, oauth, connection, or adc
service_account_jsonService-account JSON (when service_account)
connection_idId of a reusable connection (when authenticating with a granted connection)
oauth_credentialsOAuth credentials object
file_patterns["*.pdf","*.docx","*.txt","*.csv"]Glob patterns to include
sync_modeincrementalfull or incremental

See Authenticating sources for when to use service_account_json vs connection_id.

gdrive

FieldRequiredDefaultDescription
folder_ids or file_idsFolders or files to ingest
auth_modeservice_accountservice_account, oauth, or connection
service_account_jsonService-account JSON (headless; see Authenticating sources)
connection_idId of a reusable connection (interactive grant, reused server-side)
oauth_credentialsOAuth credentials object
drive_idShared drive id
mime_typesRestrict to these MIME types
sync_modeincrementalfull or incremental

For Google Drive, supply either service_account_json (headless) or connection_id (browser-granted, reusable). See Authenticating sources.

jira

FieldRequiredDefaultDescription
cloud_idAtlassian cloud/site id
access_tokenOAuth access token
connection_idId of a reusable Atlassian connection (resolved & refreshed server-side)
project_keysRestrict to these project keys
jqlJQL filter for issues
include_commentstrueInclude issue comments
sync_modeincrementalfull or incremental

confluence

FieldRequiredDefaultDescription
cloud_id or base_urlAtlassian cloud id or base URL (e.g. https://company.atlassian.net)
auth_modebasicbasic (username + API token), oauth, or connection
usernameUsername for basic auth
api_tokenAPI token for basic auth
connection_idId of a reusable Atlassian connection (resolved & refreshed server-side)
oauth_credentialsOAuth credentials object
spaces[]Space keys (empty = all accessible)
include_attachmentsfalseIngest page attachments
sync_modeincrementalfull or incremental

file_upload

FieldRequiredDefaultDescription
storage_providers3Backing storage provider
sync_modefullSync mode

file_upload sources are normally created and driven by the presigned upload flow below.


Presigned File Upload

To ingest local files, create a file_upload source and use the presigned upload flow. The SDK ingestFiles(...) helpers hide all four steps; the raw HTTP flow is:

1. Initialize the upload

POST /ingestion/sources/:sourceId/upload/init

NameTypeRequiredDescription
filesarrayList of files to upload
files[].namestringFile name
files[].size_bytesintegerFile size in bytes
files[].content_typestringMIME type
curl -X POST https://api.vectoramp.com/ingestion/sources/c3d4e5f6-a7b8-9012-cdef-123456789012/upload/init \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"files": [
{ "name": "report.pdf", "size_bytes": 1048576, "content_type": "application/pdf" }
]
}'

2. Upload bytes

PUT each file's bytes directly to its presigned upload_url:

curl -X PUT "https://s3.amazonaws.com/...&X-Amz-Signature=..." \
--upload-file report.pdf

3. Complete the upload

POST /ingestion/sources/:sourceId/upload/complete

NameTypeRequiredDescription
job_idUUIDjob_id returned by upload/init
file_idsstring[]file_id values for the files you uploaded
curl -X POST https://api.vectoramp.com/ingestion/sources/c3d4e5f6-a7b8-9012-cdef-123456789012/upload/complete \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"file_ids": ["f1a2b3c4-d5e6-7890-abcd-ef1234567890"]
}'

Once completed, the ingestion job processes the uploaded files into the dataset. Track it with the Jobs endpoints.


Start an Ingestion Job

After registering a source, start ingestion with POST /ingestion/jobs:

curl -X POST https://api.vectoramp.com/ingestion/jobs \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"source_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"dataset_id": "550e8400-e29b-41d4-a716-446655440000"
}'

See Jobs for the full job lifecycle, retry, file audit, and statistics.


File Preview Helpers (Dashboard)

The following routes power the dashboard's source preview UI. They use SuperTokens session authentication, not API keys, and are not part of the programmatic SDK surface.

Get Source Info

GET /sources/info

Retrieve preview/download access for a single source path.

NameTypeRequiredDescription
source_pathstringSource URI (gdrive://file_id, s3://bucket/key, https://...)
curl "https://api.vectoramp.com/sources/info?source_path=gdrive://1abc2def3ghi" \
-H "Authorization: Bearer <session_token>"

Stream Google Drive File

GET /sources/stream/gdrive/:fileId

Streams the content of a Google Drive file for in-dashboard preview.

Batch Source Info

POST /sources/batch-info

Retrieve preview/download access for multiple source_paths in a single request.