Posted under features on September 23 , 2021 by Swanand Nirgudkar
The SheetKraft API now supports an extra async
parameter in the run activity API request payload. If this is set to true, the activity run is queued and the corresponding activity run id is returned immediately. Other rules regarding the API remain the same.
For example,
{
"async": true,
"inputs": {
"number 1": 2.5,
"number 2": 5.7
}
}
returns
123
Here, we know that the activity run has been queued with the run id 123.
Now, we can repeat the call with the id
to get the status later, on the same URL.
{
"id": 123
}
produces an output similar to
{
"id": 123,
"status": "Succeeded",
"outputs": {
"sum": {
"id": 35,
"type": "number",
"value": 8.2,
"format": null
}
},
"errors": [],
"warnings": [],
"messages": []
}
Note that when async
and id
are used within the same request and id
is not null, then id
is considered as having higher precedence over async
. That is, we will get the activity run JSON instead of the activity run ID.
TAGGED:ActivityJSONAPIHTTP request
7th floor, Unit No. 715, C Wing,
Kailas Business Park, S. Veer Savarkar Marg,
Park Site, Vikhroli (W), Mumbai-400079.