Action execution status

URI - GET

To use this endpoint, send a GET request to get the state of action in the queue. /task/{taskId}

Request

The request includes HTTP headers (obtained in the authentication/authorization process and used to sign the request) with request string parameters.

Request Headers

Header

Type

Required

Format

Description/Sample

x-av-req-id

String

Yes

UUID – Generated and supplied on the request.

d290f1ee-6c54-4b01-90e6-d701748f085 1

x-av-token

String

Yes

Token

Token obtained in the authentication sequence.

tkn8546ffffggd9d8934593

x-av-app-id

String

Yes

Avanan Application ID

US:myapp29

x-av-date

String

Yes

Date-time in GMT

'2021-04-10T00:00:00.000Z'

x-av-sig

String

Yes

Calculated signature

tkn8jmveolrrtertr9d8934593

For more details, see Action execution status.

Request String Parameters

Header

Type

Required

Format

Description/Sample

taskId

String

Yes

 

Avanan Task ID, such as: “4b8312c5b04d4a6d884662237fa2e25d”

Query String

Query

Type

Required

Format

Description/Sample

scope

String

No

 

Single scope string

Request Body

Not applicable for GET method.

Request sample (CURL) format

This request sample shows URI base in USA region. For URI base in other regions, see URLs and URL Base.

Copy
curl -X GET -H "Accept: application/json" \
    -H "x-av-req-id: d290f1ee-6c54-4b01-90e6-d701748f0851" \
    -H "x-av-token: tkn8546ffffggd9d8934593" \
    -H "x-av-app-id: myapp29" \
    -H "x-av-date: 2016-08-29T09:12:33.001Z" \
    -H "x-av-sig: tkn8jmveolrrtertr9d8934593" \
    https://smart-api-production-1-us.avanan.net/v1.0/task/4b8312c5b04d4a6d884662237fa2e25d

Response

The response obtained from the service includes an HTTP response code and JSON formatted structure.

Response Structure

A valid response obtained from the service (JSON format):

Copy
{
    "actions"
    [
        {
            "action_created": "string",
            "action_id": "string"
            "action_name": "string"
            "action_status": "string"
            "action_type": "string"
            "action_updated": "string"
            "hash_key": "string"
        }
    ],
    "created": "string",
    "customer": "string"
    "id": "numeric",
    "name": "string",
    "owner": "string"
    "progress": "numeric"
    "sequential": "boolean",
    "status": "string",
    "total": "numeric",
    "type": "string",
    "updated": "string"
}

Response Parameters

The response parameters:

Parameter

Type

Description

responseEnvelope

Object

A container of metadata properties

 

requestId

String

Request ID (from the request header x-av-req-id value)

 

responseCode

Integer

0 = Success

Other values = Failure

 

responseTest

String

The text value of the response

 

additionalText

String

Additional information

 

recordsNumber

Integer

Number of records in the response

 

totalRecordsNumber

Integer

Total number of records

 

scrollId

String

Unique ID used for scrolling

responseData

Object

Array of event entities

 

actions

Array of Object

Array of action data

 

created

String

Date when the task was created

 

customer

String

Customer name

 

id

String

Unique ID of the task

 

name

String

Name of the task

 

owner

String

Owner’s email

 

progress

Integer

Progress indicator

 

sequential

Boolean

Sequential flag

 

status

String

init, inprogress, completed, failed, stopped, paused

 

total

Integer

Total number

 

type

String

Action type

 

updated

String

Date when action was updated

Response Sample

A valid response from the service:

Copy
{
    "responseEnvelope"
    {
        "requestId": "d290f1ee-6c54-4b01-90e6-d701748f3351",
        "responseCode": 0,
        "responseText": "success",
        "additionalText": ""
        "recordsNumber": 1,
        "scrollId": "9898989898"
    },
    "responseData"
        {
            "actions"
                [
                    {
                        "action_created": "2021-08-04 11:45:38.823008",
                        "action_id": "1628077538822988",
                        "action_name": "Quarantine 14cc6d3aec558cca4de1363166fa42f9",
                        "action_status": "init",
                        "action_type": "Quarantine_14cc6d3aec558cca4de1363166fa42f9"
                        "action_updated": "2021-08-04 11:45:38.823015",
                        "hash_key": "us##customername##1628077538799978"
                    }
                ],
            "created": "2021-08-04 11:45:38.799984",
            "customer": "customername"
            "id": 1628077538799978,
            "name": "Office365 Emails Manual Action"
            "owner": "service@avanan.com"
            "progress": 0,
            "sequential": true,
            "status": "inprogress"
            "total": 1,
            "type": "office365_emails_manual_action",
            "updated": "2021-08-04 11:45:38.800076"
        }
}