You can retrieve an information about any post the current user has access to by calling getPost query. It will return the Post object that represents both - post and comment:
ParameterTypeDescription
idIDRequired. The post entity ID.
textStringRequired. The post text. Will be returned as a markup with all included available tags (<a>, <p>, <br>).
authorUserContextUserContextContains the post author user context data.
createdIntRequired. Timestamp when the post was created.
parentPostPostContain the parent post for a comment. Will be empty if a post is returned.
cta[CTA]Contains the list of Call To Action objects available for the given post.
commentsNumberIntContains the number of related comments for the post. Will return NULL for a comment.
isLikedBooleanRequired. Represents the like flag. If TRUE, the post is liked by the current API user.
isPinnedBooleanRequired. Represents the pin flag. If TRUE, the post is pinned by the current API user. Only posts can be pinned, not comments.
likesNumberIntRequired. Contains the number of “like” reactions for the given post.
sharedContentPostSharedContentRepresents the data of the content that was shared in the post (learning path or certificate). Available only for posts and empty for a comment.
PostSharedContent object
ParameterTypeDescription
idIDRequired. ID of the shared content (a learning path or a certificate).
typePostSharedContentTypeRequired. Available options: LEARNING_PATH or CERTIFICATE.
titleStringRequired. The content title.
descriptionStringThe content description (available only for a learning path).
imageMediaImageRepresents an image associated with the shared content.
earnedOnIntA timestamp of the date when the award was earned (available only for the certificates).
Post CTA
  • COMMENT_POST - allows executing createPostComment mutation to add a comment to a post.
  • PIN_POST - allows executing of pinPost mutation to mark the given post as pinned for the current API user.
  • UNPIN_POST - unpins the previously pinned post; corresponding mutation - unpinPost.
  • EDIT_POST - allows to update the post/comment text and available only for the author; corresponding mutation - editPost.
  • DELETE_POST - available for the author or the user associated with a context with ADMINISTRATOR scope; corresponding mutation - deletePost.
  • HIDE_POST - hides the post for the current API user; corresponding mutation - hidePost.
  • TOGGLE_LIKE - allows executing of the toggleLike mutation to add/remove “like” reaction on the post.
  • REMOVE_CONNECTION - removes the post author from the current user network; corresponding mutation - removeUserConnection.
  query getPost {
    getPost(postId: 175) {
      id
      text
      created
      commentsNumber
      isLiked
      likesNumber
      authorUserContext {
        id
        uuid
      }
      sharedContent {
      id
      type
      title
      description
      earnedOn
        image {
          alt
          title
          url
        }
      }
      cta {
        actionId
        title
        arguments {
          key
          value
        }
      }
    }
  }