Departments
11 endpoints
POST /api/v5/artifacts/departments/get
Get Department
Get department information using the canonical shared department operation.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
department_id?: `string` | `null`
draft_id?: `string` | `null`
}Response:
{
actor_name?: `string` | `null`
department_exists?: `boolean` | `null`
can_edit?: `boolean` | `null`
disabled_reason?: `string` | `null`
draft_version?: `integer` | `null`
group_id?: `string` | `null`
basic_show_ai_generate?: `boolean` | `null`
names?: `DepartmentNameSection` | `null`
descriptions?: `DepartmentDescriptionSection` | `null`
flags?: `DepartmentFlagSection` | `null`
settings?: `DepartmentSettingSection` | `null`
}POST /api/v5/artifacts/departments/search
Search Department
Search departments — composable infra architecture.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
search?: `string` | `null`
page_size?: `integer` | `null`
page_offset?: `integer` | `null`
}Response:
{
actor_name?: `string` | `null`
departments?: `ListDepartmentApiDepartment`[] | `null`
total_count?: `integer` | `null`
}POST /api/v5/artifacts/departments/create
Create Department
Create departments using composable infra architecture.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
departments: `CreateDepartmentItem`[]
}Response:
{
results: `DepartmentResultItem`[]
}POST /api/v5/artifacts/departments/update
Update Department
Update departments using composable infra architecture.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
departments: `UpdateDepartmentItem`[]
}Response:
{
results: `DepartmentResultItem`[]
}POST /api/v5/artifacts/departments/duplicate
Duplicate Department
Duplicate a department — composable infra architecture.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
department_id: `string`
}Response:
{
success: `boolean`
department_id: `string`
message: `string`
}POST /api/v5/artifacts/departments/delete
Delete Department
Bulk delete departments — composable infra architecture.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
department_ids: `string`[]
}Response:
{
results: `DeleteDepartmentResult`[]
}PATCH /api/v5/artifacts/departments/draft
Patch Department Draft
Patch department draft — composable infra architecture.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
input_draft_id?: `string` | `null`
expected_version?: `integer`
name?: `string` | `null`
name_id?: `string` | `null`
description?: `string` | `null`
description_id?: `string` | `null`
flag_id?: `string` | `null`
setting_ids?: `string`[] | `null`
}Response:
{
success: `boolean`
draft_id: `string`
new_version: `integer`
message: `string`
form_state?: `DepartmentDraftFormState` | `null`
}POST /api/v5/artifacts/departments/drafts
Get Department Drafts
List department drafts owned by the current profile.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Response:
{
entries?: `GetDepartmentDraftResponse`[] | `null`
}POST /api/v5/artifacts/departments/docs
Get Department Docs Endpoint
Get composed documentation for the department artifact.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
entity_id?: `string` | `null`
}Response:
{
name: `string`
type: `string`
description: `string`
artifact?: `DocsResponse` | `null`
entries: `DocsResponse`[]
resources: `DocsResponse`[]
permissions: `OperationInfo`[]
api_operations: `OperationInfo`[]
page_metadata?: `DocsApiResponse` | `null`
}POST /api/v5/artifacts/departments/export
Export Departments
Export all departments as a clean, denormalized CSV.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Request body:
{
department_id?: `string` | `null`
}Response:
{
upload_id: `string`
file_name: `string`
row_count: `integer`
}POST /api/v5/artifacts/departments/refresh
Department Refresh
Refresh department materialized views and invalidate caches.
Parameters:
| Name | In | Required | Description |
|---|---|---|---|
X-Api-Key | header | No | — |
authorization | header | No | — |
X-MCP | header | No | — |
Response:
{
success: `boolean`
refreshed_views: `string`[]
invalidated_tags: `string`[]
}