Configuration Import

Overview

Use the Configuration Import API to create a task that imports a copy of a specific module object from the BIG-IQ’s current-config to the BIG-IQ’s working-config. You can send a POST request to the declare-mgmt-authority task collection on the BIG-IQ to import a single module. Use the Device Import API to create a super-task to import copies of multiple module objects from the BIG-IQ’s current-config to the BIG-IQ’s working-config. Use the Device RMA API to remove module objects from the working-config of the BIG-IQ. Use the Configuration Snapshot API to create a snapshot of the working configuration maintained and edited on the BIG-IQ. A snapshot can record the state of the working-config objects for a specified module even when those objects are subsequently modified or deleted. Use the Configuration Restore API to restore the working-config on the BIG-IQ to a previous snapshot state. Use the Device Discovery API to create a super-task to determine what module objects exist on a specific BIG-IP and then create corresponding copies of these module objects in the BIG-IQ’s current-config. Use the Configuration Deployment API to create a deployment task which can update the configuration of a module on multiple BIG-IPs to match the working-config of the BIG-IQ.

REST Endpoint: mgmt/cm/<module>/tasks/declare-mgmt-authority

Requests

To create a task which can import a single module object from the BIG-IQ’s current-config to the BIG-IQ’s working-config, send a POST request to the declare-mgmt-authority endpoint. The placeholder text <module> represents the module being imported. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe.

POST mgmt/cm/<module>/tasks/declare-mgmt-authority

Request Parameters

The JSON in the body of the POST request can include the following parameters.

Name Type Required Description
clusterName string False Cluster name if device belongs to a cluster.
description string False Optional description for task
deviceGroups object False List of device-groups to populate with device reference. Caller provides groupReference for existing group, groupName and displayName for new group. Missing fields filled in on task completion.
     deviceReference object True Device reference to device in device-group.
          link string True The URL of the device.
     displayName string False User-friendly group name.
     groupName string False Full group name.
     groupReference object False Reference to device-group
          link string False The URL of the device-group.
     properties object False Module-specific properties to store with device-group.
deviceReference object True Device reference for device having configuration imported.
     link string True The URL of the device.
failOnConflict boolean False If object conflicts exist, fail task rather than resolving conflicts.
globalConflictResolutionType boolean False Automatic resolution of conflicts in shared objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
globalDeviceConflictResolutionType boolean False Automatic resolution of conflicts in device-specific objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
globalVersionedConflictResolutionType boolean False Automatic resolution of conflicts in versioned objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
name string False Name for the task
properties object False Module-specific properties to store with device.
skipClusterSync boolean False Skip cluster synchronization.
snapshotWorkingConfig boolean False Indicates whether a snapshot should be created before import.
validationBypassMode string False Skip configuration validation. Possible values: “BYPASS_NONE”, “BYPASS_FINAL”, or “BYPASS_ALL”.

Query Parameters

None

Response

The JSON in the body of the response to the POST request represents the initial state of the import task and includes a selfLink and id for the task. The task’s status in the initial response to the POST request can be “STARTED”. To poll for an updated status of the task you can send GET requests to the task’s selfLink.

HTTP/1.1 200 OK

Name Type Description
childTaskStates object For tasks that import child modules, this holds the state of the child import task.
clusterName string Cluster name if device belongs to a cluster.
clusterSyncTaskReference object Reference to the cluster-sync task created by this task.
     link string The URL of the cluster-sync task.
conflicts object List of object conflicts needing resolution. This is output from initial task execution, input when restarted by PATCH.
     acceptKeepVersion boolean True if object can be versioned (client permitted to use KEEP_VERSION).
     fromReference object Reference to object in working-config.
          link string The URL of the fromReference.
     hasDevice boolean True if object in conflict is device-specific or an LSO device instance.
     resolution object Desired conflict resolution; must be set by client prior to task restart. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, and “KEEP_VERSION”.
     toReference object Reference to object in current-config.
          link string The URL of the toReference.
copyTaskReference object Reference to the config-copy task created by this task.
     link string The URL of the config-copy task.
