Skip to content

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:

ParameterTypeDescription
descstringData source description set by the administrator
typestringData source type
keystringKey used to update the data source
uniqueboolWhether records in the data source must have unique keys 
      0 - duplicate keys are allowed
    1 - keys must be unique
urlstring|nullURL used to retrieve data for the source (may be empty for update types other than URL)
updateTypestringData 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)
downloadLimitnumber|nullNumber of records requested at a time by the source update mechanism (applies to URL updates and may be empty for other update types)
updateMethodstringData source update method, for example JSON
downloadErrorLimitnumberPercentage 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)
reportErrorEmailstring|nullEmail addresses notified if sending fails because the API does not respond, according to the setting in ```php downloadErrorLimit ```
recordsnumberNumber of records currently used in the data source
create_datetimestampData source creation time
update_datetimestampTime 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
        )
)