Reports
Get automations report
Lists automation runs in progress.
GET
/
reports
/
automations
Get automations report
curl --request GET \
--url https://api.connectadesk.com/api/v1/reports/automations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.connectadesk.com/api/v1/reports/automations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.connectadesk.com/api/v1/reports/automations', 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.connectadesk.com/api/v1/reports/automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.connectadesk.com/api/v1/reports/automations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.connectadesk.com/api/v1/reports/automations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/reports/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"sessionId": "9f2c1a70-31bd-4a4e-b0f2-17c6d3a91b55",
"automationId": "<string>",
"publicAutomationId": "aut_7d21c9",
"automationName": "Boas-vindas do site",
"triggerType": "message_received",
"triggerLabel": "Mensagem recebida",
"startedAt": "2023-11-07T05:31:56Z",
"durationLabel": "2 h 14 min",
"executionStatus": "running",
"contactId": "842",
"contactName": "Maria Silva",
"contactNumber": "5511987654321",
"ticketId": "<string>",
"protocolId": "<string>",
"conversationStatus": "<string>",
"blockId": "<string>",
"blockLabel": "Aguarda resposta",
"situation": "Aguardando resposta do contato",
"waitingFor": "<string>",
"pausedBlockType": "<string>",
"resumeAt": "2023-11-07T05:31:56Z",
"source": "<string>",
"lastProgressAt": "2023-11-07T05:31:56Z",
"isOverdue": false
}
],
"meta": {
"page": 1,
"perPage": 20,
"hasMore": true
}
}Authorizations
API token in the sk_live_… format.
Query Parameters
Page number, starting at 1. An invalid value is treated as 1.
Required range:
x >= 1Number of items per page. The maximum depends on the environment (default 100).
Required range:
1 <= x <= 100Start of the period analysed. The day starts in your company's time zone.
End of the period analysed. The day ends at 23:59:59 in your company's time zone.
Search by contact name or number.
Automation ids, separated by commas.
Trigger types, separated by commas.
Conversation statuses, separated by commas.
Source of the run.
⌘I
Get automations report
curl --request GET \
--url https://api.connectadesk.com/api/v1/reports/automations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.connectadesk.com/api/v1/reports/automations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.connectadesk.com/api/v1/reports/automations', 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.connectadesk.com/api/v1/reports/automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.connectadesk.com/api/v1/reports/automations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.connectadesk.com/api/v1/reports/automations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/reports/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"sessionId": "9f2c1a70-31bd-4a4e-b0f2-17c6d3a91b55",
"automationId": "<string>",
"publicAutomationId": "aut_7d21c9",
"automationName": "Boas-vindas do site",
"triggerType": "message_received",
"triggerLabel": "Mensagem recebida",
"startedAt": "2023-11-07T05:31:56Z",
"durationLabel": "2 h 14 min",
"executionStatus": "running",
"contactId": "842",
"contactName": "Maria Silva",
"contactNumber": "5511987654321",
"ticketId": "<string>",
"protocolId": "<string>",
"conversationStatus": "<string>",
"blockId": "<string>",
"blockLabel": "Aguarda resposta",
"situation": "Aguardando resposta do contato",
"waitingFor": "<string>",
"pausedBlockType": "<string>",
"resumeAt": "2023-11-07T05:31:56Z",
"source": "<string>",
"lastProgressAt": "2023-11-07T05:31:56Z",
"isOverdue": false
}
],
"meta": {
"page": 1,
"perPage": 20,
"hasMore": true
}
}
