This endpoint retrieves a specific feedback by its ID. If no query is provided, it returns all the feedback data.
Parameter | Type | Description |
---|---|---|
feedback_id | path | ID of the feedback to fetch |
GET /es/api/v1/feedback/{feedback_id}
{ "id": "7tUf2ogBKXyr_Xtc4seO", "username": "string", "comments": "string", "rating": 5, "metadata": { "something": true }, "timestamp": "2023-06-20T12:46:15-0600" }
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }
Creates a specific feedback. Requires feedback ID and authorization.
This endpoint does not require any parameters.
POST /es/api/v1/feedback/ { "username": "john_doe", "comments": "Great service!", "rating": 5, "metadata": {} }
{ "feedback_id": "LNV12ogBKXyr_XtcNsjC", "result": "created" }
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }
This endpoint updates a specific feedback identified by its ID. A valid feedback ID and authorization are required.
Parameter | Type | Description |
---|---|---|
feedback_id | string | ID of the feedback to update |
PUT /es/api/v1/feedback/{feedback_id} { "username": "john_doe", "comments": "Excellent service!", "rating": 5, "metadata": {} }
{ "feedback_id": "LNV12ogBKXyr_XtcNsjC", "result": "created" }
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }
Deletes a specific feedback based on the provided feedback ID. Admin role and feedback ID are required for this action.
Parameter | Type | Description |
---|---|---|
feedback_id | string | ID of the feedback to delete |
DELETE /es/api/v1/feedback/{feedback_id}
{ "feedback_id": "7tUf2ogBKXyr_Xtc4seO", "result": "deleted" }
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }
This endpoint retrieves a list of feedbacks. If no query is provided, it returns all the feedback data.
Parameter | Type | Description | Required |
---|---|---|---|
query | string | Matches will be done comparing username or comments | No |
sort_asc | bool | Sorting option of the results based on the username (default: Descending) | No |
max_values | integer | Max values to return (default: 10) | No |
GET /es/api/v1/feedback/?query=example&sort_asc=true&max_values=5
{ "total": 5, "feedbacks": [ { "id": "123", "username": "jane_smith", "comments": "Great job!", "rating": 4, "metadata": {}, "timestamp": "2023-06-20T12:45:52-0600" }, { "id": "456", "username": "john_doe", "comments": "Excellent service!", "rating": 5, "metadata": {}, "timestamp": "2023-06-20T12:45:52-0600" }, ... ] }
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }