curl --request PUT \
--url https://use.hoop.dev/api/runbooks/configurations/{id} \
--header 'Content-Type: application/json' \
--data '
{
"git_url": "https://github.com/myorg/myrepo",
"git_hook_ttl": 1000,
"git_password": "mypassword",
"git_user": "myusername",
"ssh_key": "-----BEGIN PRIVATE KEY-----...",
"ssh_keypass": "mykeypassphrase",
"ssh_known_hosts": "github.com ssh-rsa AAAA...",
"ssh_user": "myuser"
}
'import requests
url = "https://use.hoop.dev/api/runbooks/configurations/{id}"
payload = {
"git_url": "https://github.com/myorg/myrepo",
"git_hook_ttl": 1000,
"git_password": "mypassword",
"git_user": "myusername",
"ssh_key": "-----BEGIN PRIVATE KEY-----...",
"ssh_keypass": "mykeypassphrase",
"ssh_known_hosts": "github.com ssh-rsa AAAA...",
"ssh_user": "myuser"
}
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({
git_url: 'https://github.com/myorg/myrepo',
git_hook_ttl: 1000,
git_password: 'mypassword',
git_user: 'myusername',
ssh_key: '-----BEGIN PRIVATE KEY-----...',
ssh_keypass: 'mykeypassphrase',
ssh_known_hosts: 'github.com ssh-rsa AAAA...',
ssh_user: 'myuser'
})
};
fetch('https://use.hoop.dev/api/runbooks/configurations/{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/runbooks/configurations/{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([
'git_url' => 'https://github.com/myorg/myrepo',
'git_hook_ttl' => 1000,
'git_password' => 'mypassword',
'git_user' => 'myusername',
'ssh_key' => '-----BEGIN PRIVATE KEY-----...',
'ssh_keypass' => 'mykeypassphrase',
'ssh_known_hosts' => 'github.com ssh-rsa AAAA...',
'ssh_user' => 'myuser'
]),
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/runbooks/configurations/{id}"
payload := strings.NewReader("{\n \"git_url\": \"https://github.com/myorg/myrepo\",\n \"git_hook_ttl\": 1000,\n \"git_password\": \"mypassword\",\n \"git_user\": \"myusername\",\n \"ssh_key\": \"-----BEGIN PRIVATE KEY-----...\",\n \"ssh_keypass\": \"mykeypassphrase\",\n \"ssh_known_hosts\": \"github.com ssh-rsa AAAA...\",\n \"ssh_user\": \"myuser\"\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/runbooks/configurations/{id}")
.header("Content-Type", "application/json")
.body("{\n \"git_url\": \"https://github.com/myorg/myrepo\",\n \"git_hook_ttl\": 1000,\n \"git_password\": \"mypassword\",\n \"git_user\": \"myusername\",\n \"ssh_key\": \"-----BEGIN PRIVATE KEY-----...\",\n \"ssh_keypass\": \"mykeypassphrase\",\n \"ssh_known_hosts\": \"github.com ssh-rsa AAAA...\",\n \"ssh_user\": \"myuser\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/runbooks/configurations/{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 \"git_url\": \"https://github.com/myorg/myrepo\",\n \"git_hook_ttl\": 1000,\n \"git_password\": \"mypassword\",\n \"git_user\": \"myusername\",\n \"ssh_key\": \"-----BEGIN PRIVATE KEY-----...\",\n \"ssh_keypass\": \"mykeypassphrase\",\n \"ssh_known_hosts\": \"github.com ssh-rsa AAAA...\",\n \"ssh_user\": \"myuser\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-07-25T15:56:35.317601Z",
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"org_id": "37EEBC20-D8DF-416B-8AC2-01B6EB456318",
"repositories": [
{
"git_hook_ttl": 1000,
"git_password": "mypassword",
"git_url": "https://github.com/myorg/myrepo",
"git_user": "myusername",
"repository": "github.com/myorg/myrepo",
"ssh_key": "-----BEGIN PRIVATE KEY-----...",
"ssh_keypass": "mykeypassphrase",
"ssh_known_hosts": "github.com ssh-rsa AAAA...",
"ssh_user": "myuser"
}
],
"updated_at": "2024-07-25T15:56:35.317601Z"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Update Runbook Configuration Entry
Update Runbook Configuration Entry
curl --request PUT \
--url https://use.hoop.dev/api/runbooks/configurations/{id} \
--header 'Content-Type: application/json' \
--data '
{
"git_url": "https://github.com/myorg/myrepo",
"git_hook_ttl": 1000,
"git_password": "mypassword",
"git_user": "myusername",
"ssh_key": "-----BEGIN PRIVATE KEY-----...",
"ssh_keypass": "mykeypassphrase",
"ssh_known_hosts": "github.com ssh-rsa AAAA...",
"ssh_user": "myuser"
}
'import requests
url = "https://use.hoop.dev/api/runbooks/configurations/{id}"
payload = {
"git_url": "https://github.com/myorg/myrepo",
"git_hook_ttl": 1000,
"git_password": "mypassword",
"git_user": "myusername",
"ssh_key": "-----BEGIN PRIVATE KEY-----...",
"ssh_keypass": "mykeypassphrase",
"ssh_known_hosts": "github.com ssh-rsa AAAA...",
"ssh_user": "myuser"
}
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({
git_url: 'https://github.com/myorg/myrepo',
git_hook_ttl: 1000,
git_password: 'mypassword',
git_user: 'myusername',
ssh_key: '-----BEGIN PRIVATE KEY-----...',
ssh_keypass: 'mykeypassphrase',
ssh_known_hosts: 'github.com ssh-rsa AAAA...',
ssh_user: 'myuser'
})
};
fetch('https://use.hoop.dev/api/runbooks/configurations/{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/runbooks/configurations/{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([
'git_url' => 'https://github.com/myorg/myrepo',
'git_hook_ttl' => 1000,
'git_password' => 'mypassword',
'git_user' => 'myusername',
'ssh_key' => '-----BEGIN PRIVATE KEY-----...',
'ssh_keypass' => 'mykeypassphrase',
'ssh_known_hosts' => 'github.com ssh-rsa AAAA...',
'ssh_user' => 'myuser'
]),
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/runbooks/configurations/{id}"
payload := strings.NewReader("{\n \"git_url\": \"https://github.com/myorg/myrepo\",\n \"git_hook_ttl\": 1000,\n \"git_password\": \"mypassword\",\n \"git_user\": \"myusername\",\n \"ssh_key\": \"-----BEGIN PRIVATE KEY-----...\",\n \"ssh_keypass\": \"mykeypassphrase\",\n \"ssh_known_hosts\": \"github.com ssh-rsa AAAA...\",\n \"ssh_user\": \"myuser\"\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/runbooks/configurations/{id}")
.header("Content-Type", "application/json")
.body("{\n \"git_url\": \"https://github.com/myorg/myrepo\",\n \"git_hook_ttl\": 1000,\n \"git_password\": \"mypassword\",\n \"git_user\": \"myusername\",\n \"ssh_key\": \"-----BEGIN PRIVATE KEY-----...\",\n \"ssh_keypass\": \"mykeypassphrase\",\n \"ssh_known_hosts\": \"github.com ssh-rsa AAAA...\",\n \"ssh_user\": \"myuser\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/runbooks/configurations/{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 \"git_url\": \"https://github.com/myorg/myrepo\",\n \"git_hook_ttl\": 1000,\n \"git_password\": \"mypassword\",\n \"git_user\": \"myusername\",\n \"ssh_key\": \"-----BEGIN PRIVATE KEY-----...\",\n \"ssh_keypass\": \"mykeypassphrase\",\n \"ssh_known_hosts\": \"github.com ssh-rsa AAAA...\",\n \"ssh_user\": \"myuser\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-07-25T15:56:35.317601Z",
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"org_id": "37EEBC20-D8DF-416B-8AC2-01B6EB456318",
"repositories": [
{
"git_hook_ttl": 1000,
"git_password": "mypassword",
"git_url": "https://github.com/myorg/myrepo",
"git_user": "myusername",
"repository": "github.com/myorg/myrepo",
"ssh_key": "-----BEGIN PRIVATE KEY-----...",
"ssh_keypass": "mykeypassphrase",
"ssh_known_hosts": "github.com ssh-rsa AAAA...",
"ssh_user": "myuser"
}
],
"updated_at": "2024-07-25T15:56:35.317601Z"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Body
Runbook Repository Configuration
Git repository URL where the runbook is located
"https://github.com/myorg/myrepo"
Enables runbook hooks when this value is greater than zero
1000
Git password or token for repository authentication
"mypassword"
Git username for repository authentication
"myusername"
SSH private key for Git repository authentication
"-----BEGIN PRIVATE KEY-----..."
SSH key passphrase for encrypted SSH keys
"mykeypassphrase"
Git SSH known hosts for host key verification
"github.com ssh-rsa AAAA..."
SSH username for Git repository authentication
"myuser"
Response
OK
The time the resource was created
"2024-07-25T15:56:35.317601Z"
The unique identifier of the runbook
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7"
Organization ID that owns this configuration
"37EEBC20-D8DF-416B-8AC2-01B6EB456318"
The runbook repository configuration
Show child attributes
Show child attributes
The time the resource was updated
"2024-07-25T15:56:35.317601Z"
Was this page helpful?