Tasks REST API

The Tasks endpoint allows to monitor background tasks such as deleting provisioned users and groups, user attribute encryption/decryption and key renewal.

Note: The API version supported by HID Authentication Service is 10.1.0.

To use the version-specific parameters/attributes, you must add api-version=N to the query parameter.

Previous versions of the API are also supported with the corresponding functionality. For details of the version updates, see SCIM API Revision History.

Method Details

HTTPS Method Entity Action Request URI Description

GET

Read

/scim/{tenant}/v2/Tasks

Get all tasks

GET

Read

/scim/{tenant}/v2/Tasks/{uid}

Get a task

POST

Create

/scim/{tenant}/v2/Tasks

Create tasks

DELETE

Delete

/scim/{tenant}/v2/Tasks/{uid}

Delete a task

Required Permissions

Function Required Permissions

GET

Read task

POST

Create task

DELETE

Delete task

Get All Tasks

[GET] /Tasks/

Copy

Sample Request URI

[GET] /scim/{tenant}/v2/Tasks
Copy

Sample Response

HTTP 200 OK
{
    "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
    "totalResults": 5,
    "resources": [
        {
            "schemas": ["urn:hid:scim:api:idp:2.0:Task"],
            "id": "11052",
            "meta": {
                "resourceType": "Task",
                "location": "https://[base-server-url]/{tenant}/v2/Tasks/11052",
                "version": "1"
            },
            "type": "APPROVE_NOTIFICATION",
            "payload": {
                "deviceType": "DT_TDSV4",
                "msg": "Maintenance action request from authentication service",
                "date": 1636467155625,
                "pushDeliveryGateway": "11092",
                "action": "certpins",
                "expiry": 1636558889785
            },
            "status": "DONE",
            "progression": "1",
            "creationDate": "2022-02-15T16:21:45Z",
            "lastUpdate": "2022-02-15T16:22:04Z"
        },
        .....
    ]
}

Where the possible values are:

  • status:

    • PENDING

    • INPROGRESS

    • DONE

    • FAILED

  • type (when calling GET):

    • ATTRIBUTE_ENC

    • ATTRIBUTE_DEC

    • KEYS_RENEWAL

    • APPROVE_NOTIFICATION

Get a Task

[GET] /Tasks/{id}

Where {id} is <taskid>

Copy

Sample Request URI

[GET] /scim/{tenant}/v2/Tasks/11093
Copy

Sample Response

HTTP 200 OK
{
    "schemas": ["urn:hid:scim:api:idp:2.0:Task"],
    "id": "11093",
    "meta": {
        "resourceType": "Task",
        "location": "https://[base-server-url]/{tenant}/v2/Tasks/11093",
        "version": "1"
    },
    "type": "DELETE_DS",
    "payload": {"datasourceCode": "DS_aad2"},
    "status": "DONE",
    "progression": "0",
    "creationDate": "2022-02-15T17:31:33Z",
    "lastUpdate": "2022-02-15T17:32:00Z"
}

Create a Task

Note: For POST, only the APPROVE_NOTIFICATION type is currently supported.
Copy

Sample Request URI

[POST] /scim/{tenant}/v2/Tasks
Copy

Sample Request

POST https://[base-server-url]/{tenant}/v2/Tasks
{
    "type": "APPROVE_NOTIFICATION",
    "payload": {
        "pushDeliveryGateway": "11092",
        "deviceType": "DT_TDSV4",
        "action": "certpins",
        "msg": "Maintenance action request from authentication service",
        "date": 1636467155625,
        "expiry": 1636558889785
        "ttl": 600000
    },
    "domain": "ONLINEBANK"
}
Copy

Sample Response

HTTP 201 CREATED
{
    "schemas": ["urn:hid:scim:api:idp:2.0:Task"],
    "id": "11112",
    "meta": {
        "resourceType": "Task",
        "location": "https://[base-server-url]/{tenant}/v2/Tasks/11112",
        "version": "1"
    },
    "type": "APPROVE_NOTIFICATION",
    "payload": {
        "deviceType": "DT_TDSV4",
        "msg": "Maintenance action request from authentication service",
        "date": 1636467155625,
        "pushDeliveryGateway": "11092",
        "action": "certpins",
        "expiry": 1636558889785
    },
    "status": "PENDING",
    "creationDate": "2022-02-16T10:10:03Z",
    "lastUpdate": "2022-02-16T10:10:03Z",
    "domain": "ONLINEBANK"
}
Note: In the response for APPROVE_NOTIFICATION, progression is the number of notifications that were successfully sent.

Delete a Task

You can delete tasks with the status DONE or FAILED.

Copy

Sample Request

DELETE https://[base-server-url]/{tenant}/v2/Tasks/11093
Copy

Sample Response

HTTP 204 No Content