currentStep string Current execution step, updated during execution of the task. Possible values: “CHECK_RUNNING_TASKS”, “PRE_DEVICE_RESOLUTION”, “DEVICE_RESOLVER”, “QUERY_CLUSTER_NAME”, “QUERY_USE_BIGIQ_SYNC”, “CHECK_DEPLOYMENT_TRACKER”, “START_DEPLOYMENT_TRACKER”, “POST_DEVICE_RESOLUTION”, “CREATE_SNAPSHOT”, “START_CHILD_DMA”, “PENDING_CHILD_DMA”, “PENDING_CHILD_CONFLICTS”, “APPLY_CHILD_CONFLICT_RESOLUTION”, “GET_DEVICE_CHILD”, “PRE_CREATE_DIFFERENCE”, “CREATE_DIFFERENCE”, “FIND_CONFLICTS”, “PENDING_CONFLICTS”, “APPLY_CONFLICT_RESOLUTION”, “GET_DEVICE”, “PAIR_CLUSTER”, “DOWNLOAD_FILES”, “UPDATE_IN_PROCESS_STATE”, “SETUP_COORDINATOR”, “COPY_CONFIG”, “SETUP_LSO”, “PRE_COMMIT”, “COMMIT”, “POST_COMMIT”, “CLUSTER_SYNC_TARGET”, “START_STATS”, “UPDATE_IMPORTED_STATE”, or “DONE”.
deployWhenDscChangesPending boolean Flag, copied from cluster object.
description string Optional description for task
deviceIp string Network address of the BIG-IP.
deviceGroups object List of device-groups to populate with device reference. Caller provides groupReference for existing group, groupName and displayName for new group. Missing fields filled in on task completion.
     deviceReference object Device reference to device in device-group.
          link string The URL of the device.
     displayName string User-friendly group name.
     groupName string Full group name.
     groupReference object Reference to device-group
          link string The URL of the device-group.
     properties object Module-specific properties to store with device-group.
deviceReference object Device reference for device having configuration imported.
     link string The URL of the device.
differenceReference object Reference to the result of import differencing.
     link string The URL of the result.
differencerTaskReference object Reference to the differencer task created by this task.
     link string The URL of the differencer task
endDateTime string The time the task ended.
errorMessage string An error encountered while the task was running. There may be errors even when the task is not FAILED.
failOnConflict boolean If object conflicts exist, fail task rather than resolving conflicts.
globalConflictResolutionType boolean Automatic resolution of conflicts in shared objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
globalDeviceConflictResolutionType boolean Automatic resolution of conflicts in device-specific objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
globalVersionedConflictResolutionType boolean Automatic resolution of conflicts in versioned objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
id string The id for the item in the collection, used when accessing it directly.
identityReferences object A list of user identities that initiated the task.
     link string The URL of the user.
name string Name for the task
ownerMachineId string In a high-availability environment, the machineId of the host running the task
preCommitTaskReference object Reference to the pre-commit task used by some modules.
     link string The URL of the pre-commit task.
parentTaskReference object The task API that initiated the task.
     link string The URL of the task API.
properties object Module-specific properties to store with device.
reimport boolean Set to true if this is a re-import of an existing configuration.
selfLink string The URL to access this item directly.
skipClusterSync boolean Skip cluster synchronization.
snapshotTaskReference object Reference to the snapshot task created by this task.
     link string The URL of the snapshot task.
snapshotWorkingConfig boolean Indicates whether a snapshot should be created before import.
startDateTime string The time the task was started.
status string Standard task status, updated during task execution. Possible values: “CREATED”, “STARTED”, “CANCEL_REQUESTED”, “CANCELED”, “FAILED”, or “FINISHED”.
taskWorkerGeneration number The highest generation number that task collection has received from task worker
useBigiqSync boolean Flag, copied from cluster object.
username string The user that initiated the task.
userReference object The user that initiated the task.
     link string The URL of the user.
validationBypassMode string Skip configuration validation. Possible values: “BYPASS_NONE”, “BYPASS_FINAL”, or “BYPASS_ALL”.

Permissions

Role Allow
admin Yes
<module>_Common_Viewer Yes
<module>_Deploy Yes
<module>_Manager Yes

GET mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

To check the status of a task you can send a GET request to the <module>/tasks/declare-mgmt-authority/<id> endpoint and specify the task’s id. In the following, <module> is a placeholder representing the module being imported. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe. The task’s id and selfLink can be obtained from the response to a previous GET request or from the response to the original POST used to create the task.

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
childTaskStates object For tasks that import child modules, this holds the state of the child import task.
clusterName string Cluster name if device belongs to a cluster.
clusterSyncTaskReference object Reference to the cluster-sync task created by this task.
     link string The URL of the cluster-sync task.
