List teams
curl --request GET \
--url https://app.trelica.com/api/people/v1/teams/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trelica.com/api/people/v1/teams/list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trelica.com/api/people/v1/teams/list', 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://app.trelica.com/api/people/v1/teams/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.trelica.com/api/people/v1/teams/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.trelica.com/api/people/v1/teams/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trelica.com/api/people/v1/teams/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "65207c3ffa0d2abb07955307",
"name": "Engineering"
},
{
"parentId": "65207c3ffa0d2abb07955307",
"id": "65207c3ffa0d2abb07955309",
"name": "Development"
},
{
"parentId": "65207c3ffa0d2abb07955307",
"id": "65207c3ffa0d2abb07955308",
"name": "DevOps"
},
{
"id": "65207c3ffa0d2abb0795530a",
"name": "Finance"
},
{
"parentId": "65207c3ffa0d2abb0795530a",
"id": "65207c3ffa0d2abb0795530b",
"name": "Accounts Payable"
},
{
"id": "65207c3ffa0d2abb0795530e",
"name": "HR"
},
{
"id": "65207c3ffa0d2abb07955313",
"name": "Sales"
},
{
"parentId": "65207c3ffa0d2abb07955313",
"id": "65207c3ffa0d2abb07955314",
"name": "Technical Pre-sales"
}
]Teams
List teams
Returns all teams as a flat list; each entry carries its parent team ID (if any).
Required scope: People.Read (Read-only access to people and teams)
GET
/
api
/
people
/
v1
/
teams
/
list
List teams
curl --request GET \
--url https://app.trelica.com/api/people/v1/teams/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trelica.com/api/people/v1/teams/list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trelica.com/api/people/v1/teams/list', 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://app.trelica.com/api/people/v1/teams/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.trelica.com/api/people/v1/teams/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.trelica.com/api/people/v1/teams/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trelica.com/api/people/v1/teams/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "65207c3ffa0d2abb07955307",
"name": "Engineering"
},
{
"parentId": "65207c3ffa0d2abb07955307",
"id": "65207c3ffa0d2abb07955309",
"name": "Development"
},
{
"parentId": "65207c3ffa0d2abb07955307",
"id": "65207c3ffa0d2abb07955308",
"name": "DevOps"
},
{
"id": "65207c3ffa0d2abb0795530a",
"name": "Finance"
},
{
"parentId": "65207c3ffa0d2abb0795530a",
"id": "65207c3ffa0d2abb0795530b",
"name": "Accounts Payable"
},
{
"id": "65207c3ffa0d2abb0795530e",
"name": "HR"
},
{
"id": "65207c3ffa0d2abb07955313",
"name": "Sales"
},
{
"parentId": "65207c3ffa0d2abb07955313",
"id": "65207c3ffa0d2abb07955314",
"name": "Technical Pre-sales"
}
]Authorizations
OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.
Was this page helpful?
⌘I