# Get external data source configuration information

Batch query Feishu personnel background: Settings - > Salary data settings - > External data source settings, the list of data source settings in

**Notice**：Deactivated data sources and fields cannot save data

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/payroll/v1/datasources
HTTP Method | GET
Rate Limit | [10 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Payroll外部数据源设置读权限(payroll:external_datasource_configuration:read)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>or<br>`user_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
page_size | int | Yes | **Example value**: 10<br>**Data validation rules**:<br>- Value range: `1` ～ `100`
page_token | string | No | Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups<br>**Example value**: eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0=

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
page_token | string | Page identifier, when has_more is true, a new page_token will also be returned. Otherwise, page_token will not be returned
has_more | boolean | Whether the response body has more parameters
datasources | datasource\[\] | list of data sources
code | string | Data source encoding
i18n_names | i18n_content\[\] | data source name
locale | string | language
value | string | Language-specific values
id | string | Entity ID corresponding to the name
active_status | int | start-stop state<br>**Optional values are**:<br>- 1：Enabled<br>- 2：Deactivated
fields | datasource_field\[\] | List of data source fields
code | string | Data source field encoding
i18n_names | i18n_content\[\] | Data source field name
locale | string | language
value | string | Language-specific values
id | string | Entity ID corresponding to the name
field_type | int | field type<br>**Optional values are**:<br>- 1：amount<br>- 2：numerical value<br>- 3：Text<br>- 4：date<br>- 5：percentage
active_status | int | Field start and stop status<br>**Optional values are**:<br>- 1：Enabled<br>- 2：Deactivated
i18n_description | i18n_content\[\] | Data source field description
locale | string | language
value | string | Language-specific values
id | string | Entity ID corresponding to the name
decimal_places | int | Reserved decimal places. Currently only the number and money type fields need to set reserved decimal places.
i18n_description | i18n_content\[\] | Data source description
locale | string | language
value | string | Language-specific values
id | string | Entity ID corresponding to the name
data_period_type | int | Data period type (data write dimension)<br>**Optional values are**:<br>- 1：Payroll period (months)<br>- 2：Date of data occurrence. In the function grey release, if you need to create a data source configuration for this dimension, please apply for grey release.<br>- 3：Customize the data cycle. In the function grey release, if you need to create a data source configuration for this dimension, please apply for grey release.

### Response body example
```json
{
    "code": 0,
    "msg": "Success",
    "data": {
        "page_token": "eVQrYzJBNDNONlk4VFZBZVlSdzlKdFJ4bVVHVExENDNKVHoxaVdiVnViQT0=",
        "has_more": true,
        "datasources": [
            {
                "code": "test_datasource__c",
                "i18n_names": [
                    {
                        "locale": "zh_cn",
                        "value": "name",
                        "id": "723123123123123213"
                    }
                ],
                "active_status": 1,
                "fields": [
                    {
                        "code": "test__c",
                        "i18n_names": [
                            {
                                "locale": "zh_cn",
                                "value": "name",
                                "id": "723123123123123213"
                            }
                        ],
                        "field_type": 1,
                        "active_status": 1,
                        "i18n_description": [
                            {
                                "locale": "zh_cn",
                                "value": "name",
                                "id": "723123123123123213"
                            }
                        ],
                        "decimal_places": 1
                    }
                ],
                "i18n_description": [
                    {
                        "locale": "zh_cn",
                        "value": "name",
                        "id": "723123123123123213"
                    }
                ],
                "data_period_type": 1
            }
        ]
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
500 | 2500001 | unknown error | Unknown error, contact [technical support](https://applink.feishu.cn/TLJpeNdW)
400 | 2500002 | param invalid | Parameter exception, check imported parameters