conflicts object List of object conflicts needing resolution. This is output from initial task execution, input when restarted by PATCH.
     acceptKeepVersion boolean True if object can be versioned (client permitted to use KEEP_VERSION).
     fromReference object Reference to object in working-config.
          link string The URL of the fromReference.
     hasDevice boolean True if object in conflict is device-specific or an LSO device instance.
     resolution object Desired conflict resolution; must be set by client prior to task restart. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, and “KEEP_VERSION”.
     toReference object Reference to object in current-config.
          link string The URL of the toReference.
copyTaskReference object Reference to the config-copy task created by this task.
     link string The URL of the config-copy task.
currentStep string Current execution step, updated during execution of the task. Possible values: “CHECK_RUNNING_TASKS”, “PRE_DEVICE_RESOLUTION”, “DEVICE_RESOLVER”, “QUERY_CLUSTER_NAME”, “QUERY_USE_BIGIQ_SYNC”, “CHECK_DEPLOYMENT_TRACKER”, “START_DEPLOYMENT_TRACKER”, “POST_DEVICE_RESOLUTION”, “CREATE_SNAPSHOT”, “START_CHILD_DMA”, “PENDING_CHILD_DMA”, “PENDING_CHILD_CONFLICTS”, “APPLY_CHILD_CONFLICT_RESOLUTION”, “GET_DEVICE_CHILD”, “PRE_CREATE_DIFFERENCE”, “CREATE_DIFFERENCE”, “FIND_CONFLICTS”, “PENDING_CONFLICTS”, “APPLY_CONFLICT_RESOLUTION”, “GET_DEVICE”, “PAIR_CLUSTER”, “DOWNLOAD_FILES”, “UPDATE_IN_PROCESS_STATE”, “SETUP_COORDINATOR”, “COPY_CONFIG”, “SETUP_LSO”, “PRE_COMMIT”, “COMMIT”, “POST_COMMIT”, “CLUSTER_SYNC_TARGET”, “START_STATS”, “UPDATE_IMPORTED_STATE”, or “DONE”.
deployWhenDscChangesPending boolean Flag, copied from cluster object.
description string Optional description for task
deviceIp string Network address of the BIG-IP.
deviceGroups object List of device-groups to populate with device reference. Caller provides groupReference for existing group, groupName and displayName for new group. Missing fields filled in on task completion.
     deviceReference object Device reference to device in device-group.
          link string The URL of the device.
     displayName string User-friendly group name.
     groupName string Full group name.
     groupReference object Reference to device-group
          link string The URL of the device-group.
     properties object Module-specific properties to store with device-group.
deviceReference object Device reference for device having configuration imported.
     link string The URL of the device.
differenceReference object Reference to the result of import differencing.
     link string The URL of the result.
differencerTaskReference object Reference to the differencer task created by this task.
     link string The URL of the differencer task
endDateTime string The time the task ended.
errorMessage string An error encountered while the task was running. There may be errors even when the task is not FAILED.
failOnConflict boolean If object conflicts exist, fail task rather than resolving conflicts.
globalConflictResolutionType boolean Automatic resolution of conflicts in shared objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
globalDeviceConflictResolutionType boolean Automatic resolution of conflicts in device-specific objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
globalVersionedConflictResolutionType boolean Automatic resolution of conflicts in versioned objects; if NONE, task suspends for client to resolve. Possible values: “NONE”, “USE_BIGIP”, “USE_BIGIQ”, or “KEEP_VERSION”.
id string The id for the item in the collection, used when accessing it directly.
identityReferences object A list of user identities that initiated the task.
     link string The URL of the user.
name string Name for the task
ownerMachineId string In a high-availability environment, the machineId of the host running the task
preCommitTaskReference object Reference to the pre-commit task used by some modules.
     link string The URL of the pre-commit task.
parentTaskReference object The task API that initiated the task.
     link string The URL of the task API.
properties object Module-specific properties to store with device.
reimport boolean Set to true if this is a re-import of an existing configuration.
selfLink string The URL to access this item directly.
skipClusterSync boolean Skip cluster synchronization.
snapshotTaskReference object Reference to the snapshot task created by this task.
     link string The URL of the snapshot task.
