Community

Count a view

Count one view of a shown work: once a day per visitor, and nobody who viewed is kept — the mark is a salted one-way digest deleted with its day. Takes no key; a key that holds community:write is counted by its account, and an author viewing their own work is never counted. A view that cannot be attributed answers counted: false.

POST
/v1/community/publications/{id}/views
POST
/v1/community/publications/{id}/views
Count a view
Count one view of a shown work: once a day per visitor, and nobody who viewed is kept — the mark is a salted one-way digest deleted with its day.
Authorizationstringrequired
Your API key. It is sent only when you press Send, to this request alone, and never stored.
idstringrequired
Count a view
curl --request POST \
  --url 'https://api.auray.ai/v1/community/publications/{id}/views' \
  --header 'Authorization: Bearer <api-key>'
  --header 'Content-Type: application/json' \
  --data '{
  
}'
{
  "object": "<string>",
  "publication_id": "<string>",
  "counted": true,
  "request_id": "<string>"
}
Count a view
curl -X POST https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d/views
{
  "object": "<string>",
  "publication_id": "<string>",
  "counted": true,
  "request_id": "<string>"
}

Authorizations

No key needed: the public pages count their readers through the landing. A key that holds community:write is counted by its account.

Path Parameters

idstringrequired

Response

application/json

OK.

objectstringrequired
One of "view".
publication_idstringrequired
countedbooleanrequired
False when this visitor was counted already today.
request_idstring
Mirrored in the X-Request-Id header.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

Was this page helpful?

Count a view
curl -X POST https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d/views
{
  "object": "<string>",
  "publication_id": "<string>",
  "counted": true,
  "request_id": "<string>"
}

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close search.