StreamEntry

StreamEntry Service

Web service endpoints for stream entries.

Create Comment

POST /streamEntries/{entryID}/comments

Create a new comment as a reply to the specified stream entry. The parent field (if any) in the incoming entity will be ignored. Instead, it will be set to the URI of the specified stream entry.

Path Parameters:
NameTypeRequiredDescription
entryIDStringtrueID of the stream entry this comment replies to
Query Parameters:
NameTypeRequiredDescription
fieldsStringfalseFields to include in the returned Comment
Takes:
  • Comment describing the comment to be created
  • Retrieves:
  • Comment reflecting the newly created comment
  • Return Status:
    HTTP Status CodeDescription
    201 (Created)Request was successful
    400 (Bad Request)An input field is missing or malformed
    409 (Conflict)You attempt to add a comment to a stream entry for which comments have been closed
    403 (Forbidden)You are not allowed to perform this operation
    404 (Not Found)The specified parent stream entry (or comment) cannot be found

    Like Stream Entry

    POST /streamEntries/{entryID}/likes

    Register that the requesting person likes the specified stream entry.

    Path Parameters:
    NameTypeRequiredDescription
    entryIDStringtrueID of the stream entry to be liked
    Return Status:
    HTTP Status CodeDescription
    204 (No Content)Request was successful
    400 (Bad Request)An input field is missing or malformed
    409 (Conflict)You have already liked this stream entry
    403 (Forbidden)You are not allowed to access or like this stream entry
    404 (Not Found)The specified stream entry does not exist

    Unlike Stream Entry

    DELETE /streamEntries/{entryID}/likes

    Delete the like of the specified stream entry by the requesting user.

    Path Parameters:
    NameTypeRequiredDescription
    entryIDStringtrueID of the stream entry for which a like is being removed
    Return Status:
    HTTP Status CodeDescription
    204 (No Content)Request was successful
    400 (Bad Request)An input field is malformed
    409 (Conflict)You do not currently have a like registered for this stream entry
    403 (Forbidden)You are not allowed to access or unlike this stream entry
    404 (Not Found)The specified stream entry does not exist

    Get Comments

    GET /streamEntries/{entryID}/comments

    Return a paginated list of comments to the specified stream entry, optionally limiting the returned results to direct replies only.

    Path Parameters:
    NameTypeRequiredDescription
    entryIDStringtrueID of the stream entry for which to return comments
    Query Parameters:
    NameTypeRequiredDescription
    excludeRepliesBooleanfalseFlag indicating whether to exclude replies (and therefore return direct comments only)
    hierarchicalBooleanfalsea flag indicating that comments should be returned in hierarchical order instead of chronological order
    startIndexIntegerfalseZero-relative index of the first comment to be returned
    countIntegerfalseMaximum number of comments to be returned
    anchorStringfalseoptional URI for a comment to anchor at. Specifying a anchor will try to return the page containing the anchor. If the anchor could not be found then the first page of comments will be returned.
    fieldsStringfalseFields to be returned in the selected comments
    Retrieves:
  • Comment[] listing comments to this stream entry
  • Return Status:
    HTTP Status CodeDescription
    200 (OK)Request was successful
    400 (Bad Request)An input field is malformed
    403 (Forbidden)You are not allowed to access the specified stream entry or comments
    404 (Not Found)The specified stream entry does not exist

    Get Stream Entry

    GET /streamEntries/{entryID}

    Return the specified stream entry with the specified fields.

    Path Parameters:
    NameTypeRequiredDescription
    entryIDStringtrueID of the stream entry to be returned
    Query Parameters:
    NameTypeRequiredDescription
    fieldsStringfalseFields to be returned
    Retrieves:
  • StreamEntry containing the specified stream entry
  • Return Status:
    HTTP Status CodeDescription
    200 (OK)Request was successful
    400 (Bad Request)An input field is missing or malformed
    403 (Forbidden)You are not allowed to access the specified stream entry
    404 (Not Found)The specified stream entry does not exist

    Get Likes

    GET /streamEntries/{entryID}/likes

    Return a paginated list of the people who like the specified stream entry.

    Path Parameters:
    NameTypeRequiredDescription
    entryIDStringtrueID of the stream entry for which to return liking people
    Query Parameters:
    NameTypeRequiredDescription
    startIndexIntegerfalseZero-relative index of the first person to be returned
    countIntegerfalseMaximum number of people to be returned
    fieldsStringfalseFields to be returned on liking people
    Retrieves:
  • Person[] listing the people who like this stream entry
  • Return Status:
    HTTP Status CodeDescription
    200 (OK)Request was successful
    400 (Bad Request)An input field is malformed
    403 (Forbidden)You are not allowed to access this stream entry
    404 (Not Found)The specified stream entry does not exist

    Mark Read

    POST /streamEntries/{entryID}/read

    Mark the specified stream entry as having been read.

    Path Parameters:
    NameTypeRequiredDescription
    entryIDStringtrueID of the stream entry to be marked
    Return Status:
    HTTP Status CodeDescription
    204 (No Content)Request was successful
    400 (Bad Request)An input field was malformed
    403 (Forbidden)You are not allowed to access this content object
    404 (Not Found)The specified content object does not exist

    Mark Unread

    DELETE /streamEntries/{entryID}/read

    Mark the specified stream entry as having not been read.

    Path Parameters:
    NameTypeRequiredDescription
    entryIDStringtrueID of the stream entry to be marked
    Return Status:
    HTTP Status CodeDescription
    204 (No Content)Request was successful
    400 (Bad Request)An input field was malformed
    403 (Forbidden)You are not allowed to access this content object
    404 (Not Found)The specified content object does not exist