curl --request PATCH \
--url https://api.stackone.com/v2/data_sync/sync_configs/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"cadence": "<string>",
"full_sync_after": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"lookback_start": "2023-12-25",
"auto_link": true
}
'import requests
url = "https://api.stackone.com/v2/data_sync/sync_configs/{id}"
payload = {
"enabled": True,
"cadence": "<string>",
"full_sync_after": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"lookback_start": "2023-12-25",
"auto_link": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
cadence: '<string>',
full_sync_after: '<string>',
start_at: '2023-11-07T05:31:56Z',
lookback_start: '2023-12-25',
auto_link: true
})
};
fetch('https://api.stackone.com/v2/data_sync/sync_configs/{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://api.stackone.com/v2/data_sync/sync_configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'cadence' => '<string>',
'full_sync_after' => '<string>',
'start_at' => '2023-11-07T05:31:56Z',
'lookback_start' => '2023-12-25',
'auto_link' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.stackone.com/v2/data_sync/sync_configs/{id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"cadence\": \"<string>\",\n \"full_sync_after\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"lookback_start\": \"2023-12-25\",\n \"auto_link\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://api.stackone.com/v2/data_sync/sync_configs/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"cadence\": \"<string>\",\n \"full_sync_after\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"lookback_start\": \"2023-12-25\",\n \"auto_link\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/v2/data_sync/sync_configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"cadence\": \"<string>\",\n \"full_sync_after\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"lookback_start\": \"2023-12-25\",\n \"auto_link\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"connector_profile_id": "<string>",
"action_id": "<string>",
"enabled": true,
"cadence": "<string>",
"auto_link": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"full_sync_after": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"lookback_start": "2023-12-25"
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Patch a sync config
Updates a sync config’s mutable fields. connector_profile_id and action_id cannot be changed.
curl --request PATCH \
--url https://api.stackone.com/v2/data_sync/sync_configs/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"cadence": "<string>",
"full_sync_after": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"lookback_start": "2023-12-25",
"auto_link": true
}
'import requests
url = "https://api.stackone.com/v2/data_sync/sync_configs/{id}"
payload = {
"enabled": True,
"cadence": "<string>",
"full_sync_after": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"lookback_start": "2023-12-25",
"auto_link": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
cadence: '<string>',
full_sync_after: '<string>',
start_at: '2023-11-07T05:31:56Z',
lookback_start: '2023-12-25',
auto_link: true
})
};
fetch('https://api.stackone.com/v2/data_sync/sync_configs/{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://api.stackone.com/v2/data_sync/sync_configs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'cadence' => '<string>',
'full_sync_after' => '<string>',
'start_at' => '2023-11-07T05:31:56Z',
'lookback_start' => '2023-12-25',
'auto_link' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.stackone.com/v2/data_sync/sync_configs/{id}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"cadence\": \"<string>\",\n \"full_sync_after\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"lookback_start\": \"2023-12-25\",\n \"auto_link\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://api.stackone.com/v2/data_sync/sync_configs/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"cadence\": \"<string>\",\n \"full_sync_after\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"lookback_start\": \"2023-12-25\",\n \"auto_link\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stackone.com/v2/data_sync/sync_configs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"cadence\": \"<string>\",\n \"full_sync_after\": \"<string>\",\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"lookback_start\": \"2023-12-25\",\n \"auto_link\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"connector_profile_id": "<string>",
"action_id": "<string>",
"enabled": true,
"cadence": "<string>",
"auto_link": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"full_sync_after": "<string>",
"start_at": "2023-11-07T05:31:56Z",
"lookback_start": "2023-12-25"
}{
"statusCode": 400,
"message": "Bad Request",
"timestamp": "2023-05-30T00:00:00.000Z",
"data": {
"statusCode": 400,
"message": "Bad Request",
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
},
"provider_errors": [
{
"status": 400,
"url": "https://api.provider.com/v1/resource",
"raw": {
"message": "Invalid input parameters"
},
"headers": {
"content-type": "application/json",
"x-request-id": "5678c28b211dace4e0a0f9171e6b88c5"
}
}
]
}{
"statusCode": 401,
"message": "Unauthorized",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 403,
"message": "Forbidden resource",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 404,
"message": "Not Found",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 408,
"message": "Request timed out",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 409,
"message": "Conflict",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 422,
"message": "Unprocessable Entity",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 429,
"message": "Too many requests",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 500,
"message": "Internal server error",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 501,
"message": "Not Implemented",
"timestamp": "2023-05-30T00:00:00.000Z"
}{
"statusCode": 502,
"message": "Bad Gateway",
"timestamp": "2023-05-30T00:00:00.000Z"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The unique identifier of the sync config.
Body
Whether the action is syncable for the connector profile.
How often the sync fires. ISO 8601 duration (e.g. PT1H).
The point after which an incremental sync falls back to a full sync. ISO 8601 duration; null clears it (only accepted while the sync config is disabled, since an enabled one requires a value), omit to leave it unchanged.
When the sync config should next be scheduled to fire; null clears it, omit to leave it unchanged.
The earliest record date sent to the provider on every run, full and incremental. ISO 8601 date, stored as midnight UTC. Only accepted for an action that supports lookback, and cannot be in the future. Changing it makes the next run a full resync that sends no events. null turns lookback off; omit to leave it unchanged.
Whether the action syncs automatically on every account linked to this connector profile. For an action with no required parameters it is always on: omitting it means true and false is refused. An action with required parameters cannot be auto-linked.
Response
The sync config was updated.
The unique identifier of the sync config.
The identifier of the connector profile this sync config belongs to.
The action this sync config governs (e.g. hris_list_employees).
Whether the action is currently syncable for the connector profile.
How often the sync fires. ISO 8601 duration (e.g. PT1H).
Whether the action syncs automatically on every account linked to this connector profile, including accounts linked later. Forced to true whenever a write leaves an action with no required parameters enabled; a config that is disabled, or not written since, may still read false.
When the sync config was created.
When the sync config was last updated.
The point after which an incremental sync falls back to a full sync. ISO 8601 duration; null when unset.
When the sync config was first scheduled to fire; null when unset.
The earliest record date sent to the provider on every run. ISO 8601 date; null when lookback is off.
Was this page helpful?