Retrieve a User's Comments API
On this page
This API is used to retrieve all of the User Comments on a User's account. User Comments are used to allow administrators and moderators the ability to take notes on Users.
Request#
Retrieve all of the User Comments written for a User by their Id.
OpenAPI Spec
Request Headers#
X-FusionAuth-TenantIdThe unique Id of the tenant used to scope this API request.
The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon other values in the request or it is otherwise not required.
Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.
See Making an API request using a Tenant Id for additional information.
Path Parameters#
userIdThe Id of the User to retrieve the User Comments for.
Response#
The response for this API contains all of the User Comments for the User.
| Code | Description |
|---|---|
| 200 | The request succeeded. The response contains a JSON body. |
| 400 | The request was invalid or malformed. The response contains an Errors JSON object with the specific errors. FusionAuth also returns a 400 when the request needs a paid FusionAuth license and no license is present. |
| 401 | The request has no valid Authorization header. The header is missing, or the API key isn't valid. The response is empty. For more information, see Authentication. |
| 404 | The object you requested doesn't exist. The response is empty. |
| 500 | FusionAuth had an internal error and logged a stack trace in the FusionAuth log files. The response is empty. |
| 503 | The search index is unavailable or returned an error, so FusionAuth can't complete the request. The response contains a JSON body. |
Response Body#
userCommentsThe list of User Comment objects.
userComments[x].comment The text of the User Comment.
userComments[x].commenterId The Id of the User that wrote the User Comment.
userComments[x].createInstant The instant when the comment was written. This was deprecated in 1.18.0. Use insertInstant instead.
userComments[x].id The Id of the User Comment.
userComments[x].insertInstant The instant when the comment was written.
userComments[x].userId The Id of the User that the User Comment was written for.
{
"userComments": [
{
"comment": "Not sure if this user is violating any rules or not.",
"commenterId": "00000000-0000-0000-0000-000000000002",
"id": "00000000-0000-0000-0000-000000000042",
"insertInstant": 1471786483322,
"userId": "00000000-0000-0000-0000-000000000003"
}
]
}Related
API documentation for the FusionAuth Add a Comment to a User API.
Learn about the APIs for creating and retrieving comments on users.
API documentation for the FusionAuth Search for User Comments API.
Learn about the APIs for invoking a User Action on a User.