Skip to main content

getTaskStatus

This method retrieves information about the status of a given task identified using its ID.

Important

This method has been updated to version 1.1. For information applicable to version 1.0, refer to this section.

Parameters

Parameter

Type

Optional

Description

taskId

String

No

The ID of the task you want to retrieve the status of.

Return value

This method returns an Object containing information about the tasks. The returned object contains:

  • name, the name of the task.

  • startDate, the start date of the task.

  • status, the status of the task. Possible values:

    • 1 - Pending

    • 2 - In progress

    • 3 - Finished

  • type, the type of the task. Possible values:

    • 1 - Scan task.

    • 7 - Reconfigure task

    • 16 - Isolate task

    • 17 - Restore from isolation task

    • 9 - Remove quarantine task

    • 18 - Remove quarantine exchange task

    • 14 - Remove all quarantine task

    • 15 - Remove all quarantine exchange task

    • 10 - Restore quarantine task

    • 19 - Restore quarantine exchange task

    • 20 - Add quarantine task

  • owner, an Object containing the following information about the owner of the task:

    • id, the id of the account that created the task.

    • userName, the name assigned to the account that created the task.

  • company, the company where the task was performed. The object has the following fields:

    • id, the ID of the company.

    • name, the company name.

Example

Request:

{        
    "params": {
        "taskId": "21a295eeb1a43d8b497b23b7"
    },
    "jsonrpc": "2.0",
    "method": "getTaskStatus",
    "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f"
}

Response:

 {
    "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
    "jsonrpc": "2.0",
    "result": {
        "name": "task",
        "startDate": "2023-10-27T12:08:42",
        "status": 1,
        "type": 1,
        "owner": {
            "id": "21a295eeb1a43d8b497b23ba",
            "userName": "[email protected]"
        },
        "company": {
            "id": "21a295eeb1a43d8b497b23bb",
            "name": "Example"
        }
    }
}  

Version 1.0

Parameters

Parameter

Type

Optional

Description

taskId

String

No

The ID of the task you want to retrieve the status of.

Return value

This method returns an Object containing information about the tasks. The returned object contains:

  • name, the name of the task.

  • startDate, the start date of the task.

  • status, the status of the task. Possible values:

    • 1 - Pending

    • 2 - In progress

    • 3 - Finished

  • type, the type of the task. Possible values: 1 - Scan task.

  • owner, an Object containing the following information about the owner of the task:

    • id, the id of the account that created the task.

    • userName, the name assigned to the account that created the task.

  • company, the company where the task was performed. The object has the following fields:

    • id, the ID of the company.

    • name, the company name.

Example

Request:

{        
    "params": {
        "taskId": "21a295eeb1a43d8b497b23b7"
    },
    "jsonrpc": "2.0",
    "method": "getTaskStatus",
    "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f"
}

Response:

 {
    "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
    "jsonrpc": "2.0",
    "result": {
        "name": "task",
        "startDate": "2023-10-27T12:08:42",
        "status": 1,
        "type": 1,
        "owner": {
            "id": "21a295eeb1a43d8b497b23ba",
            "userName": "[email protected]"
        },
        "company": {
            "id": "21a295eeb1a43d8b497b23bb",
            "name": "Example"
        }
    }
}