curl --request GET \
--url https://app.trelica.com/api/people/v1 \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trelica.com/api/people/v1"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trelica.com/api/people/v1")
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{
"next": "https://app.trelica.com/api/people/v1?after=eyJpZCI6IjEyM2U0NTY3ZTg5YjEyZDMifQ&limit=100",
"results": [
{
"id": "123e4567e89b12d3a456426614174000",
"employeeType": "Part-time",
"personType": "Employee",
"aliases": [
"john.doe@example.com",
"john@example.com",
"j.doe@example.com",
"johnny.d@example.com"
],
"userName": "johndoe123",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"jobTitle": "Customer Success Manager",
"organizationalUnit": "/",
"loginName": "johndoe",
"employeeId": "123",
"status": "Active",
"lineManager": {
"id": "765e4321b98e21d3b456426614174000",
"personType": "User",
"name": "Jane Smith",
"email": "jane.smith@example.com"
},
"teams": [
{
"id": "65207c3ffa0d2abb07955316",
"name": "Customer Success"
}
],
"createdBy": {
"userId": "321cba98-765e-4321-0d3b-456789abcdef",
"name": "System",
"email": "admin@example.com"
},
"createdDtm": "2020-03-09T06:09:26Z",
"lastModifiedBy": {
"userId": "321cba98-765e-4321-0d3b-456789abcdef",
"name": "System",
"email": "admin@example.com"
},
"lastModifiedDtm": "2024-05-26T01:01:43Z"
}
]
}{
"type": "about:blank",
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "The request body failed validation. See errors for the offending fields.",
"errors": {
"email": [
"The email field is required."
]
},
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
}List people
Returns a paginated list of the people in your organization. Use filter and
q to narrow the results, and follow the next link (also provided in the
link response header) to page through large result sets.
Required scope: People.Read (Read-only access to people and teams)
curl --request GET \
--url https://app.trelica.com/api/people/v1 \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trelica.com/api/people/v1"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trelica.com/api/people/v1")
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{
"next": "https://app.trelica.com/api/people/v1?after=eyJpZCI6IjEyM2U0NTY3ZTg5YjEyZDMifQ&limit=100",
"results": [
{
"id": "123e4567e89b12d3a456426614174000",
"employeeType": "Part-time",
"personType": "Employee",
"aliases": [
"john.doe@example.com",
"john@example.com",
"j.doe@example.com",
"johnny.d@example.com"
],
"userName": "johndoe123",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"jobTitle": "Customer Success Manager",
"organizationalUnit": "/",
"loginName": "johndoe",
"employeeId": "123",
"status": "Active",
"lineManager": {
"id": "765e4321b98e21d3b456426614174000",
"personType": "User",
"name": "Jane Smith",
"email": "jane.smith@example.com"
},
"teams": [
{
"id": "65207c3ffa0d2abb07955316",
"name": "Customer Success"
}
],
"createdBy": {
"userId": "321cba98-765e-4321-0d3b-456789abcdef",
"name": "System",
"email": "admin@example.com"
},
"createdDtm": "2020-03-09T06:09:26Z",
"lastModifiedBy": {
"userId": "321cba98-765e-4321-0d3b-456789abcdef",
"name": "System",
"email": "admin@example.com"
},
"lastModifiedDtm": "2024-05-26T01:01:43Z"
}
]
}{
"type": "about:blank",
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "The request body failed validation. See errors for the offending fields.",
"errors": {
"email": [
"The email field is required."
]
},
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
}Authorizations
OAuth 2.0. Obtain an access token via the Client Credentials or Authorization Code flow, then send it as Authorization: Bearer <token>.
Query Parameters
A SCIM-style filter expression restricting the items returned. See the Filtering section of the introduction for the operators and syntax; the filterable fields are listed per resource.
Filterable fields
- string:
aliases,costCenter,costCenterId,createdBy.email,createdBy.name,createdBy.userId,email,employeeId,firstName,id,jobTitle,lastModifiedBy.email,lastModifiedBy.name,lastModifiedBy.userId,lastName,location,locationCountryCode,locationId,locationTimezone,loginName,organizationalUnit,personType,personalAddress.city,personalAddress.countryCode,personalAddress.stateOrProvince,personalAddress.streetAddress1,personalAddress.streetAddress2,personalAddress.zipOrPostalCode,phoneNumber,status,teams[id],teams[name],timezone - date:
createdDtm,lastModifiedDtm,leavingDate,startDate - custom fields:
customFields.<name>
Filter examples
email eq "john.doe@example.com"— The person with this email addressfirstName sw "Jan"— People whose first name starts with "Jan"teams[name eq "Developers"]— People in the Developers teamnot (leavingDate pr)— People with no leaving datestatus eq "Active" and lastModifiedDtm ge "2024-01-01"— Active people modified on or after 1 Jan 2024
Free-text search across the resource's displayable fields.
Only return items modified at or after this ISO-8601 timestamp.
Only return items modified at or before this ISO-8601 timestamp.
Opaque pagination cursor supplied by SaaS Manager via the link response header and the next field.
Maximum number of items to return per page (default 100, maximum 1000).
1 <= x <= 1000Was this page helpful?