InfoboardPosts
Last updated
Last updated
InfoboardPosts
are the main entity of the Infoboard
and define RTE content that can be shared with any desired Department.
They can have multiple InfoboardComments that may relate to the content of the InfoboardPost
.
infoboardPost
Key | Relation | Type | Relation Field(s) |
---|---|---|---|
hash
- The hashed id
of the InfoboardPost
.
TriggersNotifications
Get a list of all InfoboardPosts
the current authenticated User is allowed to view.
Definition
GET
/api/infoboard/posts
Example Request
Example Response Body
Show a single InfoboardPost
by id
or hash
.
Definition
GET
/api/infoboard/posts/{idOrHash}
Example Request
Example Response
Create a new InfoboardPost
.
Definition
POST
/api/infoboard/posts
Request Keys
Keys with *
are required.
published_at
- Will be set automatically to wether the planned_publish_at
date or the time of the request if none given. This information is used to determine if posts should be shown to users already. The date must be equal to or after the current time.
Example Request
Example Response Body
Update an existing InfoboardPost
by id
.
Definition
PUT
/api/infoboard/posts/{id}
Request Keys
planned_publish_at
- This information is only nullable or changeable if the date is after or equal to the current date and the original planned_publish_at value is in the future.
published_at
- Must be after or equal to the current date. Can be updated to "push" a post to the top. If planned_publish_at
is set and valid on request, the value of published_at
will be set accordingely.
Example Request
Example Response
Delete an existing InfoboardPost
by id
.
Definition
DELETE
/api/infoboard/posts/{id}
Example Request
Example Response
Key | Type | Default | Description |
---|---|---|---|
Key | Type | Description |
---|---|---|
user
Belongs to
user_id
departments
Belongs to many
Intermediate table
seenUsers
Has many
infoboard_post_seen_users.post_id
readUsers
Has many
infoboard_post_read_users.post_id
comments
Has many
infoboard_comments.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
title
*
string
-
The title of the InfoboardPost
.
text
*
string
-
The content of the InfoboardPost
.
reading_confirmation
boolean
false
Whether a reading confirmation is required.
reactions_forbidden
boolean
false
Whether Reactions for the InfoboardPost
and it's InfoboardComments are forbidden.
comments_allowed
boolean
true
Whether comments are allowed.
department_ids
*
string
-
The Departments that are allowed to see the InfoboardPost
(seperated by comma).
planned_publish_at
datetime
-
The date when the post should be published.
published_at
datetime
-
The date when the post was published.
pinned
boolean
false
Wether the post should be pinned on top of the infoboard.
title
string
The title of the InfoboardPost
.
text
string
The content of the InfoboardPost
.
reading_confirmation
boolean
Whether a reading confirmation is required .
reactions_forbidden
boolean
Whether Reactions for the InfoboardPost
and it's InfoboardComments are forbidden.
comments_allowed
boolean
Whether comments are allowed.
department_ids
string
The Departments that are allowed to see the InfoboardPost
(seperated by comma).
planned_publish_at
datetime
The date when the post should be published.
published_at
datetime
The date when the post was published.
pinned
boolean
Wether the post should be pinned on top of the infoboard.