Compare key hashes
curl --request POST \
--url https://api.tolk.every-day.io/v1/keys/diff \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keys": [
{
"hash": "<string>",
"sourceHash": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tolk.every-day.io/v1/keys/diff",
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([
'keys' => [
[
'hash' => '<string>',
'sourceHash' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({keys: [{hash: '<string>', sourceHash: '<string>'}]})
};
fetch('https://api.tolk.every-day.io/v1/keys/diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"new": [
"<string>"
],
"changed": [
"<string>"
],
"restored": [
"<string>"
],
"unchanged": 123
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}KeysDiff
Compare key hashes
Tells which of the sent hashes are new, changed (another source hash), archived or unchanged, without changing anything.
POST
/
keys
/
diff
Compare key hashes
curl --request POST \
--url https://api.tolk.every-day.io/v1/keys/diff \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keys": [
{
"hash": "<string>",
"sourceHash": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tolk.every-day.io/v1/keys/diff",
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([
'keys' => [
[
'hash' => '<string>',
'sourceHash' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({keys: [{hash: '<string>', sourceHash: '<string>'}]})
};
fetch('https://api.tolk.every-day.io/v1/keys/diff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"new": [
"<string>"
],
"changed": [
"<string>"
],
"restored": [
"<string>"
],
"unchanged": 123
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required array length:
1 - 10000 elementsShow child attributes
Show child attributes
Response
Show child attributes
Show child attributes