Get employee group
Returns a single employee group by its ID. Returns 403 when the authenticated user is not an administrator of the organization. Returns 404 when the employee group does not exist, or belongs to a different organization.
curl --request GET \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}"
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/{employeeGroupId}', 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/{employeeGroupId}",
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/{employeeGroupId}"
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/{employeeGroupId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}")
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": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team",
"isDefault": false
}{
"result": "error",
"description": "Permission denied"
}{
"result": "error",
"code": "EMPLOYEE_GROUP_NOT_FOUND",
"description": "Employee group not found"
}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"
String (32-character hex string). The internal ID of the employee group to retrieve, as returned in the id field of the list, create, and update responses.
"3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c"
Response
OK
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/{employeeGroupId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}"
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/{employeeGroupId}', 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/{employeeGroupId}",
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/{employeeGroupId}"
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/{employeeGroupId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/employeegroups/{employeeGroupId}")
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": "3f2a9c1b8e7d4a6f9b0c1d2e3f4a5b6c",
"name": "Sales Team",
"isDefault": false
}{
"result": "error",
"description": "Permission denied"
}{
"result": "error",
"code": "EMPLOYEE_GROUP_NOT_FOUND",
"description": "Employee group not found"
}
