Upsert Plugin Connection
curl --request PUT \
--url https://use.hoop.dev/api/plugins/{name}/conn/{id} \
--header 'Content-Type: application/json' \
--data '
{
"config": [
"sre",
"devops"
]
}
'import requests
url = "https://use.hoop.dev/api/plugins/{name}/conn/{id}"
payload = { "config": ["sre", "devops"] }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({config: ['sre', 'devops']})
};
fetch('https://use.hoop.dev/api/plugins/{name}/conn/{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://use.hoop.dev/api/plugins/{name}/conn/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'sre',
'devops'
]
]),
CURLOPT_HTTPHEADER => [
"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://use.hoop.dev/api/plugins/{name}/conn/{id}"
payload := strings.NewReader("{\n \"config\": [\n \"sre\",\n \"devops\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://use.hoop.dev/api/plugins/{name}/conn/{id}")
.header("Content-Type", "application/json")
.body("{\n \"config\": [\n \"sre\",\n \"devops\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/plugins/{name}/conn/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": [\n \"sre\",\n \"devops\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"config": [
"EMAIL_ADDRESS",
"URL"
],
"connection_id": "B702C63C-E6EB-46BB-9D1E-90EA077E4582",
"id": "B39D74FA-EF2E-4B0C-A28A-D382B18043C6",
"plugin_id": "review",
"updated_at": "2024-07-25T19:36:41Z"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Plugins
Upsert Plugin Connection
Update or create a plugin connection resource
PUT
/
plugins
/
{name}
/
conn
/
{id}
Upsert Plugin Connection
curl --request PUT \
--url https://use.hoop.dev/api/plugins/{name}/conn/{id} \
--header 'Content-Type: application/json' \
--data '
{
"config": [
"sre",
"devops"
]
}
'import requests
url = "https://use.hoop.dev/api/plugins/{name}/conn/{id}"
payload = { "config": ["sre", "devops"] }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({config: ['sre', 'devops']})
};
fetch('https://use.hoop.dev/api/plugins/{name}/conn/{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://use.hoop.dev/api/plugins/{name}/conn/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
'sre',
'devops'
]
]),
CURLOPT_HTTPHEADER => [
"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://use.hoop.dev/api/plugins/{name}/conn/{id}"
payload := strings.NewReader("{\n \"config\": [\n \"sre\",\n \"devops\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://use.hoop.dev/api/plugins/{name}/conn/{id}")
.header("Content-Type", "application/json")
.body("{\n \"config\": [\n \"sre\",\n \"devops\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/plugins/{name}/conn/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": [\n \"sre\",\n \"devops\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"config": [
"EMAIL_ADDRESS",
"URL"
],
"connection_id": "B702C63C-E6EB-46BB-9D1E-90EA077E4582",
"id": "B39D74FA-EF2E-4B0C-A28A-D382B18043C6",
"plugin_id": "review",
"updated_at": "2024-07-25T19:36:41Z"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Body
application/json
The request body resource
The configuration of the plugin connection, the content depends on the plugin type
Example:
["sre", "devops"]
Response
OK
The configuration of the plugin connection, the content depends on the plugin type
Example:
["EMAIL_ADDRESS", "URL"]
The connection ID reference
Example:
"B702C63C-E6EB-46BB-9D1E-90EA077E4582"
The resource ID
Example:
"B39D74FA-EF2E-4B0C-A28A-D382B18043C6"
The plugin id to create associations
Example:
"review"
The time when this resource was updated
Example:
"2024-07-25T19:36:41Z"
Was this page helpful?
⌘I