curl --request PATCH \
--url {schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"repository": "<string>",
"fetch_branches": true,
"prune_branches": true,
"app_credentials": {
"key": "<string>",
"secret": "<string>"
},
"addon_credentials": {
"addon_key": "<string>",
"client_key": "<string>",
"shared_secret": "<string>"
},
"build_pull_requests": true,
"pull_requests_clone_parent_data": true,
"pull_requests_max_pages": 123,
"resync_pull_requests": true
}
'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}"
payload = {
"type": "<string>",
"repository": "<string>",
"fetch_branches": True,
"prune_branches": True,
"app_credentials": {
"key": "<string>",
"secret": "<string>"
},
"addon_credentials": {
"addon_key": "<string>",
"client_key": "<string>",
"shared_secret": "<string>"
},
"build_pull_requests": True,
"pull_requests_clone_parent_data": True,
"pull_requests_max_pages": 123,
"resync_pull_requests": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
repository: '<string>',
fetch_branches: true,
prune_branches: true,
app_credentials: {key: '<string>', secret: '<string>'},
addon_credentials: {addon_key: '<string>', client_key: '<string>', shared_secret: '<string>'},
build_pull_requests: true,
pull_requests_clone_parent_data: true,
pull_requests_max_pages: 123,
resync_pull_requests: true
})
};
fetch('{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}', 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 => "{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}",
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([
'type' => '<string>',
'repository' => '<string>',
'fetch_branches' => true,
'prune_branches' => true,
'app_credentials' => [
'key' => '<string>',
'secret' => '<string>'
],
'addon_credentials' => [
'addon_key' => '<string>',
'client_key' => '<string>',
'shared_secret' => '<string>'
],
'build_pull_requests' => true,
'pull_requests_clone_parent_data' => true,
'pull_requests_max_pages' => 123,
'resync_pull_requests' => true
]),
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 := "{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"repository\": \"<string>\",\n \"fetch_branches\": true,\n \"prune_branches\": true,\n \"app_credentials\": {\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"addon_credentials\": {\n \"addon_key\": \"<string>\",\n \"client_key\": \"<string>\",\n \"shared_secret\": \"<string>\"\n },\n \"build_pull_requests\": true,\n \"pull_requests_clone_parent_data\": true,\n \"pull_requests_max_pages\": 123,\n \"resync_pull_requests\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"repository\": \"<string>\",\n \"fetch_branches\": true,\n \"prune_branches\": true,\n \"app_credentials\": {\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"addon_credentials\": {\n \"addon_key\": \"<string>\",\n \"client_key\": \"<string>\",\n \"shared_secret\": \"<string>\"\n },\n \"build_pull_requests\": true,\n \"pull_requests_clone_parent_data\": true,\n \"pull_requests_max_pages\": 123,\n \"resync_pull_requests\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"repository\": \"<string>\",\n \"fetch_branches\": true,\n \"prune_branches\": true,\n \"app_credentials\": {\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"addon_credentials\": {\n \"addon_key\": \"<string>\",\n \"client_key\": \"<string>\",\n \"shared_secret\": \"<string>\"\n },\n \"build_pull_requests\": true,\n \"pull_requests_clone_parent_data\": true,\n \"pull_requests_max_pages\": 123,\n \"resync_pull_requests\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"code": 123
}Update an existing third-party integration
curl --request PATCH \
--url {schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"repository": "<string>",
"fetch_branches": true,
"prune_branches": true,
"app_credentials": {
"key": "<string>",
"secret": "<string>"
},
"addon_credentials": {
"addon_key": "<string>",
"client_key": "<string>",
"shared_secret": "<string>"
},
"build_pull_requests": true,
"pull_requests_clone_parent_data": true,
"pull_requests_max_pages": 123,
"resync_pull_requests": true
}
'import requests
url = "{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}"
payload = {
"type": "<string>",
"repository": "<string>",
"fetch_branches": True,
"prune_branches": True,
"app_credentials": {
"key": "<string>",
"secret": "<string>"
},
"addon_credentials": {
"addon_key": "<string>",
"client_key": "<string>",
"shared_secret": "<string>"
},
"build_pull_requests": True,
"pull_requests_clone_parent_data": True,
"pull_requests_max_pages": 123,
"resync_pull_requests": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
repository: '<string>',
fetch_branches: true,
prune_branches: true,
app_credentials: {key: '<string>', secret: '<string>'},
addon_credentials: {addon_key: '<string>', client_key: '<string>', shared_secret: '<string>'},
build_pull_requests: true,
pull_requests_clone_parent_data: true,
pull_requests_max_pages: 123,
resync_pull_requests: true
})
};
fetch('{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}', 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 => "{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}",
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([
'type' => '<string>',
'repository' => '<string>',
'fetch_branches' => true,
'prune_branches' => true,
'app_credentials' => [
'key' => '<string>',
'secret' => '<string>'
],
'addon_credentials' => [
'addon_key' => '<string>',
'client_key' => '<string>',
'shared_secret' => '<string>'
],
'build_pull_requests' => true,
'pull_requests_clone_parent_data' => true,
'pull_requests_max_pages' => 123,
'resync_pull_requests' => true
]),
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 := "{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"repository\": \"<string>\",\n \"fetch_branches\": true,\n \"prune_branches\": true,\n \"app_credentials\": {\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"addon_credentials\": {\n \"addon_key\": \"<string>\",\n \"client_key\": \"<string>\",\n \"shared_secret\": \"<string>\"\n },\n \"build_pull_requests\": true,\n \"pull_requests_clone_parent_data\": true,\n \"pull_requests_max_pages\": 123,\n \"resync_pull_requests\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"repository\": \"<string>\",\n \"fetch_branches\": true,\n \"prune_branches\": true,\n \"app_credentials\": {\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"addon_credentials\": {\n \"addon_key\": \"<string>\",\n \"client_key\": \"<string>\",\n \"shared_secret\": \"<string>\"\n },\n \"build_pull_requests\": true,\n \"pull_requests_clone_parent_data\": true,\n \"pull_requests_max_pages\": 123,\n \"resync_pull_requests\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/projects/{projectId}/integrations/{integrationId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"repository\": \"<string>\",\n \"fetch_branches\": true,\n \"prune_branches\": true,\n \"app_credentials\": {\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n },\n \"addon_credentials\": {\n \"addon_key\": \"<string>\",\n \"client_key\": \"<string>\",\n \"shared_secret\": \"<string>\"\n },\n \"build_pull_requests\": true,\n \"pull_requests_clone_parent_data\": true,\n \"pull_requests_max_pages\": 123,\n \"resync_pull_requests\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"code": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
The type of the integration
The Bitbucket repository (in the form user/repo)
Whether or not to fetch branches
Whether or not to remove branches that disappeared remotely (requires fetch_branches)
The resources used when initializing a new service
default, manual, minimum, parent The OAuth2 consumer information (optional)
Show child attributes
Show child attributes
The addon credential information (optional)
Show child attributes
Show child attributes
Whether or not to build pull requests
Whether or not to clone parent data when building merge requests
Maximum number of Bitbucket pull request pages to iterate when syncing pull requests. Null means no limit
Whether or not pull request environment data should be re-synced on every build
Was this page helpful?