Actualizar un equipo
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"
}Equipos
Actualizar un equipo
Actualiza los campos del equipo que se indiquen. Las listas de selectores reemplazan sus valores actuales; omite un campo para dejarlo sin cambios. Requiere el permiso user_management.change_content_access.
PATCH
/
teams
/
{team_id}
Actualizar un equipo
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"
}Autorizaciones
CorgeaTokenBearerAuth
Clave de API para la autenticación Se rechazan los tokens de API de usuarios inactivos.
Parámetros de ruta
ID del equipo
Cuerpo
application/json
Reemplaza todos los miembros del equipo.
Reemplaza todas las asignaciones explícitas de proyectos.
Reemplaza todos los selectores de etiquetas de proyecto.
Reemplaza todos los selectores de fragmentos de URL del repositorio.
Minimum string length:
3Respuesta
Equipo actualizado correctamente
Show child attributes
Show child attributes
¿Esta página le ayudó?