snapshotWorkingConfig boolean Indicates whether a snapshot should be created before import.
startDateTime string The time the task was started.
status string Standard task status, updated during task execution. Possible values: “CREATED”, “STARTED”, “CANCEL_REQUESTED”, “CANCELED”, “FAILED”, or “FINISHED”.
taskWorkerGeneration number The highest generation number that task collection has received from task worker
useBigiqSync boolean Flag, copied from cluster object.
username string The user that initiated the task.
userReference object The user that initiated the task.
     link string The URL of the user.
validationBypassMode string Skip configuration validation. Possible values: “BYPASS_NONE”, “BYPASS_FINAL”, or “BYPASS_ALL”.

Permissions

Role Allow
admin Yes
<module>_Common_Viewer Yes
<module>_Deploy Yes
<module>_Manager Yes

PATCH mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

To cancel a running import task, you can send a PATCH request to the <module>/tasks/declare-mgmt-authority endpoint and specify the task’s id. To cancel a running task, send a PATCH request to change the value of status to “CANCEL_REQUESTED”. Then send a GET request to poll the task until the value of status updates to “CANCELLED”, “FINISHED”, or “FAILED”. The values “FINISHED” or “FAILED” indicate the request was sent too late to cancel the task.

To resume an import task having a status of “FINISHED” and a currentStep of “PENDING_CONFIRMATION”, PATCH the status to “STARTED”.

Request Parameters

The request parameters in the PATCH request can include the following parameters.

Name Type Required Description
status string True To cancel a running task, send a PATCH request to change the value of status to “CANCEL_REQUESTED”. To restart a task change the status from “FINISHED” to “STARTED”.

Response

HTTP/1.1 200 OK

The JSON in the response to a PATCH request can be the same as a GET to retrieve the task’s state.

Permissions

Role Allow
admin Yes
<module>_Common_Viewer Yes
<module>_Deploy Yes
<module>_Manager Yes

DELETE mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

To delete a task you can send a DELETE request to the <module>/tasks/declare-mgmt-authority endpoint and specify the task’s id. The task’s id and selfLink can be obtained from the response to a previous GET request or from the response to the original POST used to create the task.

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

The JSON in the response to a DELETE request will be the same as a GET to retrieve the task’s state.

Permissions

Role Allow
admin Yes
<module>_Common_Viewer Yes
<module>_Deploy Yes
<module>_Manager Yes

Examples

POST to import

The <module> is a placeholder representing the module object being imported. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe.

POST https://<BIG-IQ>/mgmt/cm/<module>/tasks/declare-mgmt-authority

The following example creates a task to import a single module object on BIG-IQ. Import copies the specified module object from the BIG-IQ’s current-config to the BIG-IQ’s working-config. The JSON in the body of the POST can be similar to the following.

{
    "name": "import-firewall_10.255.85.115",
    "description": null,
    "deviceReference": {
            "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-firewall-allFirewallDevices/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
    },
    "clusterName": "billerica-hub",
    "deviceGroups": [{
            "displayName": "access-billerica",
            "groupName": "access-billerica",
            "groupReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica"
            },
            "deviceReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
            },
            "properties": {}
    }],
    "properties": {},
    "snapshotWorkingConfig": true,
    "validationBypassMode": "BYPASS_NONE",
    "skipClusterSync": false,
    "failOnConflict": false,
    "globalConflictResolutionType": "NONE",
    "globalDeviceConflictResolutionType": "NONE",
    "globalVersionedConflictResolutionType": "NONE"
}

Response

The JSON in the response to the POST can look similar to the following. The value of selfLink is the URL for the task. The value of status can be “STARTED” initially, which means the task has been started. To poll for the updated status, you can send repeated GET requests to the task’s selfLink.

