Skip to content

ManualChapterEntrySeenUsers

Introduction

When a User has seen the content of a ManualChapterEntry, intratool will track this as a ManualChapterEntrySeenUser.

Model & Relations

Namespace

Modules\Manual\Entities\ManualChapterEntrySeenuser

Relations

RelationKeyTypeRelation Field(s)
UseruserBelongs touser_id
ManualChapterEntryentryBelongs toentry_id

List

Get a list of ManualChapterEntrySeenUsers by ManualChapterEntry.

Definition

GET /api/manual/chapters/entries/{entryId}/seen-users

Example Request

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

Example Response Body

json
[
  {
    "id": 1,
    "user_id": 4,
    "entry_id": 1,
    "created_at": "2019-01-25 16:23:45"
  },
  {
    "id": 2,
    "user_id": 5,
    "entry_id": 1,
    "created_at": "2019-01-25 16:31:29"
  }
]

Create

Create a new ManualChapterEntrySeenUser by ManualChapterEntry.

Definition

GET /api/manual/chapters/entries/{entryId}/seen-users

Request Keys

KeyTypeDefaultDescription
user_id*integer-The related User
entry_id*integer-The related ManualChapterEntry

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

Example Request

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

Example Response Body

json
{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 6,
    "entry_id": 1,
    "created_at": "2019-01-25 16:35:25"
  }
}