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
  • Model Definition
  • Relations
  • Computed properties
  • Traits
  • List
  • List by Post
  • Show
  • Create
  • Update
  • Delete
  1. API reference
  2. Infoboard

InfoboardComments

PreviousInfoboardPostReadUsersNextInfoboardDepartmentSettings

Last updated 11 months ago

InfoboardComments are used to enable a direct exchange on the content of an .

Model Definition

Alias

infoboardComment

Relations

Key
Relation
Type
Relation Field(s)

user

Belongs to

user_id

post

Belongs to

post_id

notifications

Has many

notifications.event_id, notifications.event_source

reactions

Morph many

reactions.reactable_type, reactions.reactable_id

currentReaction

Morph one

reactions.reactable_type, reactions.reactable_id, reactions.user_id

Computed properties

  • hash - The hashed id of the InfoboardComment.

Traits

  • TriggersNotifications

List

Definition

GET /api/infoboard/posts/comments

Example Request

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

Example Response Body

[
  {
    "id": 1,
    "user_id": 3,
    "post_id": 1,
    "text": "<p>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.</p>",
    "created_at": "2018-12-21 11:44:50",
    "updated_at": "2018-12-21 11:54:40",
    "hash": "zn7m24owk63qolxryge8pj05"
  },
  {
    "id": 2,
    "user_id": 3,
    "post_id": 1,
    "text": "<p>Sollicitudin nibh sit amet commodo nulla facilisi nullam vehicula. Libero enim sed faucibus turpis in eu.</p>",
    "created_at": "2018-12-21 12:09:08",
    "updated_at": "2018-12-21 12:09:08",
    "hash": "6o8m0kz5yw10x1pr9e4vxj27"
  }
]

List by Post

Definition

GET /api/infoboard/posts/{postId}/comments

Example Request

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

Example Response Body

[
  {
    "id": 1,
    "user_id": 3,
    "post_id": 1,
    "text": "<p>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.</p>",
    "created_at": "2018-12-21 11:44:50",
    "updated_at": "2018-12-21 11:54:40",
    "hash": "zn7m24owk63qolxryge8pj05"
  },
  {
    "id": 2,
    "user_id": 3,
    "post_id": 1,
    "text": "<p>Sollicitudin nibh sit amet commodo nulla facilisi nullam vehicula. Libero enim sed faucibus turpis in eu.</p>",
    "created_at": "2018-12-21 12:09:08",
    "updated_at": "2018-12-21 12:09:08",
    "hash": "6o8m0kz5yw10x1pr9e4vxj27"
  }
]

Show

Show a single InfoboardComment by id or hash.

Definition

GET /api/infoboard/comments/{idOrHash}

Example Request

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

Example Response

{
  "id": 1,
  "user_id": 3,
  "post_id": 1,
  "text": "<p>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.</p>",
  "created_at": "2018-12-21 11:44:50",
  "updated_at": "2018-12-21 11:54:40",
  "hash": "zn7m24owk63qolxryge8pj05"
}

Create

Definition

POST /api/infoboard/posts/{postId}/comments

Request Keys

Key
Type
Default
Description

post_id**

integer

-

text*

string

-

The content of the InfoboardComment.

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/infoboard/posts/1/comments', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'user_id' => 3,
        'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>'
    ]
]);

Example Response Body

{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 3,
    "post_id": 1,
    "text": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
    "updated_at": "2018-12-21 11:44:50",
    "created_at": "2018-12-21 11:44:50",
    "hash": "d54q7g6wnj1eylm8k9e0xpz2"
  }
}

Update

Update an existing InfoboardComment by id.

Definition

PUT /api/infoboard/posts/comments/{id}

Request Keys

Key
Type
Default
Description

text*

string

-

The content of the InfoboardComment.

Keys with * are required.

Example Request

$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('PUT', '/api/infoboard/posts/comments/3', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'user_id' => 3,
        'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Morbi blandit cursus risus at ultrices mi tempus imperdiet nulla.</p>'
    ]
]);

Example Response

{
  "status": "success",
  "data": {
    "id": 3,
    "user_id": 3,
    "post_id": 1,
    "text": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Morbi blandit cursus risus at ultrices mi tempus imperdiet nulla.</p>",
    "created_at": "2018-12-21 11:44:50",
    "updated_at": "2018-12-21 12:04:10",
    "hash": "d54q7g6wnj1eylm8k9e0xpz2"
  }
}

Delete

Delete an existing InfoboardComment by id.

Definition

DELETE /api/infoboard/posts/comments/{id}

Example Request

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

Example Response

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

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

Get a list of all InfoboardComments the current authenticated is allowed to view by .

Create a new InfoboardComment by .

The related .

InfoboardPost
User
User
InfoboardPost
InfoboardPost
User
InfoboardPost
Notifications
Reactions
CurrentReaction
InfoboardPost