ManualChapters

Introduction

ManualChapters are a collection of ManualEntries and describe structure and permissions for Manual contents.

Model Definition

Alias

manualChapter

Relations

KeyRelationTypeRelation Field(s)

departments

Belongs to many

Intermediate table

entries

Has many

manual_chapter_entries.chapter_id

Traits

  • Sortable

List

Get a list of all ManualChapters the current authenticated User is allowed to view.

Definition

GET /api/manual/chapters

Example Request

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

Example Response Body

[
  {
    "id": 1,
    "icon_id": 20,
    "name": "Chapter 1",
    "slug": "chapter-1",
    "sort_number": 1,
    "created_at": "2019-01-24 14:07:25",
    "updated_at": "2019-01-24 14:07:25"
  },
  {
    "id": 2,
    "icon_id": 20,
    "name": "Chapter 2",
    "slug": "chapter-2",
    "sort_number": 2,
    "created_at": "2019-01-24 14:08:02",
    "updated_at": "2019-01-24 14:08:02"
  }
]

Show

Show a single ManualChapter by id.

Definition

GET /api/manual/chapters/{id}

Example Request

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

Example Response Body

{
  "id": 1,
  "icon_id": 20,
  "name": "Chapter 1",
  "slug": "chapter-1",
  "sort_number": 1,
  "created_at": "2019-01-24 14:08:02",
  "updated_at": "2019-01-24 14:08:02"
}

[Adm.] List

Get a list of all ManualChapters.

Definition

GET /api/administration/manual/chapters

Example Request

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

Example Response Body

[
  {
    "id": 1,
    "icon_id": 20,
    "name": "Chapter 1",
    "slug": "chapter-1",
    "sort_number": 1,
    "created_at": "2019-01-24 14:07:25",
    "updated_at": "2019-01-24 14:07:25"
  },
  {
    "id": 2,
    "icon_id": 20,
    "name": "Chapter 2",
    "slug": "chapter-2",
    "sort_number": 2,
    "created_at": "2019-01-24 14:08:02",
    "updated_at": "2019-01-24 14:08:02"
  }
]

[Adm.] Get

Get a single ManualChapter by id.

Definition

GET /api/administration/manual/chapters/{id}

Example Request

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

Example Response Body

{
  "id": 1,
  "icon_id": 20,
  "name": "Chapter 1",
  "slug": "chapter-1",
  "sort_number": 1,
  "created_at": "2019-01-24 14:08:02",
  "updated_at": "2019-01-24 14:08:02"
}

[Adm.] Create

Create a new ManualChapter.

Definition

POST /api/administration/manual/chapters

Request Keys

KeyTypeDefaultDescription

icon_id

integer

20

The Icon of the ManualChapter.

name*

string

-

The name of the ManualChapter (unique by all ManualChapters).

slug

string

Slugged name

The slugged name of the ManualChapter (unique by all ManualChapters).

sort_number

integer

Current highest +1

The index of the ManualChapter.

department_ids

string

-

The Departments that are allowed to see the ManualChapter (seperated by comma). When empty, the ManualChapter will be public.

Keys with * are required.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/administration/manual/chapters', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'name' => 'Chapter 3',
        'department_ids' => '2,3'
    ]
]);

Example Response Body

{
  "status": "success",
  "data": {
    "name": "Chapter 3",
    "icon_id": 20,
    "slug": "chapter-3",
    "sort_number": 3,
    "updated_at": "2019-01-25 15:13:21",
    "created_at": "2019-01-25 15:13:21",
    "id": 3
  }
}

[Adm.] Update

Update an existing ManualChapter by id.

Definition

PUT /api/administration/manual/chapters/{id}

Request Keys

KeyTypeDescription

icon_id

integer

The Icon of the ManualChapter.

name

string

The name of the ManualChapter (unique by all ManualChapters).

slug

string

The slugged name of the ManualChapter (unique by all ManualChapters).

sort_number

integer

The index of the ManualChapter.

department_ids

string

The Departments that are allowed to see the ManualChapter (seperated by comma). When empty, the ManualChapter will be public.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/administration/manual/chapters/3', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'name' => 'Chapter3',
        'sort_number' => 1
    ]
]);

Example Response Body

{
  "status": "success",
  "data": {
    "name": "Chapter3",
    "icon_id": 20,
    "slug": "chapter3",
    "sort_number": 1,
    "updated_at": "2019-01-25 15:13:21",
    "created_at": "2019-01-25 15:22:46",
    "id": 3
  }
}

[Adm.] Delete

Delete an existing ManualChapter by id.

Definition

DELETE /api/administration/manual/chapters/{id}

Example Request

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

Example Response Body

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

Last updated