cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/settings/departments/dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.departments.get_settings_department(
"dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b"
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.departments.getSettingsDepartment('dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->departments->getSettingsDepartment('dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.departments.departments_dto.DepartmentsDto.SettingsDepartment;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<SettingsDepartment> response = client.departments().getSettingsDepartment(
"dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Departments.GetSettingsDepartmentAsync("dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.departments.getSettingsDepartment(
'dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b',
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Departments().GetSettingsDepartment(context.Background(), "dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"department": {
"code": "<string>",
"created_by": null,
"created_on": "<string>",
"description": "<string>",
"display_name": "<string>",
"division": {
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"href": "<string>",
"id": "<string>",
"last_updated_by": null,
"last_updated_on": "<string>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"version": 123
}
}Departments
Retrieve a department
Retrieves one department by its dept_ id.
GET
/
settings
/
departments
/
{department_id}
cURL
curl -X GET "$EXSITED_BASE_URL/api/v4/settings/departments/dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b" \
-H "Authorization: Bearer $ACCESS_TOKEN"from exsited import build_client
client = build_client()
response = client.departments.get_settings_department(
"dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b"
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.departments.getSettingsDepartment('dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b');
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->departments->getSettingsDepartment('dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b');
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.departments.departments_dto.DepartmentsDto.SettingsDepartment;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<SettingsDepartment> response = client.departments().getSettingsDepartment(
"dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b");
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Departments.GetSettingsDepartmentAsync("dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b");
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.departments.getSettingsDepartment(
'dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b',
);
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Departments().GetSettingsDepartment(context.Background(), "dept_3c9e1f2a7b4d4e8f9a0b1c2d3e4f5a6b", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"department": {
"code": "<string>",
"created_by": null,
"created_on": "<string>",
"description": "<string>",
"display_name": "<string>",
"division": {
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"href": "<string>",
"id": "<string>",
"last_updated_by": null,
"last_updated_on": "<string>",
"name": "<string>",
"object": "<string>",
"status": "<string>",
"version": 123
}
}Returns the department under
department. Use the id from the department list; a department whose id is null in the list cannot be read this way.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Path Parameters
The department's id, which starts with dept_.
Response
200 - application/json
The department, under department.
Show child attributes
Show child attributes