List a worker's activity: source-version bumps interleaved with the sync plans that ran against them, newest first.
curl --request GET \
--url https://{workspace}.klef.ai/api/workers/{id}/activity \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/workers/{id}/activity"
headers = {"cookie": "klef.session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'klef.session='}};
fetch('https://{workspace}.klef.ai/api/workers/{id}/activity', 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://{workspace}.klef.ai/api/workers/{id}/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "klef.session=",
]);
$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://{workspace}.klef.ai/api/workers/{id}/activity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "klef.session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{workspace}.klef.ai/api/workers/{id}/activity")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/workers/{id}/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'klef.session='
response = http.request(request)
puts response.read_body{
"results": [
{
"kind": "source_version",
"occurredAt": "2023-11-07T05:31:56Z",
"version": 123,
"plan": {
"id": "<string>",
"policies": [
{
"id": "<string>",
"name": "<string>",
"version": 123
}
],
"status": "generating",
"requestedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"affectedWorkers": 123,
"actedOnVersion": 123
}
}
],
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
],
"pagination": {
"nextCursor": 123,
"limit": 123,
"hasMore": true,
"total": 123
}
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}Workers
List a worker's activity: source-version bumps interleaved with the sync plans that ran against them, newest first.
GET
/
workers
/
{id}
/
activity
List a worker's activity: source-version bumps interleaved with the sync plans that ran against them, newest first.
curl --request GET \
--url https://{workspace}.klef.ai/api/workers/{id}/activity \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/workers/{id}/activity"
headers = {"cookie": "klef.session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'klef.session='}};
fetch('https://{workspace}.klef.ai/api/workers/{id}/activity', 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://{workspace}.klef.ai/api/workers/{id}/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "klef.session=",
]);
$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://{workspace}.klef.ai/api/workers/{id}/activity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "klef.session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{workspace}.klef.ai/api/workers/{id}/activity")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/workers/{id}/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'klef.session='
response = http.request(request)
puts response.read_body{
"results": [
{
"kind": "source_version",
"occurredAt": "2023-11-07T05:31:56Z",
"version": 123,
"plan": {
"id": "<string>",
"policies": [
{
"id": "<string>",
"name": "<string>",
"version": 123
}
],
"status": "generating",
"requestedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"affectedWorkers": 123,
"actedOnVersion": 123
}
}
],
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
],
"pagination": {
"nextCursor": 123,
"limit": 123,
"hasMore": true,
"total": 123
}
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}{
"result": "<unknown>",
"errors": [
{
"errorCode": "validation_error",
"errorMessage": "<string>",
"target": "<string>"
}
]
}Authorizations
cookieAuthapiKeyAuth
Cookie-based session. Obtain by completing the /auth/login/{provider} OAuth flow; the /auth/callback response sets the klef.session cookie that subsequent requests send automatically.
Path Parameters
Response
OK
The envelope for a collection response: IReadOnlyList<T> ApiCollectionResponse<T>.Results.
Was this page helpful?