datasources_list_all
php
array datasources_list_all ()Returns an array of arrays containing information about all data sources configured for the account. Each data source name is a key whose array contains the following values:
| Parameter | Type | Description |
|---|---|---|
| desc | string | Data source description set by the administrator |
| type | string | Data source type |
| key | string | Key used to update the data source |
| unique | bool | Whether records in the data source must have unique keys
|
| url | string|null | URL used to retrieve data for the source (may be empty for update types other than URL) |
| updateType | string | Data source update type (overwrite: clears the source and imports new data; update: retrieves changes and updates records; append: adds only records missing from the source) |
| downloadLimit | number|null | Number of records requested at a time by the source update mechanism (applies to URL updates and may be empty for other update types) |
| updateMethod | string | Data source update method, for example JSON |
| downloadErrorLimit | number | Percentage of errors tolerated before sending is prevented (for example, when set to 0, sending is automatically prevented if the API supplying the data source does not respond) |
| reportErrorEmail | string|null | Email addresses notified if sending fails because the API does not respond, according to the setting in ```php downloadErrorLimit ``` |
| records | number | Number of records currently used in the data source |
| create_date | timestamp | Data source creation time |
| update_date | timestamp | Time of the most recent data source update |
Example:
php
print_r(datasources_list_all());Result:
Array(
[przykladowe_zrodlo] => Array
(
[desc] => Example description
[type] => url
[key] => %dataSourcesKey%
[unique] => 1
[url] => https://sare_pl/v1/dataSourceApi
[updateType] => overwrite
[downloadLimit] => 50
[records] => 200000
[create_date] => 1570621973
[update_date] => 1582959601
[downloadErrorLimit] => 10
[reportErrorEmail] =>example@sare.pl
[updateMethod] => JSON
)
)