Mettre à jour une intégration Harness
curl --request PATCH \
--url https://www.corgea.app/api/v1/integrations/harness/{integration_uuid} \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"secure_token": "<string>",
"name": "<string>",
"org_allowlist": [
"<string>"
],
"base_url": "<string>",
"gateway_prefix": "<string>"
}
'import requests
url = "https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}"
payload = {
"secure_token": "<string>",
"name": "<string>",
"org_allowlist": ["<string>"],
"base_url": "<string>",
"gateway_prefix": "<string>"
}
headers = {
"CORGEA-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'CORGEA-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
secure_token: '<string>',
name: '<string>',
org_allowlist: ['<string>'],
base_url: '<string>',
gateway_prefix: '<string>'
})
};
fetch('https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}', 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://www.corgea.app/api/v1/integrations/harness/{integration_uuid}",
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([
'secure_token' => '<string>',
'name' => '<string>',
'org_allowlist' => [
'<string>'
],
'base_url' => '<string>',
'gateway_prefix' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"CORGEA-TOKEN: <api-key>",
"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://www.corgea.app/api/v1/integrations/harness/{integration_uuid}"
payload := strings.NewReader("{\n \"secure_token\": \"<string>\",\n \"name\": \"<string>\",\n \"org_allowlist\": [\n \"<string>\"\n ],\n \"base_url\": \"<string>\",\n \"gateway_prefix\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("CORGEA-TOKEN", "<api-key>")
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("https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"secure_token\": \"<string>\",\n \"name\": \"<string>\",\n \"org_allowlist\": [\n \"<string>\"\n ],\n \"base_url\": \"<string>\",\n \"gateway_prefix\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["CORGEA-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"secure_token\": \"<string>\",\n \"name\": \"<string>\",\n \"org_allowlist\": [\n \"<string>\"\n ],\n \"base_url\": \"<string>\",\n \"gateway_prefix\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"integration": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "harness",
"name": "<string>",
"account_id": "<string>",
"account_name": "<string>",
"org_allowlist": [
"<string>"
],
"base_url": "<string>",
"gateway_prefix": "<string>",
"expired": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"credentials_verified": true
}{
"error": "Missing or invalid authorization header"
}Intégrations Harness
Mettre à jour une intégration Harness
Met à jour les champs sélectionnés. La modification du jeton, de l’URL de base ou du préfixe de la passerelle revérifie les informations d’identification. Un jeton de remplacement doit appartenir au compte Harness existant. Nécessite l’autorisation integrations.manage_integration.
PATCH
/
integrations
/
harness
/
{integration_uuid}
Mettre à jour une intégration Harness
curl --request PATCH \
--url https://www.corgea.app/api/v1/integrations/harness/{integration_uuid} \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"secure_token": "<string>",
"name": "<string>",
"org_allowlist": [
"<string>"
],
"base_url": "<string>",
"gateway_prefix": "<string>"
}
'import requests
url = "https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}"
payload = {
"secure_token": "<string>",
"name": "<string>",
"org_allowlist": ["<string>"],
"base_url": "<string>",
"gateway_prefix": "<string>"
}
headers = {
"CORGEA-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'CORGEA-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
secure_token: '<string>',
name: '<string>',
org_allowlist: ['<string>'],
base_url: '<string>',
gateway_prefix: '<string>'
})
};
fetch('https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}', 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://www.corgea.app/api/v1/integrations/harness/{integration_uuid}",
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([
'secure_token' => '<string>',
'name' => '<string>',
'org_allowlist' => [
'<string>'
],
'base_url' => '<string>',
'gateway_prefix' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"CORGEA-TOKEN: <api-key>",
"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://www.corgea.app/api/v1/integrations/harness/{integration_uuid}"
payload := strings.NewReader("{\n \"secure_token\": \"<string>\",\n \"name\": \"<string>\",\n \"org_allowlist\": [\n \"<string>\"\n ],\n \"base_url\": \"<string>\",\n \"gateway_prefix\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("CORGEA-TOKEN", "<api-key>")
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("https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"secure_token\": \"<string>\",\n \"name\": \"<string>\",\n \"org_allowlist\": [\n \"<string>\"\n ],\n \"base_url\": \"<string>\",\n \"gateway_prefix\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/integrations/harness/{integration_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["CORGEA-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"secure_token\": \"<string>\",\n \"name\": \"<string>\",\n \"org_allowlist\": [\n \"<string>\"\n ],\n \"base_url\": \"<string>\",\n \"gateway_prefix\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"integration": {
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "harness",
"name": "<string>",
"account_id": "<string>",
"account_name": "<string>",
"org_allowlist": [
"<string>"
],
"base_url": "<string>",
"gateway_prefix": "<string>",
"expired": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"credentials_verified": true
}{
"error": "Missing or invalid authorization header"
}Autorisations
CorgeaTokenBearerAuth
Clé API pour l'authentification
Paramètres de chemin
UUID de l’intégration Harness
Corps
application/json
Réponse
Intégration Harness mise à jour avec succès
Cette page vous a-t-elle été utile ?
⌘I