{
    "name": "import-firewall_10.255.85.115",
    "description": null,
    "deviceReference": {
            "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-firewall-allFirewallDevices/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
    },
    "clusterName": "billerica-hub",
    "deviceGroups": [{
            "displayName": "access-billerica",
            "groupName": "access-billerica",
            "groupReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica"
            },
            "deviceReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
            },
            "properties": {}
    }],
    "properties": {},
    "snapshotWorkingConfig": true,
    "validationBypassMode": "BYPASS_NONE",
    "skipClusterSync": false,
    "failOnConflict": false,
    "globalConflictResolutionType": "NONE",
    "globalDeviceConflictResolutionType": "NONE",
    "globalVersionedConflictResolutionType": "NONE",
    "conflicts": [{
            "fromReference": {
                    "link": "https://localhost/mgmt/cm/security-shared/working-config/bot-defense-anomalies/ab3af446-a2e0-388a-a15f-8c86f511b8e9"
            },
            "toReference": {
                    "link": "https://localhost/mgmt/cm/security-shared/current-config/bot-defense-anomalies/bec0102a-f629-333f-9316-9dbcf19d899d"
            },
            "resolution": "NONE",
            "hasDevice": false,
            "acceptKeepVersion": false
    }],
    "deviceIp": "10.255.85.115",
    "reimport": true,
    "useBigiqSync": true,
    "deployWhenDscChangesPending": true,
    "childTaskStates": [{}],
    "snapshotTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/working-config/snapsots/419a68f2-55ae-237a-7317-82572471ab8a"
    },
    "copyTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/config-copy/cc8a8af0-58cf-404b-9caa-5a524f2e2a1a"
    },
    "preCommitTaskReference": {
            "link": "https://localhost/mgmt/cm/access/tasks/dma-pre-commit/81258be1-5560-9141-ce1a-44091f1e206b"
    },
    "clusterSyncTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/cluster-sync/c23355c3-90bf-4727-ac6c-7aed51d4fe37"
    },
    "differencerTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/difference-config/82608b3b-9cee-4d30-a4ce-fd21b11b8bef"
    },
    "differenceReference": {
            "link": "https://localhost/mgmt/cm/firewall/reports/config-differences/9c3c88a9-1d6f-479f-92ee-836acd77d17b"
    },
    "currentStep": "CHECK_RUNNING_TASKS",
    "generation": 3,
    "lastUpdateMicros": 1565962144967009,
    "kind": "cm:<module>:tasks:declare-mgmt-authority:dmataskitemstate",
    "selfLink": "https://localhost/mgmt/cm/<module>/tasks/declare-mgmt-authority/7e0752f6-6eed-482f-ba29-a9f8b799446c",
    "id": "7e0752f6-6eed-482f-ba29-a9f8b799446c",
    "status": "STARTED",
    "startDateTime": "2019-08-14T12:36:49.546-0400",
    "endDateTime": "2019-08-14T12:37:16.495-0400",
    "errorMessage": "Failed to set 'pending conflicts' property to 'true'",
    "userReference": {
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    },
    "identityReferences": [{
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    }],
    "ownerMachineId": "d26f3d5f-5190-4ad0-8697-a15b1588653f",
    "taskWorkerGeneration": 42,
    "username": "admin",
    "parentTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/declare-mgmt-authority/e2634b89-642b-4708-8f69-d76daf0cad11"
    }
}

GET to check the updated status

The following example gets the updated status for the task identified by id and selfLink. You can send repeated GET requests to check the status of the task, which can eventually update to “DONE” and “FINISHED”. The <module> is a placeholder representing the module. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe.

GET https://<BIG-IQ>/mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

Response

The JSON in the response to the GET when the task is done can look similar to the following.

