Launches Activities
This object represents an Activity occurring in a Wrkflow launch. Use it to get updates on the progress of a Launch and respond to user input requests from the Wrkflow Launch.
ENDPOINTS |
|
GET | /v1/launch/<launch_id>/get-activities |
POST | /v1/launch/<launch_id>/respond-to-question |
The Activity object
Attributes
Attributes | The Activity object |
| {
|
Retrieve Launch Activities
Retrieves the activities posted by the Launch. The activities are messages posted to the Launch Console. These are dependent on the design of the workflow or posted by the system in events such as errors or credit status.
Parameters
| GET
cURL x
Python ... |
Returns
A dictionary with property activities
containing an array of activity object. The totalCount
property will give the number of Activities returned. If there are no Activities matching the request, the resulting array will be empty
{
"totalCount": 2,
"activities": [
{
"activity_id": "322123/000000000000001",
"launch_id": 322123,
"posted_date": 1728675432,
"message": "Hello world",
"activity_type": "info",
"attachments": []
},
{
"activity_id": "322123/000000000000002",
"launch_id": 322123,
"posted_date": 1728343992,
"message": "Here are your reports",
"activity_type": "info",
"attachments": [
"https://somewhere/file.xls",
"https://somewhere/report.ppt"
]
}
]
}
Respond to (Activity) Question
An Activity of activity_type
with type question
, is a request to get user input - question. that is generated by the workflow and the workflow will expect a response back - answer, to continue its execution. Using the Respond to Question allows to send the answer back to the question.
The questions come usually have a timeout value that is set in the workflow, and the resulting action if no answer is received is also set in the workflow. The timeout value is not accessible through API.
A posted answer to a question will be passed back to the workflow, that will handle the next steps. The API does not offer insights on the flow within a Wrkflow.
The answer is always collected as a string type. Handling the content or converting to different data type is handled in the workflow. The answer can be in a form of a JSON schema where the data type can be specified if needed.
A question can only be responded to once. Any subsequent answer to the same question will be acknowledged by the API, but ignored by the workflow.
Parameters
| POST
cURL curl -P /v1/launch/<launch_id>/respond-to-question
Python ... |
Returns
If successful, a dictionary with Boolean property status
where true
denotes a successful receipt of the answer.
{ "status": true }