Post /post/{post-id}

Represents an individual post.

Reading

GET /post/{post-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token with workspace_speaking permission is required.
  • At least one of the following criteria must be met :
    • The privacy.value of the post is set to WORKSPACE, at least one of the following criteria is met :
      • The post is from the current user.
      • The current person is attached to the workspace at witch is attached the post.
    • The privacy.value of the post is set to TARGET, at least one of the following criteria is met :
      • The post is from the current user.
      • The target is owned by the current person.
      • The target is shared with the current person.
      • The current person is an admin of the workspace at witch is attached the target ressource.
      • The current person is an admin of the workspace at witch is attached the post.
    • The privacy.value of the post is set to EACH, at least one of the following criteria is met :
      • The post is from the current user.
      • The target of the post is the current user.
      • The current person is an admin of the workspace at witch is attached the post.
    • The privacy.value of the post is set to SELF, at least one of the following criteria is met :
      • The post is from the current user.
      • The current person is an admin of the workspace at witch is attached the post.
    • The privacy.value of the post is set to CUSTOM, at least one of the following criteria is met :
      • The post is from the current user.
      • The post is shared with the current user.
      • The current person is an admin of the workspace at witch is attached the post.
    • The access token points to a workspace and the post is attached to the current workspace.

Fields

Name Description Type

_id

The post ID.

string

message

The message of the post.

string

subject

The subject of the post.
Only present if the parent target at which is attached the post is a Group.

string

from

The ID of the User that added the post.

User

workspace

The ID of the Workspace at which is attached the post.

Workspace

privacy

The privacy of the post.

object

value

The value of the privacy.

string{WORKSPACE, TARGET, EACH, SELF, CUSTOM}

perms

The privacy permission.

string{READ, COMMENT, WRITE}

allow

An array of User and/or Group IDs who have access.

User[], Group[]

deny

An array of User and/or Group IDs who don't have access.

User[], Group[]

target

The ID of the Edge at which is attached the post.

Edge

created_time

The date that indicates when the post was created.

date

updated_time

The date that indicates when the post was updated for the last time.

date

Publishing

You can publish posts by using the /user/feed, /group/feed or /ressource/feed edges.

Updating

PUT /post/{post-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with manage_speaking permission is required.
  • At least one of the following criteria must be met :
    • The post is owned by the current person.
    • The post is shared (with MANAGE permission) with the current person.
    • The current person has permissions for manage the parent at witch is attached the post.
    • The current person is an admin (with MANAGE permission) of the workspace at witch is attached the post.

Fields

Name Description Type

message

The message of the post.
Only editable by the owner of the post.

string

subject

The subject of the post.
Only editable if the target at which is attached the post is a Group.

string

privacy

The privacy of the post.
Only editable if the target at which is attached the post is a User.

object

value

The value of the privacy.

string{WORKSPACE, EACH, CUSTOM}

allow

An array of User and/or Group IDs who have access.

User[], Group[]

deny

An array of User and/or Group IDs who don't have access.

User[], Group[]

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Deleting

DELETE /post/{post-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with manage_speaking permission is required.
  • At least one of the following criteria must be met :
    • The post is owned by the current person.
    • The post is shared (with MANAGE permission) with the current person.
    • The current person has permissions for manage the parent at witch is attached the post.
    • The current person is an admin (with MANAGE permission) of the workspace at witch is attached the post.

Fields

No fields are required.

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Edges

Name Description

/comments

The comments attached to the post.