{
    "name": "import-firewall_10.255.85.115",
    "description": null,
    "deviceReference": {
            "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-firewall-allFirewallDevices/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
    },
    "clusterName": "billerica-hub",
    "deviceGroups": [{
            "displayName": "access-billerica",
            "groupName": "access-billerica",
            "groupReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica"
            },
            "deviceReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
            },
            "properties": {}
    }],
    "properties": {},
    "snapshotWorkingConfig": true,
    "validationBypassMode": "BYPASS_NONE",
    "skipClusterSync": false,
    "failOnConflict": false,
    "globalConflictResolutionType": "NONE",
    "globalDeviceConflictResolutionType": "NONE",
    "globalVersionedConflictResolutionType": "NONE",
    "conflicts": [{
            "fromReference": {
                    "link": "https://localhost/mgmt/cm/security-shared/working-config/bot-defense-anomalies/ab3af446-a2e0-388a-a15f-8c86f511b8e9"
            },
            "toReference": {
                    "link": "https://localhost/mgmt/cm/security-shared/current-config/bot-defense-anomalies/bec0102a-f629-333f-9316-9dbcf19d899d"
            },
            "resolution": "NONE",
            "hasDevice": false,
            "acceptKeepVersion": false
    }],
    "deviceIp": "10.255.85.115",
    "reimport": true,
    "useBigiqSync": true,
    "deployWhenDscChangesPending": true,
    "childTaskStates": [{}],
    "snapshotTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/working-config/snapsots/419a68f2-55ae-237a-7317-82572471ab8a"
    },
    "copyTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/config-copy/cc8a8af0-58cf-404b-9caa-5a524f2e2a1a"
    },
    "preCommitTaskReference": {
            "link": "https://localhost/mgmt/cm/access/tasks/dma-pre-commit/81258be1-5560-9141-ce1a-44091f1e206b"
    },
    "clusterSyncTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/cluster-sync/c23355c3-90bf-4727-ac6c-7aed51d4fe37"
    },
    "differencerTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/difference-config/82608b3b-9cee-4d30-a4ce-fd21b11b8bef"
    },
    "differenceReference": {
            "link": "https://localhost/mgmt/cm/firewall/reports/config-differences/9c3c88a9-1d6f-479f-92ee-836acd77d17b"
    },
    "currentStep": "CHECK_RUNNING_TASKS",
    "generation": 3,
    "lastUpdateMicros": 1565962144967009,
    "kind": "cm:<module>:tasks:declare-mgmt-authority:dmataskitemstate",
    "selfLink": "https://localhost/mgmt/cm/<module>/tasks/declare-mgmt-authority/7e0752f6-6eed-482f-ba29-a9f8b799446c",
    "id": "7e0752f6-6eed-482f-ba29-a9f8b799446c",
    "status": "STARTED",
    "startDateTime": "2019-08-14T12:36:49.546-0400",
    "endDateTime": "2019-08-14T12:37:16.495-0400",
    "errorMessage": "Failed to set 'pending conflicts' property to 'true'",
    "userReference": {
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    },
    "identityReferences": [{
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    }],
    "ownerMachineId": "d26f3d5f-5190-4ad0-8697-a15b1588653f",
    "taskWorkerGeneration": 42,
    "username": "admin",
    "parentTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/declare-mgmt-authority/e2634b89-642b-4708-8f69-d76daf0cad11"
    }
}

PATCH to cancel a running task

You can send a PATCH request to cancel a running task specified by the task’s id. The <module> is a placeholder representing the module being imported. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe.

PATCH https://<BIG-IQ>/mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

In the body of the PATCH request specify the value of status as “CANCEL_REQUESTED”.

{
    "status": "CANCEL_REQUESTED"
}

Response

Send repeated GET requests to poll the task until the value of status updates to “CANCELLED”, “FINISHED”, or “FAILED”. The values “FINISHED” or “FAILED” indicate the request was sent too late to cancel the task.

PATCH to restart task

You can send a PATCH request to restart a task that has been evaluated without restoring. Specify the task to restart by the task’s id. The <module> is a placeholder representing the module being imported. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe.

PATCH https://<BIG-IQ>/mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

In the body of the PATCH request specify the value of status as “STARTED” and the value of “skipDistribution” to false.

{
    "status": "STARTED"
}

Response

Send repeated GET requests to poll the task until the value of status updates to “FINISHED” or “FAILED”.

PATCH to modify a task

You can send a PATCH request to modify a task. Specify the task to restart by the task’s id. The <module> is a placeholder representing the module being imported. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe.

PATCH https://<BIG-IQ>/mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

In the body of the PATCH request specify the new values of the changed parameters.

{
    "name": "import-firewall_10.255.85.115",
    "description": null,
    "deviceReference": {
            "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-firewall-allFirewallDevices/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
    },
    "clusterName": "billerica-hub",
    "deviceGroups": [{
            "displayName": "access-billerica",
            "groupName": "access-billerica",
            "groupReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica"
            },
            "deviceReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
            },
            "properties": {}
    }],
    "properties": {},
    "snapshotWorkingConfig": true,
    "validationBypassMode": "BYPASS_NONE",
    "skipClusterSync": false,
    "failOnConflict": false,
    "globalConflictResolutionType": "NONE",
    "globalDeviceConflictResolutionType": "NONE",
    "globalVersionedConflictResolutionType": "NONE"
}

