Skip to main content
POST
/
api
/
datastores
/
{datastoreId}
/
sync-by-status
curl -X POST https://app.horneross.com/api/datastores/ds_abc123/sync-by-status \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "error"
  }'
{
  "message": "Se programaron 5 datasources para sincronización",
  "count": 5,
  "datasources": [
    {
      "id": "datasource_1",
      "name": "Documento A",
      "type": "file"
    },
    {
      "id": "datasource_2",
      "name": "Página web",
      "type": "web_page"
    }
  ]
}

Endpoint

POST /api/datastores/{datastoreId}/sync-by-status

Path Parameters

datastoreId
string
required
ID del datastore

Headers

Authorization
string
required
Bearer token con tu API key. Formato: Bearer sk_live_xxx
Content-Type
string
required
Siempre application/json

Request Body

status
string
required
Estado de los datasources a sincronizar. Valores: pending, running, synced, error, usage_limit_reached
groupId
string
Opcional. Filtrar por grupo de datasources.
curl -X POST https://app.horneross.com/api/datastores/ds_abc123/sync-by-status \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "error"
  }'

Response

message
string
Mensaje de confirmación
count
number
Cantidad de datasources programados para sincronización
datasources
array
Lista de datasources afectados
{
  "message": "Se programaron 5 datasources para sincronización",
  "count": 5,
  "datasources": [
    {
      "id": "datasource_1",
      "name": "Documento A",
      "type": "file"
    },
    {
      "id": "datasource_2",
      "name": "Página web",
      "type": "web_page"
    }
  ]
}