Create sync job run state
/sync-job-run-state
Query Parameters
The state_key attribute found in a sync job run and defined in the sync job. Used as a namespace for the states.
sync_job_123Request Body
The key identifier for this state.
last_processed_idThe state value to store.
eyJpZCI6IjEyMzQ1IiwidGltZXN0YW1wIjoiMjAyMy0wMS0wMVQwMDowMDowMFoifQ==Response Body
Timestamp when the state was created.
2023-01-01T10:00:00.000ZThe key identifier for this state.
last_processed_idThe ID of the sync job run this state is associated with (optional).
4a4de828-f4db-4c9e-adfd-434e0864c3c7Timestamp when the state was last updated.
2023-01-01T10:00:00.000ZThe state value stored.
eyJpZCI6IjEyMzQ1IiwidGltZXN0YW1wIjoiMjAyMy0wMS0wMVQwMDowMDowMFoifQ==curl -X POST 'https://api.truto.one/sync-job-run-state' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"key": "last_processed_id",
"value": "eyJpZCI6IjEyMzQ1IiwidGltZXN0YW1wIjoiMjAyMy0wMS0wMVQwMDowMDowMFoifQ=="
}'const body = {
"key": "last_processed_id",
"value": "eyJpZCI6IjEyMzQ1IiwidGltZXN0YW1wIjoiMjAyMy0wMS0wMVQwMDowMDowMFoifQ=="
};
const response = await fetch('https://api.truto.one/sync-job-run-state', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/sync-job-run-state"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"key": "last_processed_id",
"value": "eyJpZCI6IjEyMzQ1IiwidGltZXN0YW1wIjoiMjAyMy0wMS0wMVQwMDowMDowMFoifQ=="
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())