Create integration
curl --request POST \
--url http://localhost:8080/api/v1/integrations \
--header 'Content-Type: application/json' \
--header 'X-OpenCluster-Organization: <x-opencluster-organization>' \
--cookie __Host-oc_session= \
--data '
{
"type": "<string>",
"name": "<string>",
"configuration": {},
"labels": {},
"relayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "http://localhost:8080/api/v1/integrations"
payload = {
"type": "<string>",
"name": "<string>",
"configuration": {},
"labels": {},
"relayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"cookie": "__Host-oc_session=",
"X-OpenCluster-Organization": "<x-opencluster-organization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-oc_session=',
'X-OpenCluster-Organization': '<x-opencluster-organization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: '<string>',
name: '<string>',
configuration: {},
labels: {},
relayId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('http://localhost:8080/api/v1/integrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/integrations",
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([
'type' => '<string>',
'name' => '<string>',
'configuration' => [
],
'labels' => [
],
'relayId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_COOKIE => "__Host-oc_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-OpenCluster-Organization: <x-opencluster-organization>"
],
]);
$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 := "http://localhost:8080/api/v1/integrations"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"configuration\": {},\n \"labels\": {},\n \"relayId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-oc_session=")
req.Header.Add("X-OpenCluster-Organization", "<x-opencluster-organization>")
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("http://localhost:8080/api/v1/integrations")
.header("cookie", "__Host-oc_session=")
.header("X-OpenCluster-Organization", "<x-opencluster-organization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"configuration\": {},\n \"labels\": {},\n \"relayId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/integrations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-oc_session='
request["X-OpenCluster-Organization"] = '<x-opencluster-organization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"configuration\": {},\n \"labels\": {},\n \"relayId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"integration": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"status": "configured",
"disabled": true,
"configuration": {},
"toolAvailability": [
{
"tool": "<string>",
"available": true,
"reason": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"labels": {},
"relayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook": {
"url": "<string>",
"secretFingerprint": "<string>",
"secretCreatedAt": "2023-11-07T05:31:56Z",
"secretRotatedAt": "2023-11-07T05:31:56Z"
},
"credential": {
"fingerprint": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"rotatedAt": "2023-11-07T05:31:56Z"
},
"lastVerifiedAt": "2023-11-07T05:31:56Z",
"verifyNote": "<string>",
"verifyFacts": {},
"inbound": {
"available": true,
"reason": "<string>"
},
"createdBy": "<string>"
},
"webhookSecret": "ocwh_placeholder_generated_once_1234"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}Integrations
Create integration
POST
/
api
/
v1
/
integrations
Create integration
curl --request POST \
--url http://localhost:8080/api/v1/integrations \
--header 'Content-Type: application/json' \
--header 'X-OpenCluster-Organization: <x-opencluster-organization>' \
--cookie __Host-oc_session= \
--data '
{
"type": "<string>",
"name": "<string>",
"configuration": {},
"labels": {},
"relayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "http://localhost:8080/api/v1/integrations"
payload = {
"type": "<string>",
"name": "<string>",
"configuration": {},
"labels": {},
"relayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"cookie": "__Host-oc_session=",
"X-OpenCluster-Organization": "<x-opencluster-organization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-oc_session=',
'X-OpenCluster-Organization': '<x-opencluster-organization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: '<string>',
name: '<string>',
configuration: {},
labels: {},
relayId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('http://localhost:8080/api/v1/integrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/integrations",
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([
'type' => '<string>',
'name' => '<string>',
'configuration' => [
],
'labels' => [
],
'relayId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_COOKIE => "__Host-oc_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-OpenCluster-Organization: <x-opencluster-organization>"
],
]);
$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 := "http://localhost:8080/api/v1/integrations"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"configuration\": {},\n \"labels\": {},\n \"relayId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-oc_session=")
req.Header.Add("X-OpenCluster-Organization", "<x-opencluster-organization>")
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("http://localhost:8080/api/v1/integrations")
.header("cookie", "__Host-oc_session=")
.header("X-OpenCluster-Organization", "<x-opencluster-organization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"configuration\": {},\n \"labels\": {},\n \"relayId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/integrations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-oc_session='
request["X-OpenCluster-Organization"] = '<x-opencluster-organization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"name\": \"<string>\",\n \"configuration\": {},\n \"labels\": {},\n \"relayId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"integration": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"status": "configured",
"disabled": true,
"configuration": {},
"toolAvailability": [
{
"tool": "<string>",
"available": true,
"reason": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"labels": {},
"relayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"webhook": {
"url": "<string>",
"secretFingerprint": "<string>",
"secretCreatedAt": "2023-11-07T05:31:56Z",
"secretRotatedAt": "2023-11-07T05:31:56Z"
},
"credential": {
"fingerprint": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"rotatedAt": "2023-11-07T05:31:56Z"
},
"lastVerifiedAt": "2023-11-07T05:31:56Z",
"verifyNote": "<string>",
"verifyFacts": {},
"inbound": {
"available": true,
"reason": "<string>"
},
"createdBy": "<string>"
},
"webhookSecret": "ocwh_placeholder_generated_once_1234"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}Authorizations
Headers
Selects the Organization whose data and membership are authorized.
Required string length:
1 - 63Pattern:
^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$Body
application/json