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.
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.
Method Details
HTTPS Method | Entity Action | Request URI | Description |
---|---|---|---|
Read |
/scim/{tenant}/v2/Tasks |
Get all tasks |
|
Read |
/scim/{tenant}/v2/Tasks/{uid} |
Get a task |
|
Create |
/scim/{tenant}/v2/Tasks |
Create tasks |
|
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/
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>
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
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"
}
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"
}
Delete a Task
You can delete tasks with the status DONE or FAILED.