Get import status
This request is used for getting information about the status of an import.
If the import was stopped due to a large number of errors, the response might have multiple pages. To get a paginated response, use the request parameters to specify the page number and the number of mailboxes per page.
Request syntax
The request should be sent over the HTTPS protocol using the GET method.
GET /api2/admin/import/check_imports?
[page=<page number in the response>]
[on_page=<number of mailboxes per response page>]
Host: pddimp.yandex.ru
PddToken: <PDD token>
...
domain=<domain name>
Headers:
Parameters:
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
Optional | ||
page | Integer | Page number in the response. The default value is 1. This parameter may be necessary if the response has multiple pages due to a large number of errors. |
on_page | Integer | Number of mailboxes with errors on each response page. The default value is 10. This parameter may be necessary if the response has a large number of errors. |
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
Optional | ||
page | Integer | Page number in the response. The default value is 1. This parameter may be necessary if the response has multiple pages due to a large number of errors. |
on_page | Integer | Number of mailboxes with errors on each response page. The default value is 10. This parameter may be necessary if the response has a large number of errors. |
GET /api2/registrar/import/check_imports?
[page=<page number in the response>]
[on_page=<number of mailboxes per response page>]
Host: pddimp.yandex.ru
PddToken: <PDD token>
Authorization: OAuth <OAuth token>
...
domain=<domain name>
Headers:
Name | Description |
---|---|
PddToken | |
Authorization |
Name | Description |
---|---|
PddToken | |
Authorization |
Parameters:
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
Optional | ||
page | Integer | Page number in the response. The default value is 1. This parameter may be necessary if the response has multiple pages due to a large number of errors. |
on_page | Integer | Number of mailboxes with errors on each response page. The default value is 10. This parameter may be necessary if the response has a large number of errors. |
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
Optional | ||
page | Integer | Page number in the response. The default value is 1. This parameter may be necessary if the response has multiple pages due to a large number of errors. |
on_page | Integer | Number of mailboxes with errors on each response page. The default value is 10. This parameter may be necessary if the response has a large number of errors. |
Request example
GET /api2/admin/import/check_imports HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
...
domain=domain.com
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' 'https://pddimp.yandex.ru/api2/admin/import/check_imports?domain=domain.com'
GET /api2/admin/import/check_imports HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000
...
domain=domain.com
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' -H 'Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000' 'https://pddimp.yandex.ru/api2/admin/import/check_imports?domain=domain.com'
Response structure
{
"domain": "{domain name}",
"settings":
{
"method": "{server protocol}",
"server": "{server name}",
"port": "{server port}",
"ssl": "{use SSL}"
},
"import":
{
"state": "{state of import}",
"total_box_count": "{number of mailboxes sent for import}",
"done_box_count": "{number of successfully imported mailboxes}",
"complete_box_count": "{number of mailboxes that were imported successfully and with errors}",
"failed_boxes_count": "{number of mailboxes that did not finish importing due to errors}",
"failed_boxes_pages": "{number of response pages with information about mailboxes that failed import due to errors}",
"failed_boxes_current_page": "{page number in the response}",
"imported_message_count": "{number of messages imported for all mailboxes}",
"total_message_count": "{total number of messages sent for import}",
"progress_percent": "{percent of import completed}",
"failed_boxes":
[
{
"external_login": "{username on the server source}",
"external_password": "{password on the server source}",
"internal_login": "{username on Yandex.Mail for Domain}",
"internal_password": "{password on Yandex.Mail for Domain}",
"imported_mail": "{number of messages imported}",
"last_error": "{code of the last error}",
"last_error_count": "{number of errors}",
},
...
]
},
"success": "{status of request execution}"
}
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
settings | Object | Server source settings. |
import | Object | Information about the import. |
success | String | Status of request execution. Possible values:
|
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|
Keys for the settings object | ||
method | String | Server protocol. Possible values:
|
server | String | Server's domain name or IP address. |
port | Integer | Server port. |
ssl | String | Use of SSL. Possible values:
|
Keys for the import object | ||
state | String | State of the import. Possible values:
|
done_box_count | Integer | The number of mailboxes that were imported successfully. |
total_box_count | Integer | The number of mailboxes that were sent for import. |
complete_box_count | Integer | The number of mailboxes that finished importing (either successfully, or with errors). |
failed_boxes_count | Integer | The number of mailboxes that were not imported due to errors. |
failed_boxes_pages | Integer | The number of response pages with information about mailboxes that were not imported due to errors (the |
failed_boxes_current_page | Integer | Page number in the response. |
imported_message_count | Integer | The number of messages imported for all the domain's mailboxes (in the current session). |
total_message_count | Integer | The total number of messages for mailboxes that were sent for import. |
progress_percent | Integer | The import progress, as a percent. |
failed_boxes | Array | Data about mailboxes that were not imported, and their errors (the |
Keys for objects in the failed_boxes array | ||
external_login | String | Username on the server source. |
external_password | String | Password on the server source. |
internal_login | String | Username for authenticating on Yandex.Mail for Domain. |
internal_password | String | Password for authenticating on Yandex.Mail for Domain. |
imported_mail | Integer | The number of messages in a mailbox that were able to be imported. |
last_error | String | The error code that the last import attempt finished with. |
last_error_count | Integer | The number of errors that caused the import to fail. |
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
settings | Object | Server source settings. |
import | Object | Information about the import. |
success | String | Status of request execution. Possible values:
|
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|
Keys for the settings object | ||
method | String | Server protocol. Possible values:
|
server | String | Server's domain name or IP address. |
port | Integer | Server port. |
ssl | String | Use of SSL. Possible values:
|
Keys for the import object | ||
state | String | State of the import. Possible values:
|
done_box_count | Integer | The number of mailboxes that were imported successfully. |
total_box_count | Integer | The number of mailboxes that were sent for import. |
complete_box_count | Integer | The number of mailboxes that finished importing (either successfully, or with errors). |
failed_boxes_count | Integer | The number of mailboxes that were not imported due to errors. |
failed_boxes_pages | Integer | The number of response pages with information about mailboxes that were not imported due to errors (the |
failed_boxes_current_page | Integer | Page number in the response. |
imported_message_count | Integer | The number of messages imported for all the domain's mailboxes (in the current session). |
total_message_count | Integer | The total number of messages for mailboxes that were sent for import. |
progress_percent | Integer | The import progress, as a percent. |
failed_boxes | Array | Data about mailboxes that were not imported, and their errors (the |
Keys for objects in the failed_boxes array | ||
external_login | String | Username on the server source. |
external_password | String | Password on the server source. |
internal_login | String | Username for authenticating on Yandex.Mail for Domain. |
internal_password | String | Password for authenticating on Yandex.Mail for Domain. |
imported_mail | Integer | The number of messages in a mailbox that were able to be imported. |
last_error | String | The error code that the last import attempt finished with. |
last_error_count | Integer | The number of errors that caused the import to fail. |