# User Retrieval
# Get the Specific user
The specified endpoint is designed to retrieve a specific user's profile, providing comprehensive details about their activity. By utilizing this endpoint, users can access a lot of information about the individual, including their email, comments, and posts.
#
# Request
- HTTP Method:
GET
- accept :
application/json
- Content Type :
application/json
- URL:
https://comments-api-production.up.railway.app/users/get-specific-user/{userid}
# Params Parameters
Property | Type | Required | Description |
---|---|---|---|
userId | number | true | The User Id |
# Request example
curl -X GET \
'https://comments-api-production.up.railway.app/users/get-specific-user/{userId}' \
-H 'accept : application/json' \
-H 'Content-Type : application/json' \
# Expected Responses:
# User Profile Gotten
Successfully retrieved the user profile
{
"statusCode":200,
"responseValue":{
"id":10,
"name":"Daniel Odokuma",
"email":"guonnie@gmail.com",
"createdAt":"2023-04-29T17:34:44.860Z",
"updatedAt":"2023-04-29T17:34:44.860Z",
"allcomments":[{
"id":100,
"text":"My mummy said,
they built the cars",
"userId":10,
"createdAt":"2023-04-30T10:29:34.464Z",
"updatedAt":"2023-04-30T10:29:34.491Z"}
],
"allitems":[{
"id":17,
"name":"Who Invented the first mirror",
"createdAt":"2023-04-29T17:36:25.116Z",
"updatedAt":"2023-04-29T17:36:25.116Z"}
]}
}
# Other Responses:
# User Cannot be Found
This user cannot be found on the database
{
"statusCode":404,
"message":["This user cannot be found"],
"error":"Not found"}
# Playground
Method: GET
URL: https://comments-api-production.up.railway.app/users/get-specific-user/{userId}
Headers:
Key | Value |
---|---|
accept | |
Content-Type |