Skip to main content
post/knowledge-fs/spaces/{knowledge_base_id}/sources/{source_id}/test
Request example
Response
post/knowledge-fs/spaces/{knowledge_base_id}/sources/{source_id}/test

Authorization

Authorizationstringheaderrequired#

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path parameters

knowledge_base_idstringrequired#
Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.
source_idstringrequired#
Source ID. From List Sources.

Responses

application/json
Test result. Rejected credentials are a 200 with valid: false and error details.
codestring#
failure.code when valid is false. Otherwise null. SOURCE_CREDENTIAL_TEST_FAILED here means the provider rejected the credentials.
errorstring#
failure.message when valid is false, and null otherwise. The text is fixed for the failure's category or code, never the provider's own reason.
failureobject#
Error details when valid is false, or null when the provider gave no reason. null when valid is true. stage is credential-test.
validboolean#
true when the provider accepted the credentials.