Response

The JSON in the body of the response to the PATCH can be similar to the following.

{
    "name": "import-firewall_10.255.85.115",
    "description": null,
    "deviceReference": {
            "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-firewall-allFirewallDevices/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
    },
    "clusterName": "billerica-hub",
    "deviceGroups": [{
            "displayName": "access-billerica",
            "groupName": "access-billerica",
            "groupReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica"
            },
            "deviceReference": {
                    "link": "https://localhost/mgmt/shared/resolver/device-groups/access-billerica/devices/eb0a70b9-ebb8-4cec-a04b-7196bfcbbc7d"
            },
            "properties": {}
    }],
    "properties": {},
    "snapshotWorkingConfig": true,
    "validationBypassMode": "BYPASS_NONE",
    "skipClusterSync": false,
    "failOnConflict": false,
    "globalConflictResolutionType": "NONE",
    "globalDeviceConflictResolutionType": "NONE",
    "globalVersionedConflictResolutionType": "NONE",
    "conflicts": [{
            "fromReference": {
                    "link": "https://localhost/mgmt/cm/security-shared/working-config/bot-defense-anomalies/ab3af446-a2e0-388a-a15f-8c86f511b8e9"
            },
            "toReference": {
                    "link": "https://localhost/mgmt/cm/security-shared/current-config/bot-defense-anomalies/bec0102a-f629-333f-9316-9dbcf19d899d"
            },
            "resolution": "NONE",
            "hasDevice": false,
            "acceptKeepVersion": false
    }],
    "deviceIp": "10.255.85.115",
    "reimport": true,
    "useBigiqSync": true,
    "deployWhenDscChangesPending": true,
    "childTaskStates": [{}],
    "snapshotTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/working-config/snapsots/419a68f2-55ae-237a-7317-82572471ab8a"
    },
    "copyTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/config-copy/cc8a8af0-58cf-404b-9caa-5a524f2e2a1a"
    },
    "preCommitTaskReference": {
            "link": "https://localhost/mgmt/cm/access/tasks/dma-pre-commit/81258be1-5560-9141-ce1a-44091f1e206b"
    },
    "clusterSyncTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/cluster-sync/c23355c3-90bf-4727-ac6c-7aed51d4fe37"
    },
    "differencerTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/difference-config/82608b3b-9cee-4d30-a4ce-fd21b11b8bef"
    },
    "differenceReference": {
            "link": "https://localhost/mgmt/cm/firewall/reports/config-differences/9c3c88a9-1d6f-479f-92ee-836acd77d17b"
    },
    "currentStep": "CHECK_RUNNING_TASKS",
    "generation": 3,
    "lastUpdateMicros": 1565962144967009,
    "kind": "cm:<module>:tasks:declare-mgmt-authority:dmataskitemstate",
    "selfLink": "https://localhost/mgmt/cm/<module>/tasks/declare-mgmt-authority/7e0752f6-6eed-482f-ba29-a9f8b799446c",
    "id": "7e0752f6-6eed-482f-ba29-a9f8b799446c",
    "status": "STARTED",
    "startDateTime": "2019-08-14T12:36:49.546-0400",
    "endDateTime": "2019-08-14T12:37:16.495-0400",
    "errorMessage": "Failed to set 'pending conflicts' property to 'true'",
    "userReference": {
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    },
    "identityReferences": [{
            "link": "https://localhost/mgmt/shared/authz/users/admin"
    }],
    "ownerMachineId": "d26f3d5f-5190-4ad0-8697-a15b1588653f",
    "taskWorkerGeneration": 42,
    "username": "admin",
    "parentTaskReference": {
            "link": "https://localhost/mgmt/cm/firewall/tasks/declare-mgmt-authority/e2634b89-642b-4708-8f69-d76daf0cad11"
    }
}

You can then send repeated GET requests to poll the task until the value of status updates to “FINISHED” or “FAILED”.

DELETE to delete a discovery task

The following example deletes the task identified by id. The <module> is a placeholder representing the module being imported. The possible values of <module> are access, adc-core, asm, dns, firewall, security-shared or websafe.

DELETE https://<BIG-IQ>/mgmt/cm/<module>/tasks/declare-mgmt-authority/<id>

Response

The JSON in the response from a DELETE request is similar to the response from a GET request.