Query Authorized Data Sources
Use this API to page through data sources available to the current OpenAPI credential. Filter by data source ID, type, name, or keyword, and use the page number and page size to control the returned records.
Before calling this API, configure the authentication headers described in the OpenAPI documentation.
Request URL: /openapi/v1/datasource/listAuthorized
Request Method: GET
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| datasourceId | String | No | Data source ID. | <datasourceId> |
| datasourceType | String | No | Data source type. Use a type currently enabled in the target environment. | <datasourceType> |
| name | String | No | Data source name. | <datasourceName> |
| keyword | String | No | Search keyword. You can use a data source name as the keyword. | <keyword> |
| current | Integer | No | Current page, starting from 1. The default is 1. | 1 |
| pageSize | Integer | No | Number of records per page. The default is 10. | 10 |
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Bool | Whether the API call succeeded. | true |
| requestId | String | Request ID. | <requestId> |
| data | Array | Data source records available to the current credential that match the filters. | [{"datasourceId":"<datasourceId>"}] |
| current | Integer | Current page number. | 1 |
| pageSize | Integer | Number of records per page. | 1 |
| total | Integer | Total data sources matching the current access scope and filters. | 1 |
The data array may include connection details such as an address and account name. Handle the response according to your organization's data-handling requirements. For data source response field descriptions, see Retrieve Data Source List.
Successful Invocation Example
{
"success": true,
"requestId": "<requestId>",
"data": [
{
"datasourceId": "<datasourceId>",
"name": "<datasourceName>",
"datasourceType": "<datasourceType>"
}
],
"current": 1,
"pageSize": 1,
"total": 1
}