export_file

To export the results of an item search to an XLSX file, use the core/export_file method.

Endpoint

Copied!
svc=core/export_file&params={
  "spec": {
    "itemsType": "<text>",
    "propName": "<text>",
    "propValueMask": "<text>",
    "sortType": "<text>"
  },
  "force": <uint>,
  "flags": <long>   /* Column flags. */
}

Parameters

The spec and force parameters are described on the core/search_items page.

The flags parameter defines which columns to include in the file. The available flags depend on the itemsType value.

For the user items type

Value Description
0x0001 Name.
0x0002 Creator.
0x0004 Account.
0x0008 Billing plan.
0x0010 Last visit.
0x0020 Email.
0x0040 Host.
0x0080 Authentication type.
0x0100 Phone number for two-factor authentication.
0x0200 Status.
0x0400 Permission to change the password.
0x0800 Permission to create items.
0x1000 Permission to change settings.
0x2000 Permission to send SMS.
0x4000 Time zone.

For the avl_unit items type

Value Description
0x0001 Name.
0x0002 Creator.
0x0004 Account.
0x0008 Device type.
0x0010 Unique ID.
0x0020 Phone.
0x0040 Last message.
0x0080 Created.
0x0100 Custom fields.
0x0200 Groups.
0x0400 Deactivation.

For the avl_unit_group items type

Value Description
0x0001 Name.
0x0002 Creator.
0x0004 Account.
0x0008 Units.

For the avl_resource items type

Value Description
0x0001 Name.
0x0002 Creator.
0x0004 Parent account.
0x0008 Billing plan.
0x0010 Dealer rights.
0x0020 Units.
0x0040 Balance.
0x0080 Days.
0x0100 Status.
0x0200 Blocked.
0x0400 Activated units.

For the avl_retranslator items type

Value Description
0x0001 Name.
0x0002 Creator.
0x0004 Account.
0x0008 Protocol.
0x0010 Server.
0x0020 State.
0x0040 Units for retranslation.
0x0080 Unit unique ID.

Response

If the request is completed successfully, an XLSX file is returned.

If the request fails, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters, failed to get the current user, or the search failed.
5 Failed to create the file.

If you find a mistake in the text, please select it and press Ctrl+Enter.