Skip to main content Skip to complementary content

import_task

Import a single task's JSON definitions provided in the request body into the requested server repository on the selected server.

The ImportTask method enables importing all valid JSON definitions provided in the request body.

This includes task settings, tables/table patterns (include/exclude), table settings and global transformations.

Information about endpoints is included if it was included in the JSON file.

When you import a task, items that existed in the target server before the import and have no new JSON definition in the request body are not modified and not removed. This means that ImportTask provides no way of removing old definitions that are no longer needed.

Required User Role: See Required Enterprise Manager permissions.

Syntax

def import_task(

self,

payload,

server,

task

)

Parameters

Parameters
Parameter Type Description

payload

string

A JSON document to import.

server string The name of the server to import to.

task

string

Name of the task to import.

Return values

N/A

Errors

Error responses
Error Message Description

AEM_IMPORT_TASK_NO_PERMISSION_ON_ENDPOINT

Failed to import task {task} to replication server {server} as the logged in user does not have permission to add or modify endpoints.

The task cannot be imported because it includes endpoint definitions, and the user does not have permissions to insert endpoints.

AEM_IMPORT_TASK_CONTAIN_ALIEN_ITEMS

Failed to import task {task} to replication server {server} as the JSON file contains unsupported objects.

The task cannot be imported because the stream contains items that cannot be imported (such as remote machines).

AEM_IMPORT_TASK_NAME_DIFFER

Failed to import task {task} to replication server {server} as the JSON file contains conflicting tasks.

The task cannot be imported because the stream contains conflicting tasks.

AEM_IMPORT_TASK_CONTAINS_MULTIPLE_TASKS

Failed to import task to replication server {server} as the JSON file contains multiple tasks. To import multiple tasks, use AemImportAll instead.

The task cannot be imported since the stream contains multiple tasks, and the method can only import a single task.

AEM_TASK_NOT_IMPORTABLE

Failed to import task {task} as the task is running on server {server}. Stop the task and then try again.

Occurs when trying to import a running task.

AEM_IMPORT_TASK_CONTENT_EMPTY

Failed to import task {task} to replication server {server} as the JSON file is empty.

The task cannot be imported as the specified JSON file is empty.

AEM_IMPORT_TASK_ENDPOINT_DIFFER

Failed to import task {task} to server {server} as the endpoint names in the JSON file’s “task” and “databases” sections are not the same.

The task cannot be imported as the endpoint names in the specified JSON file's “task” and “databases” sections are different.

AEM_IMPORT_TASK_NO_ENDPOINT_IN_SERVER

Failed to import task {task} to replication server {server} as the {role} endpoint {endpoint} does not exist on the target server.

The task cannot be imported as one of the endpoints specified in the exported JSON file does not exist on the target server.

AEM_IMPORT_TASK_CANNOT_OVERRIDE_TASK

Replicate (server '{0}') import unable to delete task. Error message '{2}

The task cannot be imported because the task that it was supposed to override cannot be deleted.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!