curl "https://api.phrase.com/v2/accounts/:account_id/automations/:id/events" \
-u USERNAME_OR_ACCESS_TOKENimport requests
url = "https://api.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events', 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.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events",
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: <api-key>"
],
]);
$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.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "abcd1234ef56",
"automation_id": "xyz9876abc123",
"state": "success",
"triggered_by": "schedule",
"created_at": "2021-06-28T09:52:53Z",
"jobs_created": 3,
"job_ids": [
"job1abc",
"job2def"
],
"project": {
"id": "proj1234abcd",
"name": "My Project"
},
"details": null
}
]List events for an automation
Returns the run history for a specific automation, newest-first.
For feature availability, see Jobs (Strings).
curl "https://api.phrase.com/v2/accounts/:account_id/automations/:id/events" \
-u USERNAME_OR_ACCESS_TOKENimport requests
url = "https://api.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events', 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.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events",
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: <api-key>"
],
]);
$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.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.phrase.com/v2/accounts/{account_id}/automations/{automation_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "abcd1234ef56",
"automation_id": "xyz9876abc123",
"state": "success",
"triggered_by": "schedule",
"created_at": "2021-06-28T09:52:53Z",
"jobs_created": 3,
"job_ids": [
"job1abc",
"job2def"
],
"project": {
"id": "proj1234abcd",
"name": "My Project"
},
"details": null
}
]Authorizations
Enter your token in the format token TOKEN
Headers
Two-Factor-Authentication token (optional)
Query Parameters
Page number
Limit on the number of objects to be returned, between 1 and 100. 25 by default
Filter events by outcome state. Unrecognized values are ignored.
success, failure, in_progress Filter events by what triggered the automation run. Unrecognized values are ignored.
manual, schedule, upload, upload_batch Filter events by project ID. Accepts a single ID or a comma-separated list of IDs.
Filter events by one or more project IDs.
Return only events created after this ISO 8601 timestamp. Returns 400 if the value is not a valid date-time.
Return only events created before this ISO 8601 timestamp. Returns 400 if the value is not a valid date-time.
Response
OK
Unique identifier of the automation event.
Identifier of the automation that produced this event.
Outcome of the automation run.
success, failure, in_progress What caused the automation to run.
manual, schedule, upload, upload_batch Timestamp when the event was created.
Number of jobs created during this automation run.
Identifiers of the jobs created during this automation run.
The project associated with this automation event. Null when no project is set.
Show child attributes
Show child attributes
Error message describing the failure when state is failure; null otherwise.
Was this page helpful?