Data sources

Auto-sync from any feed URL — no glue code.

A data source is a URL that Skryx fetches on a schedule (or on demand) and ingests into an index. Supports Google Merchant XML, Meta Catalog, generic JSON arrays, and CSV.

# Endpoints

Method Path
GET /v1/indexes/{name}/data-sources
POST /v1/indexes/{name}/data-sources
GET /v1/indexes/{name}/data-sources/{id}
PATCH /v1/indexes/{name}/data-sources/{id}
DELETE /v1/indexes/{name}/data-sources/{id}
POST /v1/indexes/{name}/data-sources/{id}/sync-now — trigger an immediate sync
GET /v1/indexes/{name}/data-sources/{id}/runs — list previous sync runs

# Create a data source

curl -X POST https://api.skryx.io/v1/indexes/products/data-sources \
  -H "Authorization: Bearer $SKRYX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://shop.example.ro/feed.xml",
    "format": "google_merchant",
    "schedule": "hourly",
    "sync_mode": "upsert"
  }'
Field Description
url The feed URL. HTTPS recommended.
format google_merchant, meta_catalog, json, csv.
schedule manual, hourly, daily, or a CRON expression (0 */2 * * *).
sync_mode upsert (default, additive), replace (delete docs not in the feed).
field_map Optional. Maps source fields to your schema ({ "product_name": "title" }).
basic_auth Optional { "username", "password" } if the feed is gated.

# Trigger a sync now

curl -X POST https://api.skryx.io/v1/indexes/products/data-sources/12/sync-now \
  -H "Authorization: Bearer $SKRYX_API_KEY"

Returns the queued run id. Poll /runs for status:

{
  "data": [
    {
      "id": 401,
      "status": "completed",
      "started_at": "2026-05-23T08:14:12Z",
      "finished_at": "2026-05-23T08:14:48Z",
      "documents_imported": 8432,
      "documents_failed": 0
    }
  ]
}

# Authentication failures

When the feed URL returns 401/403, the run is recorded with status auth_failed and an SK-DS-401 incident is created. We don't retry — fix the credentials, then click Sync now.

esc