OpenAPI definition

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
More information: https://helloreverb.com
Contact Info: hello@helloreverb.com
Version: v0
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

LoginController

NutritionCommentRestController

NutritionRestController

TrainingCommentRestcontroller

TrainingRestController

UserRestController

LoginController

Up
post /api/auth/logout
(logOut)

Return type

AuthResponse

Example data

Content-Type: application/json
{
  "message" : "",
  "error" : "",
  "status" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK AuthResponse

404

Not Found

Up
post /api/auth/login
(login)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body LoginRequest (required)
Body Parameter

Return type

AuthResponse

Example data

Content-Type: application/json
{
  "message" : "",
  "error" : "",
  "status" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK AuthResponse

404

Not Found

Up
post /api/auth/refresh
(refreshToken)

Return type

AuthResponse

Example data

Content-Type: application/json
{
  "message" : "",
  "error" : "",
  "status" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK AuthResponse

404

Not Found

NutritionCommentRestController

Up
post /api/nutritionComments/
Create nutrition comment (createNutritionComment)
Create nutrition comment

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NutritionCommentDTO (required)
Body Parameter

Return type

NutritionCommentDTO

Example data

Content-Type: application/json
{
  "nutrition" : {
    "image" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : "",
    "calories" : ""
  },
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Nutrition comment created NutritionCommentDTO

400

Bad request NutritionCommentDTO

403

Forbidden-Access denied NutritionCommentDTO

404

Nutrition comment not found

Up
delete /api/nutritionComments/
Delete nutrition comment (deleteNutritionComment)
Delete nutrition comment

Query parameters

id (required)
Query Parameter — format: int64

Return type

NutritionCommentDTO

Example data

Content-Type: application/json
{
  "nutrition" : {
    "image" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : "",
    "calories" : ""
  },
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition comment deleted NutritionCommentDTO

400

Bad request NutritionCommentDTO

403

Forbidden-Access denied NutritionCommentDTO

404

Nutrition comment not found

Up
get /api/nutritionComments/{nutritionId}
Get nutrition comments by nutrition id (getNutritionCommentById)
Get nutrition comments by nutrition id

Path parameters

nutritionId (required)
Path Parameter — format: int64

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition comments found

400

Bad request

404

Nutrition comments not found

Up
get /api/nutritionComments/all
Get all nutrition comments (getNutritionComments)
Get all nutrition comments

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition comments found

400

Bad request

404

Nutrition comments not found

Up
get /api/nutritionComments/
Get paginated nutrition comments (getPaginatedNutritionComments)
Get paginated nutrition comments

Query parameters

nutritionId (required)
Query Parameter — format: int64
page (optional)
Query Parameter — default: 0 format: int32
limit (optional)
Query Parameter — default: 10 format: int32

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition comments found

400

Bad request

404

Nutrition comments not found

Up
put /api/nutritionComments/report
Report nutrition comment (reportComment1)
Report nutrition comment

Query parameters

commentId (required)
Query Parameter — format: int64

Return type

NutritionCommentDTO

Example data

Content-Type: application/json
{
  "nutrition" : {
    "image" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : "",
    "calories" : ""
  },
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition comment reported NutritionCommentDTO

400

Bad request NutritionCommentDTO

403

Forbidden-Access denied NutritionCommentDTO

404

Nutrition comment not found

Up
put /api/nutritionComments/valid
Unreport nutrition comment (unreportComment1)
Unreport nutrition comment

Query parameters

commentId (required)
Query Parameter — format: int64

Return type

NutritionCommentDTO

Example data

Content-Type: application/json
{
  "nutrition" : {
    "image" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : "",
    "calories" : ""
  },
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition comment unreported NutritionCommentDTO

400

Bad request NutritionCommentDTO

403

Forbidden-Access denied NutritionCommentDTO

404

Nutrition comment not found

Up
put /api/nutritionComments/{id}
Update nutrition comment (updateNutritionComment)
Update nutrition comment

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NutritionCommentDTO (required)
Body Parameter

Query parameters

id (required)
Query Parameter — format: int64

Return type

NutritionCommentDTO

Example data

Content-Type: application/json
{
  "nutrition" : {
    "image" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : "",
    "calories" : ""
  },
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition comment updated NutritionCommentDTO

400

Bad request NutritionCommentDTO

403

Forbidden-Access denied NutritionCommentDTO

404

Nutrition comment not found

NutritionRestController

Up
post /api/nutritions/
Create a new nutrition (createNutrition)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NutritionDTO (required)
Body Parameter

Return type

NutritionDTO

Example data

Content-Type: application/json
{
  "image" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "calories" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Nutrition created successfully NutritionDTO

400

Bad request - Invalid input data

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Not Found

409

Conflict - Nutrition already exists

500

Internal server error

Up
post /api/nutritions/{id}/image
Upload an image for a nutrition (createNutritionImage)

Path parameters

id (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body id_image_body_3 (optional)
Body Parameter

Responses

201

Image uploaded successfully

400

Bad request - Invalid file format

404

Nutrition not found

500

Internal server error

Up
delete /api/nutritions/{id}
Delete a nutrition by ID (deleteNutrition)

Path parameters

id (required)
Path Parameter — format: int64

Return type

NutritionDTO

Example data

Content-Type: application/json
{
  "image" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "calories" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition deleted successfully NutritionDTO

401

Unauthorized access

403

Forbidden - You don't have permission to delete

404

Nutrition not found

500

Internal server error

Up
delete /api/nutritions/{id}/image
Delete the image of a nutrition (deleteNutritionImage)

Path parameters

id (required)
Path Parameter — format: int64

Responses

204

Image deleted successfully

404

Nutrition not found

500

Internal server error

Up
put /api/nutritions/{id}
Edit a nutrition by ID (editDiet)

Path parameters

id (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NutritionDTO (required)
Body Parameter

Return type

NutritionDTO

Example data

Content-Type: application/json
{
  "image" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "calories" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition updated successfully NutritionDTO

400

Bad request - Invalid input data

401

Unauthorized access

403

Forbidden - You don't have permission to edit

404

Nutrition not found

500

Internal server error

Up
get /api/nutritions/{id}
Get a nutrition by ID (getNutrition)

Path parameters

id (required)
Path Parameter — format: int64

Return type

NutritionDTO

Example data

Content-Type: application/json
{
  "image" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "calories" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutrition found NutritionDTO

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Nutrition not found

500

Internal server error

Up
get /api/nutritions/{id}/image
Retrieve the image of a nutrition (getNutritionImage)

Path parameters

id (required)
Path Parameter — format: int64

Responses

200

Image retrieved successfully

404

Nutrition or image not found

500

Internal server error

Up
get /api/nutritions/
Get all nutritions (getNutritions)

Return type

Nutrition

Example data

Content-Type: application/json
{
  "image" : "",
  "goal" : "",
  "comments" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "calories" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "trainings" : "",
    "id" : "",
    "email" : "",
    "trainingComments" : "",
    "nutritionComments" : "",
    "nutritions" : ""
  },
  "nutritionComments" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Found all nutritions Nutrition

400

Bad request - Invalid parametes

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Nutritions not found

500

Internal server error

Up
get /api/nutritions/paginated
Get paginated nutritions (getPaginatedNutritions)

Query parameters

page (optional)
Query Parameter — default: 0 format: int32
limit (optional)
Query Parameter — default: 10 format: int32

Return type

NutritionDTO

Example data

Content-Type: application/json
{
  "image" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : "",
  "calories" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Nutritions retrieved successfully NutritionDTO

400

Bad request - Invalid pagination parameters

404

Not Found

500

Internal server error

Up
put /api/nutritions/{id}/image
Replace the image of a nutrition (replaceNutritionImage)

Path parameters

id (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body id_image_body_2 (optional)
Body Parameter

Responses

204

Image replaced successfully

400

Bad request - Invalid file format

404

Nutrition not found

500

Internal server error

TrainingCommentRestcontroller

Up
post /api/trainingComments/
Create a new training comment (createTrainingComment)
Create a new training comment

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body TrainingCommentDTO (required)
Body Parameter

Return type

TrainingCommentDTO

Example data

Content-Type: application/json
{
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "training" : {
    "intensity" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : ""
  },
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Training comment created TrainingCommentDTO

400

Bad request TrainingCommentDTO

403

Forbidden-Access denied TrainingCommentDTO

404

Training comment not created

Up
delete /api/trainingComments/
Delete a training comment (deleteTrainingComment)
Delete a training comment

Query parameters

id (required)
Query Parameter — format: int64

Return type

TrainingCommentDTO

Example data

Content-Type: application/json
{
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "training" : {
    "intensity" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : ""
  },
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training comment deleted TrainingCommentDTO

400

Bad request TrainingCommentDTO

403

Forbidden-Access denied TrainingCommentDTO

404

Training comment not deleted

Up
get /api/trainingComments/all
Get all training comments (getAllTrainingComments)
Get all training comments

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training comments found

400

Bad request

404

Training comments not found

Up
get /api/trainingComments/
Get paginated training comments (getPaginatedTrainingComments)
Get paginated training comments

Query parameters

trainingId (required)
Query Parameter — format: int64
page (optional)
Query Parameter — default: 0 format: int32
limit (optional)
Query Parameter — default: 10 format: int32

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training comments found

400

Bad request

404

Training comments not found

Up
get /api/trainingComments/{trainingId}/
Get training comments by training id (getTrainingCommentsByTrainingId)
Get training comments by training id

Path parameters

trainingId (required)
Path Parameter — format: int64

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training comments found

400

Bad request

404

Training comments not found

Up
put /api/trainingComments/report
Report training comment (reportComment)
Report training comment

Query parameters

commentId (required)
Query Parameter — format: int64

Return type

TrainingCommentDTO

Example data

Content-Type: application/json
{
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "training" : {
    "intensity" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : ""
  },
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training comment reported TrainingCommentDTO

400

Bad request TrainingCommentDTO

403

Forbidden-Access denied TrainingCommentDTO

404

Training comment not reported

Up
put /api/trainingComments/valid
Unreport training comment (unreportComment)
Unreport training comment

Query parameters

commentId (required)
Query Parameter — format: int64

Return type

TrainingCommentDTO

Example data

Content-Type: application/json
{
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "training" : {
    "intensity" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : ""
  },
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training comment unreported TrainingCommentDTO

400

Bad request TrainingCommentDTO

403

Forbidden-Access denied TrainingCommentDTO

404

Training comment not unreported

Up
put /api/trainingComments/
Update a training comment (updateTrainingComment)
Update a training comment

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body TrainingCommentDTO (required)
Body Parameter

Query parameters

id (required)
Query Parameter — format: int64

Return type

TrainingCommentDTO

Example data

Content-Type: application/json
{
  "isNotified" : "",
  "name" : "",
  "description" : "",
  "training" : {
    "intensity" : "",
    "goal" : "",
    "name" : "",
    "description" : "",
    "id" : ""
  },
  "id" : "",
  "user" : {
    "roles" : "",
    "name" : "",
    "id" : "",
    "email" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training comment updated TrainingCommentDTO

400

Bad request TrainingCommentDTO

403

Forbidden-Access denied TrainingCommentDTO

404

Training comment not updated

TrainingRestController

Up
post /api/trainings/
Create a training (createTraining)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body TrainingDTO (required)
Body Parameter

Return type

TrainingDTO

Example data

Content-Type: application/json
{
  "intensity" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Training created TrainingDTO

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Not Found

500

Internal server error

Up
post /api/trainings/{trainingId}/image
Create training image (createTrainingImage)

Path parameters

trainingId (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body trainingId_image_body_1 (optional)
Body Parameter

Responses

201

Training image created

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

404

Not Found

500

Internal server error

Up
delete /api/trainings/{trainingId}/image
Delete training image (deletePostImage)

Path parameters

trainingId (required)
Path Parameter — format: int64

Responses

204

Training image deleted

404

Training image not found

500

Internal server error

Up
delete /api/trainings/{trainingId}
Delete a training (deleteTraining)

Path parameters

trainingId (required)
Path Parameter — format: int64

Return type

TrainingDTO

Example data

Content-Type: application/json
{
  "intensity" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training deleted TrainingDTO

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Training not found

500

Internal server error

Up
get /api/trainings/paginated
Get paginated trainings (getPaginatedTrainings)

Query parameters

page (optional)
Query Parameter — default: 0 format: int32
limit (optional)
Query Parameter — default: 10 format: int32

Return type

TrainingDTO

Example data

Content-Type: application/json
{
  "intensity" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Trainings retrieved successfully TrainingDTO

400

Bad request - Invalid pagination parameters

404

Not Found

500

Internal server error

Up
get /api/trainings/{trainingId}
Get a training by ID (getTrainingByIdd)

Path parameters

trainingId (required)
Path Parameter — format: int64

Return type

UniqueTrainingDTO

Example data

Content-Type: application/json
{
  "intensity" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training found UniqueTrainingDTO

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Training not found

500

Internal server error

Up
get /api/trainings/{trainingId}/image
Retrieve training image (getTrainingImage)

Path parameters

trainingId (required)
Path Parameter — format: int64

Responses

200

Training image found

404

Training image not found

500

Internal server error

Up
get /api/trainings/
Get all trainings (getTrainings)

Return type

TrainingDTO

Example data

Content-Type: application/json
{
  "intensity" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Found all trainings TrainingDTO

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Trainings not found

500

Internal server error

Up
put /api/trainings/{trainingId}
Replace a training (replacePost)

Path parameters

trainingId (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body TrainingDTO (required)
Body Parameter

Return type

TrainingDTO

Example data

Content-Type: application/json
{
  "intensity" : "",
  "goal" : "",
  "name" : "",
  "description" : "",
  "id" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Training replaced TrainingDTO

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

403

Forbidden - You don't have permission to access

404

Training not found

500

Internal server error

Up
put /api/trainings/{trainingId}/image
Replace training image (replaceTrainingImage)

Path parameters

trainingId (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body trainingId_image_body (optional)
Body Parameter

Responses

204

Training image replaced

400

Bad request - Invalid parameters

401

Unauthorized access - Authentication is required

404

Not Found

500

Internal server error

UserRestController

Up
post /api/users/
Registers a new user (createUser)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body UserDTO (required)
Body Parameter

Responses

201

User registered correctly

400

Bad request, maybe one of the user attributes is missing or the type is not valid

404

Not Found

409

User already exists

Up
post /api/users/{id}/image
Registers the image of a user (createUserImage)

Path parameters

id (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body id_image_body_1 (optional)
Body Parameter

Responses

201

Image created correctly

400

Bad request

401

User not authorized

403

User not authorized

404

User not found

Up
get /api/users/reportedComments
(getReportedComments)

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

404

Not Found

Up
get /api/users/{id}
Get a user by its id (getUser)

Path parameters

id (required)
Path Parameter — User id format: int64

Return type

User

Example data

Content-Type: application/json
{
  "roles" : "",
  "name" : "",
  "trainings" : "",
  "id" : "",
  "email" : "",
  "trainingComments" : "",
  "nutritionComments" : "",
  "nutritions" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Found the user User

400

Invalid id supplied

401

User not authorized

404

User not found

Up
get /api/users/{id}/image
Gets the image of a user by its id (getUserImage)

Path parameters

id (required)
Path Parameter — format: int64

Responses

200

Found the user image

400

Invalid id supplied

401

User not authorized

404

User not found, user image not found or doesn't have permission to access it

Up
get /api/users/all
Get all users (getUsers)

Return type

User

Example data

Content-Type: application/json
{
  "roles" : "",
  "name" : "",
  "trainings" : "",
  "id" : "",
  "email" : "",
  "trainingComments" : "",
  "nutritionComments" : "",
  "nutritions" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Found all users User

401

User not authorized

404

Users not found

Up
get /api/users/me
Gets the logged user (me)

Return type

User

Example data

Content-Type: application/json
{
  "roles" : "",
  "name" : "",
  "trainings" : "",
  "id" : "",
  "email" : "",
  "trainingComments" : "",
  "nutritionComments" : "",
  "nutritions" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Found the user User

401

User not authorized

404

Not Found

Up
put /api/users/{id}
Update a user by its id (replaceUser)

Path parameters

id (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body UserDTO (required)
Body Parameter

Return type

User

Example data

Content-Type: application/json
{
  "roles" : "",
  "name" : "",
  "trainings" : "",
  "id" : "",
  "email" : "",
  "trainingComments" : "",
  "nutritionComments" : "",
  "nutritions" : ""
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

User updated correctly User

400

User not updated

403

User not authorized

404

Not Found

Up
put /api/users/{id}/image
Updates the image of a user (replaceUserImage)

Path parameters

id (required)
Path Parameter — format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body id_image_body (optional)
Body Parameter

Responses

201

Image created correctly

204

Image updated correctly

400

Bad request

401

User not authorized

403

User not authorized

404

User not found

Models

[ Jump to Methods ]

Table of Contents

  1. AuthResponse
  2. LoginRequest
  3. Nutrition
  4. NutritionComment
  5. NutritionCommentDTO
  6. NutritionDTO
  7. Training
  8. TrainingComment
  9. TrainingCommentDTO
  10. TrainingDTO
  11. UniqueTrainingDTO
  12. User
  13. UserDTO
  14. id_image_body
  15. id_image_body_1
  16. id_image_body_2
  17. id_image_body_3
  18. trainingId_image_body
  19. trainingId_image_body_1

AuthResponse Up

status (optional)
message (optional)
error (optional)

LoginRequest Up

email (optional)
password (optional)

Nutrition Up

id (optional)
format: int64
name (optional)
description (optional)
image (optional)
goal (optional)
calories (optional)
format: int32
comments (optional)
user (optional)
nutritionComments (optional)

NutritionComment Up

id (optional)
format: int64
description (optional)
name (optional)
isNotified (optional)
nutrition (optional)
user (optional)

NutritionCommentDTO Up

id (optional)
format: int64
description (optional)
name (optional)
isNotified (optional)
nutrition (optional)
user (optional)

NutritionDTO Up

id (optional)
format: int64
name (optional)
description (optional)
image (optional)
goal (optional)
calories (optional)
format: int32

Training Up

id (optional)
format: int64
name (optional)
duration (optional)
format: int32
intensity (optional)
description (optional)
image (optional)
goal (optional)
comments (optional)
user (optional)
trainingComments (optional)
img (optional)

TrainingComment Up

id (optional)
format: int64
description (optional)
name (optional)
isNotified (optional)
training (optional)
user (optional)

TrainingCommentDTO Up

id (optional)
format: int64
name (optional)
description (optional)
isNotified (optional)
training (optional)
user (optional)

TrainingDTO Up

id (optional)
format: int64
name (optional)
description (optional)
goal (optional)
intensity (optional)

UniqueTrainingDTO Up

id (optional)
format: int64
name (optional)
description (optional)
goal (optional)
intensity (optional)

User Up

id (optional)
format: int64
name (optional)
email (optional)
roles (optional)
trainingComments (optional)
nutritionComments (optional)
trainings (optional)
nutritions (optional)

UserDTO Up

id (optional)
format: int64
name (optional)
roles (optional)
email (optional)

id_image_body Up

imageFile
format: binary

id_image_body_1 Up

imageFile
format: binary

id_image_body_2 Up

imgNutrition
format: binary

id_image_body_3 Up

imgNutrition
format: binary

trainingId_image_body Up

imageFile
format: binary

trainingId_image_body_1 Up

imageFile
format: binary