List a project's environments
curl --request GET \
--url https://codecobra.ai/api/projects/{project_id}/environmentsimport requests
url = "https://codecobra.ai/api/projects/{project_id}/environments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://codecobra.ai/api/projects/{project_id}/environments', 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://codecobra.ai/api/projects/{project_id}/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://codecobra.ai/api/projects/{project_id}/environments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://codecobra.ai/api/projects/{project_id}/environments")
.asString();require 'uri'
require 'net/http'
url = URI("https://codecobra.ai/api/projects/{project_id}/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"can_edit": false,
"can_view_deploys": false,
"environments": [],
"repositories": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Projects
List a project's environments
The project’s environments in the order a change travels, ending at production. For each: the branch it uses in every linked repository, the address of the Odoo that runs it, and, for roles that may merge, who deploys it and how the last deploy went.
GET
/
api
/
projects
/
{project_id}
/
environments
List a project's environments
curl --request GET \
--url https://codecobra.ai/api/projects/{project_id}/environmentsimport requests
url = "https://codecobra.ai/api/projects/{project_id}/environments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://codecobra.ai/api/projects/{project_id}/environments', 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://codecobra.ai/api/projects/{project_id}/environments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://codecobra.ai/api/projects/{project_id}/environments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://codecobra.ai/api/projects/{project_id}/environments")
.asString();require 'uri'
require 'net/http'
url = URI("https://codecobra.ai/api/projects/{project_id}/environments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"can_edit": false,
"can_view_deploys": false,
"environments": [],
"repositories": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}