Skip to main content
GET
/
api
/
v1
/
training
/
queue
List sources due to be crawled
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('{protocol}://{host}/api/v1/training/queue', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "sources": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "<string>",
      "url": "<string>",
      "host": "<string>",
      "schedule": "<string>",
      "crawl_depth": 123,
      "include_patterns": [
        "<string>"
      ],
      "exclude_patterns": [
        "<string>"
      ],
      "pages_indexed": 123,
      "pages_total": 123,
      "last_crawl_at": "2023-11-07T05:31:56Z",
      "next_crawl_at": "2023-11-07T05:31:56Z",
      "last_error": "<string>"
    }
  ],
  "count": 123
}

Authorizations

Authorization
string
header
required

Deploy-wide server-to-server bearer token (ENGINE_API_TOKEN), validated by the engine_api firewall. Authenticates the Engine API, Knowledge base, and Conversions surfaces. The tenant_id rides in the request body and is trusted in V1 — keep this token strictly server-side.

Query Parameters

limit
integer
default:50
Required range: x >= 1

Response

200 - application/json

Due-source queue

sources
object[]
required
count
integer
required

Number of sources returned.