Test Connectivity

Test Connectivity
Test if the system is able to use the given configuration for a data source.

This endpoint allows you to test if a given configuration can be used for a data source.

More specifically, the API will attempt to connect to a data source using the provided configuration, as it would during an indexing. This allows you to verify whether the stored settings and credentials are correct and the PAIS system can connect to the data source APIs, even before creating the data source.

To test the configuration of an existing data source, you can instead use the /test-connection/<data-source> endpoint.

Request
URI
POST
https://{api_host}/api/v1/control/data-sources/test-connection
COPY
Request Body
{
    "origin_url": "string",
    "type": "string",
    "credentials": {
        "credentials_type": "string",
        "username": "string",
        "password": "string"
    }
}
Authentication
This operation uses the following authentication methods.
Responses
200

Outcome of validating the connectivity.

Returns DataSourceTestConnectionResponse of type(s) application/json
{
    "status": "string",
    "detail": "string"
}
string
status
Required

Data source connectivity result.

Possible values are : CONNECTIVITY_RESULT_SUCCESS, CONNECTIVITY_RESULT_CONNECTION_FAILED,
string
detail
Optional

Details about the connectivity result, if any.


422

Validation Error

Returns HTTPValidationError of type(s) application/json
{
    "detail": [
        {
            "loc": [
                {}
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
array of object
detail
Optional

detail


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/api/v1/control/data-sources/test-connection