Preview a sync rule change
curl --request POST \
--url https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rules": {
"outgoing": {
"mode": "all"
},
"incoming": {
"mode": "all"
}
}
}
'import requests
url = "https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview"
payload = { "rules": {
"outgoing": { "mode": "all" },
"incoming": { "mode": "all" }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({rules: {outgoing: {mode: 'all'}, incoming: {mode: 'all'}}})
};
fetch('https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview', 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://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview",
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([
'rules' => [
'outgoing' => [
'mode' => 'all'
],
'incoming' => [
'mode' => 'all'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview"
payload := strings.NewReader("{\n \"rules\": {\n \"outgoing\": {\n \"mode\": \"all\"\n },\n \"incoming\": {\n \"mode\": \"all\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": {\n \"outgoing\": {\n \"mode\": \"all\"\n },\n \"incoming\": {\n \"mode\": \"all\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": {\n \"outgoing\": {\n \"mode\": \"all\"\n },\n \"incoming\": {\n \"mode\": \"all\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"isActive": true,
"rules": {
"outgoing": {
"mode": "all"
},
"incoming": {
"mode": "all"
}
},
"labels": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>"
}
],
"missingLabels": [
"<string>"
],
"total": 123,
"matching": 123,
"willCreate": 123,
"willPause": 123,
"needsReview": 123,
"paused": 123,
"matchingTasks": [
{
"id": "<string>",
"number": 123,
"title": "<string>"
}
],
"pausedNextCursor": "<string>",
"pausedTasks": [
{
"id": "<string>",
"number": 123,
"title": "<string>",
"linkId": "<string>",
"url": "<string>",
"eligible": true
}
],
"previewToken": "<string>"
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}Integration sync
Preview a sync rule change
Returns matching tasks, new exports, paused links and a token bound to the current integration and impact. Outgoing labels are workspace label IDs; incoming labels are exact repository label names.
POST
/
integration-sync
/
project
/
{projectId}
/
{provider}
/
preview
Preview a sync rule change
curl --request POST \
--url https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rules": {
"outgoing": {
"mode": "all"
},
"incoming": {
"mode": "all"
}
}
}
'import requests
url = "https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview"
payload = { "rules": {
"outgoing": { "mode": "all" },
"incoming": { "mode": "all" }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({rules: {outgoing: {mode: 'all'}, incoming: {mode: 'all'}}})
};
fetch('https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview', 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://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview",
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([
'rules' => [
'outgoing' => [
'mode' => 'all'
],
'incoming' => [
'mode' => 'all'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview"
payload := strings.NewReader("{\n \"rules\": {\n \"outgoing\": {\n \"mode\": \"all\"\n },\n \"incoming\": {\n \"mode\": \"all\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": {\n \"outgoing\": {\n \"mode\": \"all\"\n },\n \"incoming\": {\n \"mode\": \"all\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.kaneo.app/api/integration-sync/project/{projectId}/{provider}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": {\n \"outgoing\": {\n \"mode\": \"all\"\n },\n \"incoming\": {\n \"mode\": \"all\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"isActive": true,
"rules": {
"outgoing": {
"mode": "all"
},
"incoming": {
"mode": "all"
}
},
"labels": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>"
}
],
"missingLabels": [
"<string>"
],
"total": 123,
"matching": 123,
"willCreate": 123,
"willPause": 123,
"needsReview": 123,
"paused": 123,
"matchingTasks": [
{
"id": "<string>",
"number": 123,
"title": "<string>"
}
],
"pausedNextCursor": "<string>",
"pausedTasks": [
{
"id": "<string>",
"number": 123,
"title": "<string>",
"linkId": "<string>",
"url": "<string>",
"eligible": true
}
],
"previewToken": "<string>"
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}{
"message": "Task not found",
"code": "NOT_FOUND",
"issues": [
{
"path": "body.title",
"message": "Required"
}
],
"missingPermissions": [
"task:update"
]
}Authorizations
API key or session token (Bearer)
Path Parameters
Minimum string length:
1Available options:
github, gitea, gitlab Body
application/json
Show child attributes
Show child attributes
Response
Proposed rule impact
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I