API Docs
HomeDocsWebsite
  • Home
  • Introduction
    • Authorization
      • Authorize
      • Get a Token
      • Third-Party Login
    • Field Types and Validation
      • Field Types
      • Validation
    • Query Manipulation
      • Constraints
      • Result Control
      • Value Filters
    • Entity Permissions
      • Restricted Scope
  • API reference
    • Infoboard
      • InfoboardChannels
      • InfoboardPosts
      • InfoboardPostSeenUsers
      • InfoboardPostReadUsers
      • InfoboardComments
      • InfoboardDepartmentSettings
    • Manual
      • ManualChapters
      • ManualEntries
      • ManualEntrySeenUsers
    • Calendar
      • Calendars
      • CalendarEvents
    • Filemanager
      • FilemanagerDirectories
      • FilemanagerFiles
    • Files
    • Forms
      • Forms
      • FormFields
      • FormFieldTypes
      • FormFieldValidations
      • FormFieldValidationTypes
      • FormMessages
      • FormMessageFields
    • Layouts
      • Layouts
      • LayoutRows
      • LayoutColumns
      • LayoutColumnLayoutElements
    • Tasks 2.0
      • TaskTemplates
      • TaskFields
      • TaskAssignments
      • TaskExecutions
      • TaskProgressFields
    • Departments
    • Roles
    • Permissions
    • Users
    • UserActivities
    • EntityPermissions
    • Notifications
    • Reactions
    • Icons
    • Folders
    • SharedItems
    • UrlContext
  • Resources
    • Release Notes
      • v2.106.0
      • v2.102.0
Powered by GitBook
On this page
  • Introduction
  • Model Definition
  • List
  • Show
  • Show availability information
  • Create
  • Update
  • Delete
  1. API reference

Departments

PreviousTaskProgressFieldsNextRoles

Last updated 8 days ago

Introduction

Departments represent locations or user groups within the customer system and serve as the starting point of the permission system.

They are used to structure organizational units, which are essential for assigning permissions and managing access to content in various modules.

The assignment of content is typically based either on specific or on the associated Department.

Model Definition

Alias

department

Relations

Key
Relation
Type
Relation Field(s)

user

Belongs to

user_id

roles

Has many

roles.department_id

List

Get a list of all Departments.

Definition

GET /api/departments

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/departments', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

[
  {
    "id": 2,
    "name": "Standort 01",
    "user_id": 2,
    "folder_id": null,
    "created_at": "2019-01-15 12:00:00",
    "updated_at": "2019-01-15 12:00:00",
    "deleted_at": null
  },
  {
    "id": 3,
    "name": "Standort 02",
    "user_id": 2,
    "folder_id": null,
    "created_at": "2019-01-15 13:00:00",
    "updated_at": "2019-01-15 13:00:00",
    "deleted_at": null
  }
]

Show

Show a single Department by id.

Definition

GET /api/departments/{id}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/departments/2', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
    "id": 2,
    "name": "Standort 01",
    "user_id": 2,
    "folder_id": null,
    "created_at": "2019-01-15 12:00:00",
    "updated_at": "2019-01-15 12:00:00",
    "deleted_at": null
  },

Show availability information

Show the "availability information" for Departments

Definition

GET /api/departments/availability-information

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/departments/availability-information', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "total_available": 10,
  "available": 8,
  "used": 2
}

Create

Create a new Department.

Definition

POST /api/departments

Request Keys

Key
Type
Default
Description

name *

string

-

The name of the Department.

folder_id

integer

-

Keys with * are required.

The request can fail if the maximum number of Departments is already reached.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/departments', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'name' => 'Standort 03'
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 4,
    "name": "Standort 03",
    "user_id": 2,
    "folder_id": null,
    "created_at": "2019-01-15 14:00:00",
    "updated_at": "2019-01-15 14:00:00",
    "deleted_at": null
  }
}

Update

Update an existing Department by id.

Definition

PUT /api/departments/{id}

Request Keys

Key
Type
Default
Description

name

string

-

The name of the Department.

folder_id

integer

-

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/departments/4', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'name' => 'Standort - 03',
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 4,
    "name": "Standort - 03",
    "user_id": 2,
    "folder_id": null,
    "created_at": "2019-01-15 14:00:00",
    "updated_at": "2019-01-15 14:30:00",
    "deleted_at": null
  }
}

Delete

Delete an existing Department by id.

Definition

DELETE /api/departments/{id}

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/departments/4', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);

Example Response

{
  "status": "success",
  "data": null
}

The ID of the Department is assigned to.

The ID of the Department is assigned to.

Users
User
Roles
Folder
Folder