List employee groups
Returns the employee groups belonging to the given organization. This endpoint is not paginated and does not support client-controlled sorting — every group belonging to the organization is returned in a single response, always sorted by name in ascending order. Returns 403 when the authenticated user is not an administrator of the organization.
curl --request GET \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups', 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups",
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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups"
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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups")
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{
"meta": {
"count": 2,
"total": 2
},
"data": [
{
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team",
"isDefault": false
},
{
"id": "7b1e4d2a9c8f3e6b5a0d1c2f4e6a8b0d",
"name": "Head Office",
"isDefault": true
}
]
}{
"result": "error",
"description": "Permission denied"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
String. The organization's internal ID (32-character hex string).
"11adfe2a080040e3892ffb89c21ec44e"
Response
OK
Hide child attributes
Hide child attributes
Unique internal identifier of the employee group.
Display name of the employee group.
Whether this is the organization's default employee group. When the organization uses employee groups, users newly added to the organization are automatically assigned to the default group, when one is set. Existing users are not moved to the group when it is set as default. At most one group per organization can be the default at a time.
curl --request GET \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups', 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups",
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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups"
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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups")
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{
"meta": {
"count": 2,
"total": 2
},
"data": [
{
"id": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team",
"isDefault": false
},
{
"id": "7b1e4d2a9c8f3e6b5a0d1c2f4e6a8b0d",
"name": "Head Office",
"isDefault": true
}
]
}{
"result": "error",
"description": "Permission denied"
}
