API reference
Read a website again
POST /v1/knowledge-bases/{knowledge_base_id}/crawls/{crawl_id}/refresh
Read the website again now, as Refresh does in the console. Pages that have not changed are skipped, so it costs only what changed. Needs knowledge:write and a live key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
knowledge_base_id |
path | string (uuid) | Yes | |
crawl_id |
path | string (uuid) | Yes |
Answer
202 with KnowledgeCrawl.
Errors
Every error is a problem document with a stable code.
| Status | When |
|---|---|
401 |
The key is missing, mistyped, unknown, revoked or expired. |
403 |
A test key, or a key limited to some agents. |
404 |
This key reaches no such website. |
409 |
It is being read right now, or the project is frozen. |
422 |
Validation Error |
429 |
Too many knowledge requests just now. Wait for Retry-After. |
500 |
Something went wrong on our side. Quote the request_id to support. |
Examples
#!/bin/sh
# Read a website again. Pages that have not changed are skipped.
curl -sS --fail-with-body -X POST "https://api.aigently.ai/v1/knowledge-bases/6e8a0c2d-4f6b-4d8e-a0c2-4e6a8c0e2a4c/crawls/8a0c2e4f-6b8d-4f0a-c2e4-6a8c0e2a4c6e/refresh" \
-H "Authorization: Bearer $AIGENTLY_API_KEY"
Try it
Sends this request to the API from your browser, with a test key. Nothing it does rings a phone.