ManualChapterEntries

Introduction

ManualChapterEntries are the content of a ManualChapter.

Model & Relations

Namespace

Modules\Manual\Entities\ManualChapter

Relations

Relation Key Type Relation Field(s)
User user Belongs to user_id
ManualChapter chapter Belongs to chapter_id
ManualChapterSeenUsers seenUsers Has many manual_chapter_seen_users.entry_id
Notifications notifications Has many notifications.event_id, notifications.event_source

Computed Properties

  • hash - The hashed id of the ManualChapterEntry
  • seen - Wether the ManualChapterEntry is seen by the current authenticated User

Traits

  • Sortable
  • TriggersNotifications

List

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

Definition

GET /api/manual/chapters/entries

Example Request

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

Example Response Body

[
  {
    "id": 1,
    "user_id": 3,
    "chapter_id": 1,
    "title": "Entry 1",
    "slug": "entry-1",
    "text": "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>\n<p><br></p>\n<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>",
    "sort_number": 1,
    "created_at": "2019-01-22 09:00:11",
    "updated_at": "2019-01-22 09:00:11",
    "hash": "zn7m24owk63qolxryge8pj05",
    "seen": false
  },
  {
    "id": 2,
    "user_id": 3,
    "chapter_id": 2,
    "title": "Entry 2",
    "slug": "entry-2",
    "text": "<ul>\n<li>Sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </li>\n<li>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </li>\n<li>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </li>\n</ul>",
    "sort_number": 2,
    "created_at": "2019-01-22 09:00:55",
    "updated_at": "2019-01-22 09:00:55",
    "hash": "6o8m0kz5yw10x1pr9e4vxj27",
    "seen": false
  }
]

List by Chapter

Get a list of all ManualChapterEntries the current authenticated User is allowed to view by ManualChapter.

Definition

GET /api/manual/chapters/{chapterId}/entries

Example Request

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

Example Response Body

[
  {
    "id": 1,
    "user_id": 3,
    "chapter_id": 1,
    "title": "Entry 1",
    "slug": "entry-1",
    "text": "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>\n<p><br></p>\n<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>",
    "sort_number": 1,
    "created_at": "2019-01-22 09:00:11",
    "updated_at": "2019-01-22 09:00:11",
    "hash": "zn7m24owk63qolxryge8pj05",
    "seen": false
  }
]

Count

Get the count of all ManualChapterEntries the current authenticated User is allowed to view.

Definition

GET /manual/chapters/entries/count

Example Request

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

Example Response Body

2

Count by Chapter

Get the count of all ManualChapterEntries the current authenticated User is allowed to view by ManualChapter.

Definition

GET /api/manual/chapters/{chapterId}/entries/count

Example Request

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

Example Response Body

1

Get

Get a single ManualChapterEntry by id or hash.

Definition

GET /api/manual/chapters/entries/{idOrHash}

Example Request

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

Example Response Body

{
  "id": 1,
  "user_id": 3,
  "chapter_id": 1,
  "title": "Entry 1",
  "slug": "entry-1",
  "text": "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>\n<p><br></p>\n<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>",
  "sort_number": 1,
  "created_at": "2019-01-22 09:00:11",
  "updated_at": "2019-01-22 09:00:11",
  "hash": "zn7m24owk63qolxryge8pj05",
  "seen": false
}

Create

Create a new ManualChapterEntry by ManualChapter.

Definition

GET /api/manual/chapters/{chapterId}/entries

Request Keys

Key Type Default Description
user_id * integer - The related User
chapter_id ** integer - The related ManualChapter
title * string - The title of the ManualChapterEntry
slug string Slugged title The slugged title of the ManualChapterEntry (unique by ManualChapter)
text * string - The text of the ManualChapterEntry
sort_number integer Current highest +1 The index of the ManualChapterEntry related to the ManualChapter

Keys with * are required.
Keys with ** are normalized to the information given by the route.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/manual/chapters/1/entries', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'user_id' => 3,
        'chapter_id' => 1,
        'title' => 'Entry 3',
        'text' => '<p>Quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>'
    ]
]);

Example Response Body

{
  "status": "success",
  "data": {
    "user_id": 3,
    "chapter_id": 1,
    "title": "Entry 3",
    "text": "<p>Quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>",
    "slug": "entry-3",
    "sort_number": 3,
    "updated_at": "2019-01-25 16:56:34",
    "created_at": "2019-01-25 16:56:34",
    "id": 3,
    "hash": "d54q7g6wnj1eylm8k9e0xpz2",
    "seen": false
  }
}

Update

Update an existing ManualChapterEntry by id.

Definition

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

Request Keys

Key Type Description
user_id integer The related User
chapter_id integer The related ManualChapter
title string The title of the ManualChapterEntry
slug string The slugged title of the ManualChapterEntry (unique by ManualChapter)
text string The text of the ManualChapterEntry
sort_number integer The index of the ManualChapterEntry related to the ManualChapter

Example Request

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

Example Response Body

{
  "status": "success",
  "data": {
    "user_id": 3,
    "chapter_id": 1,
    "title": "Entry3",
    "text": "<p>Quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>",
    "slug": "entry3",
    "sort_number": 1,
    "updated_at": "2019-01-25 16:56:34",
    "created_at": "2019-01-25 16:58:10",
    "id": 3,
    "hash": "d54q7g6wnj1eylm8k9e0xpz2",
    "seen": false
  }
}

Delete

Delete an existing ManualChapterEntry by id.

Definition

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

Example Request

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

Example Response Body

{
  "status": "success",
  "data": null
}
Last Updated: 10/14/2019