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 |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/feedback/{feedback_id} |
Code Block |
---|
{ "id": "7tUf2ogBKXyr_Xtc4seO", "username": "string", "comments": "string", "rating": 5, "metadata": { "something": true }, "timestamp": "2023-06-20T12:46:15-0600" } |
Code Block |
---|
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] } |
Creates a specific feedback. Requires feedback ID and authorization.
Info |
---|
This endpoint does not require any parameters. |
Code Block | ||
---|---|---|
| ||
POST /es/api/v1/feedback/ { "username": "john_doe", "comments": "Great service!", "rating": 5, "metadata": {} } |
Code Block |
---|
{ "feedback_id": "LNV12ogBKXyr_XtcNsjC", "result": "created" } |
Code Block |
---|
{ "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 |
Code Block | ||
---|---|---|
| ||
PUT /es/api/v1/feedback/{feedback_id} { "username": "john_doe", "comments": "Excellent service!", "rating": 5, "metadata": {} } |
Code Block |
---|
{ "feedback_id": "LNV12ogBKXyr_XtcNsjC", "result": "created" } |
Code Block |
---|
{ "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 |
Code Block | ||
---|---|---|
| ||
DELETE /es/api/v1/feedback/{feedback_id} |
Code Block |
---|
{ "feedback_id": "7tUf2ogBKXyr_Xtc4seO", "result": "deleted" } |
Code Block |
---|
{ "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 |
Code Block | ||
---|---|---|
| ||
GET /es/api/v1/feedback/?query=example&sort_asc=true&max_values=5 |
Code Block |
---|
{ "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" }, ... ] } |
Code Block |
---|
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] } |