Get a sync plan with its operations and findings.
curl --request GET \
--url https://{workspace}.klef.ai/api/sync-plans/{id} \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/sync-plans/{id}"
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/sync-plans/{id}', 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/sync-plans/{id}",
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/sync-plans/{id}"
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/sync-plans/{id}")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/sync-plans/{id}")
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{
"result": {
"id": "<string>",
"status": "generating",
"requestedByUserId": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"generatedAt": "2023-11-07T05:31:56Z",
"approvedByUserId": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"errorMessage": "<string>",
"supersededBySyncPlanId": "<string>",
"stateSerial": 123,
"isStale": true,
"policies": [
{
"id": "<string>",
"name": "<string>",
"version": 123,
"revision": 123,
"status": "active"
}
],
"connections": [
{
"id": "<string>",
"system": "adp_workforce_now",
"name": "<string>",
"protected": true,
"rosterRead": true,
"readError": "<string>"
}
],
"headline": {
"creates": 123,
"changes": 123,
"undo": 123,
"forgets": 123,
"blocked": 123,
"failed": 123,
"skipped": 123,
"findings": 123,
"conflicts": 123,
"drift": 123,
"unresolved": 123,
"unreadConnections": 123
},
"operations": [
{
"id": "<string>",
"connectionId": "<string>",
"targetSystem": "adp_workforce_now",
"kind": "create",
"workerId": "<string>",
"workerVersion": 123,
"externalUserId": "<string>",
"policies": [
"<string>"
],
"cause": "declared",
"causeDetail": "<string>",
"isUndo": true,
"before": "<string>",
"after": "<string>",
"record": "<string>",
"status": "pending",
"blockedReason": "<string>",
"skippedReason": "<string>",
"skippedAfterOperationId": "<string>",
"error": "<string>",
"executedAt": "2023-11-07T05:31:56Z",
"effects": [
{
"id": "<string>",
"kind": "account_created",
"path": "<string>",
"elementKey": "<string>",
"before": null,
"after": null
}
]
}
],
"findings": [
{
"id": "<string>",
"kind": "conflict",
"targetSystem": "adp_workforce_now",
"connectionId": "<string>",
"workerId": "<string>",
"policies": [
"<string>"
],
"field": "<string>",
"externalUserId": "<string>",
"message": "<string>",
"detail": "<string>"
}
],
"notifications": [
{
"id": "<string>",
"policyId": "<string>",
"name": "<string>",
"stage": "pre_start",
"channel": "email",
"title": "<string>",
"subject": "<string>",
"body": "<string>",
"uri": "<string>",
"method": "get",
"aggregation": "worker",
"workers": [
"<string>"
],
"to": [
"<string>"
],
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"status": "pending",
"error": "<string>",
"sentAt": "2023-11-07T05:31:56Z"
}
],
"affectedWorkers": [
{
"workerId": "<string>",
"workerName": "<string>"
}
]
},
"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>"
}
]
}SyncPlans
Get a sync plan with its operations and findings.
GET
/
sync-plans
/
{id}
Get a sync plan with its operations and findings.
curl --request GET \
--url https://{workspace}.klef.ai/api/sync-plans/{id} \
--cookie klef.session=import requests
url = "https://{workspace}.klef.ai/api/sync-plans/{id}"
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/sync-plans/{id}', 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/sync-plans/{id}",
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/sync-plans/{id}"
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/sync-plans/{id}")
.header("cookie", "klef.session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/sync-plans/{id}")
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{
"result": {
"id": "<string>",
"status": "generating",
"requestedByUserId": "<string>",
"requestedAt": "2023-11-07T05:31:56Z",
"generatedAt": "2023-11-07T05:31:56Z",
"approvedByUserId": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"errorMessage": "<string>",
"supersededBySyncPlanId": "<string>",
"stateSerial": 123,
"isStale": true,
"policies": [
{
"id": "<string>",
"name": "<string>",
"version": 123,
"revision": 123,
"status": "active"
}
],
"connections": [
{
"id": "<string>",
"system": "adp_workforce_now",
"name": "<string>",
"protected": true,
"rosterRead": true,
"readError": "<string>"
}
],
"headline": {
"creates": 123,
"changes": 123,
"undo": 123,
"forgets": 123,
"blocked": 123,
"failed": 123,
"skipped": 123,
"findings": 123,
"conflicts": 123,
"drift": 123,
"unresolved": 123,
"unreadConnections": 123
},
"operations": [
{
"id": "<string>",
"connectionId": "<string>",
"targetSystem": "adp_workforce_now",
"kind": "create",
"workerId": "<string>",
"workerVersion": 123,
"externalUserId": "<string>",
"policies": [
"<string>"
],
"cause": "declared",
"causeDetail": "<string>",
"isUndo": true,
"before": "<string>",
"after": "<string>",
"record": "<string>",
"status": "pending",
"blockedReason": "<string>",
"skippedReason": "<string>",
"skippedAfterOperationId": "<string>",
"error": "<string>",
"executedAt": "2023-11-07T05:31:56Z",
"effects": [
{
"id": "<string>",
"kind": "account_created",
"path": "<string>",
"elementKey": "<string>",
"before": null,
"after": null
}
]
}
],
"findings": [
{
"id": "<string>",
"kind": "conflict",
"targetSystem": "adp_workforce_now",
"connectionId": "<string>",
"workerId": "<string>",
"policies": [
"<string>"
],
"field": "<string>",
"externalUserId": "<string>",
"message": "<string>",
"detail": "<string>"
}
],
"notifications": [
{
"id": "<string>",
"policyId": "<string>",
"name": "<string>",
"stage": "pre_start",
"channel": "email",
"title": "<string>",
"subject": "<string>",
"body": "<string>",
"uri": "<string>",
"method": "get",
"aggregation": "worker",
"workers": [
"<string>"
],
"to": [
"<string>"
],
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"status": "pending",
"error": "<string>",
"sentAt": "2023-11-07T05:31:56Z"
}
],
"affectedWorkers": [
{
"workerId": "<string>",
"workerName": "<string>"
}
]
},
"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
Was this page helpful?