Mettre à jour une équipe
curl --request PATCH \
--url https://www.corgea.app/api/v1/teams/{team_id} \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"member_ids": [
123
],
"project_ids": [
123
],
"project_tags": [
"<string>"
],
"repo_url_patterns": [
"<string>"
]
}
'import requests
url = "https://www.corgea.app/api/v1/teams/{team_id}"
payload = {
"name": "<string>",
"member_ids": [123],
"project_ids": [123],
"project_tags": ["<string>"],
"repo_url_patterns": ["<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({
name: '<string>',
member_ids: [123],
project_ids: [123],
project_tags: ['<string>'],
repo_url_patterns: ['<string>']
})
};
fetch('https://www.corgea.app/api/v1/teams/{team_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://www.corgea.app/api/v1/teams/{team_id}",
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([
'name' => '<string>',
'member_ids' => [
123
],
'project_ids' => [
123
],
'project_tags' => [
'<string>'
],
'repo_url_patterns' => [
'<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/teams/{team_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"member_ids\": [\n 123\n ],\n \"project_ids\": [\n 123\n ],\n \"project_tags\": [\n \"<string>\"\n ],\n \"repo_url_patterns\": [\n \"<string>\"\n ]\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/teams/{team_id}")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"member_ids\": [\n 123\n ],\n \"project_ids\": [\n 123\n ],\n \"project_tags\": [\n \"<string>\"\n ],\n \"repo_url_patterns\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/teams/{team_id}")
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 \"name\": \"<string>\",\n \"member_ids\": [\n 123\n ],\n \"project_ids\": [\n 123\n ],\n \"project_tags\": [\n \"<string>\"\n ],\n \"repo_url_patterns\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"team": {
"id": 123,
"name": "<string>",
"active": true,
"members": [
{
"id": 123,
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
],
"project_ids": [
123
],
"project_tags": [
"<string>"
],
"repo_url_patterns": [
"<string>"
],
"project_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Invalid JSON body"
}{
"error": "Missing or invalid authorization header"
}{
"error": "Permission denied"
}Équipes
Mettre à jour une équipe
Met à jour les champs fournis de l’équipe. Les listes de sélecteurs remplacent leurs valeurs actuelles ; omettez un champ pour le laisser inchangé. Nécessite l’autorisation user_management.change_content_access.
PATCH
/
teams
/
{team_id}
Mettre à jour une équipe
curl --request PATCH \
--url https://www.corgea.app/api/v1/teams/{team_id} \
--header 'CORGEA-TOKEN: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"member_ids": [
123
],
"project_ids": [
123
],
"project_tags": [
"<string>"
],
"repo_url_patterns": [
"<string>"
]
}
'import requests
url = "https://www.corgea.app/api/v1/teams/{team_id}"
payload = {
"name": "<string>",
"member_ids": [123],
"project_ids": [123],
"project_tags": ["<string>"],
"repo_url_patterns": ["<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({
name: '<string>',
member_ids: [123],
project_ids: [123],
project_tags: ['<string>'],
repo_url_patterns: ['<string>']
})
};
fetch('https://www.corgea.app/api/v1/teams/{team_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://www.corgea.app/api/v1/teams/{team_id}",
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([
'name' => '<string>',
'member_ids' => [
123
],
'project_ids' => [
123
],
'project_tags' => [
'<string>'
],
'repo_url_patterns' => [
'<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/teams/{team_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"member_ids\": [\n 123\n ],\n \"project_ids\": [\n 123\n ],\n \"project_tags\": [\n \"<string>\"\n ],\n \"repo_url_patterns\": [\n \"<string>\"\n ]\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/teams/{team_id}")
.header("CORGEA-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"member_ids\": [\n 123\n ],\n \"project_ids\": [\n 123\n ],\n \"project_tags\": [\n \"<string>\"\n ],\n \"repo_url_patterns\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.corgea.app/api/v1/teams/{team_id}")
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 \"name\": \"<string>\",\n \"member_ids\": [\n 123\n ],\n \"project_ids\": [\n 123\n ],\n \"project_tags\": [\n \"<string>\"\n ],\n \"repo_url_patterns\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"team": {
"id": 123,
"name": "<string>",
"active": true,
"members": [
{
"id": 123,
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>"
}
],
"project_ids": [
123
],
"project_tags": [
"<string>"
],
"repo_url_patterns": [
"<string>"
],
"project_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Invalid JSON body"
}{
"error": "Missing or invalid authorization header"
}{
"error": "Permission denied"
}Autorisations
CorgeaTokenBearerAuth
Clé API pour l'authentification Les jetons API des utilisateurs inactifs sont refusés.
Paramètres de chemin
ID de l’équipe
Corps
application/json
Remplace tous les membres de l’équipe.
Remplace toutes les affectations explicites de projets.
Remplace tous les sélecteurs de tags de projet.
Remplace tous les sélecteurs de fragments d’URL de dépôt.
Minimum string length:
3Réponse
Équipe mise à jour avec succès
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?
