Increment Entity Views
curl --request PATCH \
--url https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"views": 123,
"title": "<string>",
"content": "<string>"
}Entity Endpoints
Increment Entity Views
Increment the view count of an entity
Increment Entity Views
curl --request PATCH \
--url https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/entities/:entityId/increment-views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"views": 123,
"title": "<string>",
"content": "<string>"
}This endpoint increments the view count of a specific entity by 1. It is typically triggered when a user visits or opens the entity. No authentication is required.
Path Parameters
string
required
The unique ID of the entity
Response
Returns the updated entity object with the incremented view count.string
Unique entity identifier
number
Updated view count
string
Entity title
string
Entity content
Error Responses
Invalid Entity ID - 400 Bad Request
Invalid Entity ID - 400 Bad Request
{
"error": "Invalid entity ID.",
"code": "entity/invalid-id"
}
Entity Not Found - 404 Not Found
Entity Not Found - 404 Not Found
{
"error": "Entity not found.",
"code": "entity/not-found"
}
Server Error - 500 Internal Server Error
Server Error - 500 Internal Server Error
{
"error": "An error occurred while updating entity views.",
"code": "entity/server-error",
"details": "<error message>"
}
Notes
- This endpoint is safe to call multiple times.
- No authentication is required.

