List a connection's accounts as unsaved edits would leave them.
curl --request POST \
--url https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches \
--header 'Content-Type: application/json' \
--cookie klef.session= \
--data '
{
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"q": "<string>",
"cursor": 123,
"limit": 123,
"draft": {
"rules": [
{
"targetField": "<string>",
"workerField": "<string>"
}
],
"ignored": [
{
"externalId": "<string>",
"ignored": true
}
],
"bulk": {
"q": "<string>",
"accepted": true
},
"selections": [
{
"externalId": "<string>",
"workerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "worker"
}
]
}
}
'import requests
url = "https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches"
payload = {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"q": "<string>",
"cursor": 123,
"limit": 123,
"draft": {
"rules": [
{
"targetField": "<string>",
"workerField": "<string>"
}
],
"ignored": [
{
"externalId": "<string>",
"ignored": True
}
],
"bulk": {
"q": "<string>",
"accepted": True
},
"selections": [
{
"externalId": "<string>",
"workerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "worker"
}
]
}
}
headers = {
"cookie": "klef.session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'klef.session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
runId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
q: '<string>',
cursor: 123,
limit: 123,
draft: {
rules: [{targetField: '<string>', workerField: '<string>'}],
ignored: [{externalId: '<string>', ignored: true}],
bulk: {q: '<string>', accepted: true},
selections: [
{
externalId: '<string>',
workerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
answer: 'worker'
}
]
}
})
};
fetch('https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches', 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/connections/{id}/adoption/preview/matches",
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([
'runId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'q' => '<string>',
'cursor' => 123,
'limit' => 123,
'draft' => [
'rules' => [
[
'targetField' => '<string>',
'workerField' => '<string>'
]
],
'ignored' => [
[
'externalId' => '<string>',
'ignored' => true
]
],
'bulk' => [
'q' => '<string>',
'accepted' => true
],
'selections' => [
[
'externalId' => '<string>',
'workerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'answer' => 'worker'
]
]
]
]),
CURLOPT_COOKIE => "klef.session=",
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://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches"
payload := strings.NewReader("{\n \"runId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"q\": \"<string>\",\n \"cursor\": 123,\n \"limit\": 123,\n \"draft\": {\n \"rules\": [\n {\n \"targetField\": \"<string>\",\n \"workerField\": \"<string>\"\n }\n ],\n \"ignored\": [\n {\n \"externalId\": \"<string>\",\n \"ignored\": true\n }\n ],\n \"bulk\": {\n \"q\": \"<string>\",\n \"accepted\": true\n },\n \"selections\": [\n {\n \"externalId\": \"<string>\",\n \"workerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"answer\": \"worker\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "klef.session=")
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://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches")
.header("cookie", "klef.session=")
.header("Content-Type", "application/json")
.body("{\n \"runId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"q\": \"<string>\",\n \"cursor\": 123,\n \"limit\": 123,\n \"draft\": {\n \"rules\": [\n {\n \"targetField\": \"<string>\",\n \"workerField\": \"<string>\"\n }\n ],\n \"ignored\": [\n {\n \"externalId\": \"<string>\",\n \"ignored\": true\n }\n ],\n \"bulk\": {\n \"q\": \"<string>\",\n \"accepted\": true\n },\n \"selections\": [\n {\n \"externalId\": \"<string>\",\n \"workerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"answer\": \"worker\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'klef.session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"runId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"q\": \"<string>\",\n \"cursor\": 123,\n \"limit\": 123,\n \"draft\": {\n \"rules\": [\n {\n \"targetField\": \"<string>\",\n \"workerField\": \"<string>\"\n }\n ],\n \"ignored\": [\n {\n \"externalId\": \"<string>\",\n \"ignored\": true\n }\n ],\n \"bulk\": {\n \"q\": \"<string>\",\n \"accepted\": true\n },\n \"selections\": [\n {\n \"externalId\": \"<string>\",\n \"workerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"answer\": \"worker\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "<string>",
"displayHandle": "<string>",
"disposition": "matched",
"refusal": "shared_value",
"ruleTargetField": "<string>",
"ruleWorkerField": "<string>",
"matchedValue": "<string>",
"worker": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "unspecified"
},
"contenders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "unspecified",
"email": "<string>",
"lifecycleStage": "pre_start"
}
],
"rivals": [
"<string>"
],
"origin": "created",
"selected": true,
"selectedMethod": "rule"
}
],
"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>"
}
]
}Adoption
List a connection's accounts as unsaved edits would leave them.
POST
/
connections
/
{id}
/
adoption
/
preview
/
matches
List a connection's accounts as unsaved edits would leave them.
curl --request POST \
--url https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches \
--header 'Content-Type: application/json' \
--cookie klef.session= \
--data '
{
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"q": "<string>",
"cursor": 123,
"limit": 123,
"draft": {
"rules": [
{
"targetField": "<string>",
"workerField": "<string>"
}
],
"ignored": [
{
"externalId": "<string>",
"ignored": true
}
],
"bulk": {
"q": "<string>",
"accepted": true
},
"selections": [
{
"externalId": "<string>",
"workerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "worker"
}
]
}
}
'import requests
url = "https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches"
payload = {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"q": "<string>",
"cursor": 123,
"limit": 123,
"draft": {
"rules": [
{
"targetField": "<string>",
"workerField": "<string>"
}
],
"ignored": [
{
"externalId": "<string>",
"ignored": True
}
],
"bulk": {
"q": "<string>",
"accepted": True
},
"selections": [
{
"externalId": "<string>",
"workerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"answer": "worker"
}
]
}
}
headers = {
"cookie": "klef.session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'klef.session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
runId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
q: '<string>',
cursor: 123,
limit: 123,
draft: {
rules: [{targetField: '<string>', workerField: '<string>'}],
ignored: [{externalId: '<string>', ignored: true}],
bulk: {q: '<string>', accepted: true},
selections: [
{
externalId: '<string>',
workerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
answer: 'worker'
}
]
}
})
};
fetch('https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches', 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/connections/{id}/adoption/preview/matches",
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([
'runId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'q' => '<string>',
'cursor' => 123,
'limit' => 123,
'draft' => [
'rules' => [
[
'targetField' => '<string>',
'workerField' => '<string>'
]
],
'ignored' => [
[
'externalId' => '<string>',
'ignored' => true
]
],
'bulk' => [
'q' => '<string>',
'accepted' => true
],
'selections' => [
[
'externalId' => '<string>',
'workerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'answer' => 'worker'
]
]
]
]),
CURLOPT_COOKIE => "klef.session=",
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://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches"
payload := strings.NewReader("{\n \"runId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"q\": \"<string>\",\n \"cursor\": 123,\n \"limit\": 123,\n \"draft\": {\n \"rules\": [\n {\n \"targetField\": \"<string>\",\n \"workerField\": \"<string>\"\n }\n ],\n \"ignored\": [\n {\n \"externalId\": \"<string>\",\n \"ignored\": true\n }\n ],\n \"bulk\": {\n \"q\": \"<string>\",\n \"accepted\": true\n },\n \"selections\": [\n {\n \"externalId\": \"<string>\",\n \"workerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"answer\": \"worker\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "klef.session=")
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://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches")
.header("cookie", "klef.session=")
.header("Content-Type", "application/json")
.body("{\n \"runId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"q\": \"<string>\",\n \"cursor\": 123,\n \"limit\": 123,\n \"draft\": {\n \"rules\": [\n {\n \"targetField\": \"<string>\",\n \"workerField\": \"<string>\"\n }\n ],\n \"ignored\": [\n {\n \"externalId\": \"<string>\",\n \"ignored\": true\n }\n ],\n \"bulk\": {\n \"q\": \"<string>\",\n \"accepted\": true\n },\n \"selections\": [\n {\n \"externalId\": \"<string>\",\n \"workerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"answer\": \"worker\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.klef.ai/api/connections/{id}/adoption/preview/matches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'klef.session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"runId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"q\": \"<string>\",\n \"cursor\": 123,\n \"limit\": 123,\n \"draft\": {\n \"rules\": [\n {\n \"targetField\": \"<string>\",\n \"workerField\": \"<string>\"\n }\n ],\n \"ignored\": [\n {\n \"externalId\": \"<string>\",\n \"ignored\": true\n }\n ],\n \"bulk\": {\n \"q\": \"<string>\",\n \"accepted\": true\n },\n \"selections\": [\n {\n \"externalId\": \"<string>\",\n \"workerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"answer\": \"worker\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalId": "<string>",
"displayHandle": "<string>",
"disposition": "matched",
"refusal": "shared_value",
"ruleTargetField": "<string>",
"ruleWorkerField": "<string>",
"matchedValue": "<string>",
"worker": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "unspecified"
},
"contenders": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "unspecified",
"email": "<string>",
"lifecycleStage": "pre_start"
}
],
"rivals": [
"<string>"
],
"origin": "created",
"selected": true,
"selectedMethod": "rule"
}
],
"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
Body
application/json
Available options:
matched, ambiguous, unmatched, ignored, adopted Required string length:
2 - 200Show child attributes
Show child attributes
Response
OK
The envelope for a collection response: IReadOnlyList<T> ApiCollectionResponse<T>.Results.
Was this page helpful?