Skip to main content

Post

Prerequisites #

  • To use the Social Feed API, you must first authenticate yourself and receive a token enables you to access the service. See the Authentication documentation for more information on how to do this.
  • Post endpoints need a postId as path parameter. Owner of posts is persons so check the Person and get postId. See the Person documentation for more information on how to do this.

Requests #

Post resource provides the following endpoints:

PathHTTP MethodDescription
v1/posts/GETView All posts of current user
v1/posts/{postId}GETView a specified post
v1/posts/{postId}/commentsGETView All comments of a specified post
v1/posts/{postId}/comments/pagesGETView paginated comments of a specified post
v1/posts/{postId}/likes/pagesGETView paginated person's ID who liked a specified post

See the API documentation documentation for more information on these endpoints

Example Request #

The following example curl command demonstrates how to get comments of a specified post.

In a Linux/Unix/macOS environment:

curl -i "https://sf-dev.microservice.bankify.io/v1/posts/<postId>/comments"
-H "Authorization: Bearer <access_token>"

In Windows PowerShell:

curl https://sf-dev.microservice.bankify.io/v1/posts/<postId>/comments

Responses #

  • If successful, the operation responds with HTTP status code 2XX.
  • If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
    • If the specified post does not belong to the authenticating user organization, the operation returns the Access is denied error.
    • If the authenticating user or the specified post does not exist, the operation returns the Not found error.
    • If the Authorization header is not present or invalid, a 401 error code will be returned.