List roles
curl --request GET \
--url https://codecobra.ai/api/organizations/{org_id}/rolesimport requests
url = "https://codecobra.ai/api/organizations/{org_id}/roles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://codecobra.ai/api/organizations/{org_id}/roles', 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/organizations/{org_id}/roles",
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/organizations/{org_id}/roles"
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/organizations/{org_id}/roles")
.asString();require 'uri'
require 'net/http'
url = URI("https://codecobra.ai/api/organizations/{org_id}/roles")
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[
{
"billing_access": true,
"code_access": "<string>",
"delete_projects": true,
"is_builtin": true,
"key": "<string>",
"locked": true,
"manage_connections": true,
"manage_members": true,
"manage_projects": true,
"manage_roles": true,
"name": "<string>",
"odoo_max_tier": "<string>",
"usage_access": true,
"can_assign": false,
"can_delete": false,
"can_edit": false,
"can_move": false,
"color": "slate",
"delete_blocked_reason": "<string>",
"member_count": 0
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Members & Invitations
List roles
The workspace’s roles and what each allows: billing (owner only), seeing usage, the most its people may do in connected Odoo, sharing Odoo connections, how far they may go with code, and whether it manages roles and people. Any member can read them.
GET
/
api
/
organizations
/
{org_id}
/
roles
List roles
curl --request GET \
--url https://codecobra.ai/api/organizations/{org_id}/rolesimport requests
url = "https://codecobra.ai/api/organizations/{org_id}/roles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://codecobra.ai/api/organizations/{org_id}/roles', 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/organizations/{org_id}/roles",
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/organizations/{org_id}/roles"
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/organizations/{org_id}/roles")
.asString();require 'uri'
require 'net/http'
url = URI("https://codecobra.ai/api/organizations/{org_id}/roles")
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[
{
"billing_access": true,
"code_access": "<string>",
"delete_projects": true,
"is_builtin": true,
"key": "<string>",
"locked": true,
"manage_connections": true,
"manage_members": true,
"manage_projects": true,
"manage_roles": true,
"name": "<string>",
"odoo_max_tier": "<string>",
"usage_access": true,
"can_assign": false,
"can_delete": false,
"can_edit": false,
"can_move": false,
"color": "slate",
"delete_blocked_reason": "<string>",
"member_count": 0
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Path Parameters
Response
Successful Response