Increment Entity Views
Endpoint
URL: https://api.replyke.com/:projectId/entities/:entityId/increment-views
Method: PATCH
Authentication Required: No
Description
This endpoint allows the client to increment the view count of an entity. It is typically called when an entity is viewed to keep track of its popularity.
Request
URL Parameters
Parameter | Type | Required | Description |
---|---|---|---|
projectId | string | Yes | The project ID associated with the request. |
entityId | string | Yes | The ID of the entity whose view count should be incremented. |
Headers
None
Body Parameters
None
Example Request
PATCH /12345/entities/67890/increment-views
Response
Success Response (200 OK)
(no content)
Error Responses
Missing Entity ID (400 Bad Request)
{
"error": "Invalid entityId"
}
Entity Not Found (404 Not Found)
{
"error": "Entity not found"
}
Server Error (500 Internal Server Error)
{
"error": "An error occurred while updating entity views"
}
Notes
- This endpoint does not require authentication.
- The view count is incremented each time this endpoint is called.
- The response body is empty for a successful request.