Export Accounts By Filter
MngExportAccountsByFilter¶
Description: Exports account records selected by the same filter model as GetUsersByFilter into a file stored in the server storage directory.
The method does not return account rows in JSON. Instead, it creates a file and returns only its generated name.
The export always contains the full filtered result set.
Access Control¶
🛡️ Access Level Required:
SESSION_MANAGER,SESSION_ADMIN,SESSION_DEALER
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
groupFilter |
string | Yes | Group mask used to select accounts, for example STD-* or * |
format |
string | Yes | Output format: csv or excel |
where |
array | No | Additional filter rules |
whereNot |
array | No | Negated filter rules |
orderBy |
array | No | Sort instructions |
select |
array | No | List of fields to export. If omitted or empty, all default account fields are exported |
Supported Filter Keys¶
where:[[field, operator, value], ...]whereNot:[[field, value], ...]
Supported where Operators¶
===!=><>=<=like
Supported select Fields¶
If select is passed, every item must be one of the fields below. Any unknown field causes 400 INVALID_DATA.
loginenableenable_read_onlyenable_change_passwordleveragecurrencygroupemailcountryphonecommentaddresscityzipcodenameregdateprevbalanceprevmonthbalancebalancecreditmarginmargin_freemargin_levelequityonline
Request Example¶
{
"groupFilter": "STD-*",
"format": "csv",
"select": ["login", "group", "currency", "balance", "equity", "online"],
"where": [
["enable", "=", 1]
],
"whereNot": [],
"orderBy": ["balance", "DESC"]
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
file_name |
string | Generated file name stored in storage/ |
Successful Response Example¶
{
"file_name": "550e8400-e29b-41d4-a716-446655440000.csv"
}
Notes¶
format = "csv"generates a.csvfileformat = "excel"currently generates an Excel-compatible.xlsfile- the response contains only the generated file name with extension
- the export always contains the full filtered result set
limitandoffsetare not supported by this method
Errors¶
| Code | Description |
|---|---|
| 400 | Invalid request payload or unsupported field in select |
| 500 | Export directory creation or file write failed |