cURL
curl --request POST \
--url https://api.smartbills.io/api/workflow-executions \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "<string>",
"entityData": {},
"triggeredBy": "<string>",
"correlationId": "<string>"
}
'import requests
url = "https://api.smartbills.io/api/workflow-executions"
payload = {
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "<string>",
"entityData": {},
"triggeredBy": "<string>",
"correlationId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
workflowId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
entityId: '<string>',
entityData: {},
triggeredBy: '<string>',
correlationId: '<string>'
})
};
fetch('https://api.smartbills.io/api/workflow-executions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartbills.io/api/workflow-executions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'entityId' => '<string>',
'entityData' => [
],
'triggeredBy' => '<string>',
'correlationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smartbills.io/api/workflow-executions"
payload := strings.NewReader("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"entityId\": \"<string>\",\n \"entityData\": {},\n \"triggeredBy\": \"<string>\",\n \"correlationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.smartbills.io/api/workflow-executions")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"entityId\": \"<string>\",\n \"entityData\": {},\n \"triggeredBy\": \"<string>\",\n \"correlationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/api/workflow-executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"entityId\": \"<string>\",\n \"entityData\": {},\n \"triggeredBy\": \"<string>\",\n \"correlationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowName": "<string>",
"entityId": "<string>",
"entityType": "<string>",
"businessId": 123,
"userId": 123,
"status": "<string>",
"currentStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currentStepName": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"lastActivityAt": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stepName": "<string>",
"stepType": "<string>",
"order": 123,
"status": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"input": "<string>",
"output": "<string>",
"errorMessage": "<string>",
"executionTimeMs": 123,
"retryCount": 123,
"metadata": {},
"conditionResults": [
{
"conditionType": "<string>",
"isMet": true,
"details": "<string>",
"evaluatedAt": "2023-11-07T05:31:56Z"
}
],
"actionResults": [
{
"actionType": "<string>",
"isSuccessful": true,
"result": "<string>",
"errorMessage": "<string>",
"executedAt": "2023-11-07T05:31:56Z",
"executionTimeMs": 123
}
],
"eventResults": [
{
"eventType": "<string>",
"isReceived": true,
"eventPayload": "<string>",
"receivedAt": "2023-11-07T05:31:56Z",
"timeoutAt": "2023-11-07T05:31:56Z"
}
],
"isActive": true,
"description": "<string>"
}
],
"errorMessage": "<string>",
"totalExecutionTimeMs": 123,
"context": {},
"triggeredBy": "<string>",
"correlationId": "<string>",
"retryCount": 123,
"totalSteps": 123,
"completedSteps": 123,
"failedSteps": 123,
"progressPercentage": 123,
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventType": "<string>",
"eventData": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"source": "<string>",
"isProcessed": true
}
]
}WorkflowExecution
Post apiworkflow executions
POST
/
api
/
workflow-executions
cURL
curl --request POST \
--url https://api.smartbills.io/api/workflow-executions \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "<string>",
"entityData": {},
"triggeredBy": "<string>",
"correlationId": "<string>"
}
'import requests
url = "https://api.smartbills.io/api/workflow-executions"
payload = {
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "<string>",
"entityData": {},
"triggeredBy": "<string>",
"correlationId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
workflowId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
entityId: '<string>',
entityData: {},
triggeredBy: '<string>',
correlationId: '<string>'
})
};
fetch('https://api.smartbills.io/api/workflow-executions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartbills.io/api/workflow-executions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'entityId' => '<string>',
'entityData' => [
],
'triggeredBy' => '<string>',
'correlationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smartbills.io/api/workflow-executions"
payload := strings.NewReader("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"entityId\": \"<string>\",\n \"entityData\": {},\n \"triggeredBy\": \"<string>\",\n \"correlationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.smartbills.io/api/workflow-executions")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"entityId\": \"<string>\",\n \"entityData\": {},\n \"triggeredBy\": \"<string>\",\n \"correlationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/api/workflow-executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"entityId\": \"<string>\",\n \"entityData\": {},\n \"triggeredBy\": \"<string>\",\n \"correlationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowName": "<string>",
"entityId": "<string>",
"entityType": "<string>",
"businessId": 123,
"userId": 123,
"status": "<string>",
"currentStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currentStepName": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"lastActivityAt": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stepName": "<string>",
"stepType": "<string>",
"order": 123,
"status": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"input": "<string>",
"output": "<string>",
"errorMessage": "<string>",
"executionTimeMs": 123,
"retryCount": 123,
"metadata": {},
"conditionResults": [
{
"conditionType": "<string>",
"isMet": true,
"details": "<string>",
"evaluatedAt": "2023-11-07T05:31:56Z"
}
],
"actionResults": [
{
"actionType": "<string>",
"isSuccessful": true,
"result": "<string>",
"errorMessage": "<string>",
"executedAt": "2023-11-07T05:31:56Z",
"executionTimeMs": 123
}
],
"eventResults": [
{
"eventType": "<string>",
"isReceived": true,
"eventPayload": "<string>",
"receivedAt": "2023-11-07T05:31:56Z",
"timeoutAt": "2023-11-07T05:31:56Z"
}
],
"isActive": true,
"description": "<string>"
}
],
"errorMessage": "<string>",
"totalExecutionTimeMs": 123,
"context": {},
"triggeredBy": "<string>",
"correlationId": "<string>",
"retryCount": 123,
"totalSteps": 123,
"completedSteps": 123,
"failedSteps": 123,
"progressPercentage": 123,
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eventType": "<string>",
"eventData": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"source": "<string>",
"isProcessed": true
}
]
}Body
application/jsontext/jsonapplication/*+json
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I