Get story views
GET
/api/stories/{storyId}/views
const url = 'http://localhost:3001/api/stories/example/views';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3001/api/stories/example/views \ --header 'Authorization: <Authorization>'Retrieve all views for a story (only the owner can see who viewed their story)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”storyId
required
string
Story ID
Responses
Section titled “Responses”OK
Media typeapplication/json
object
message
string
success
boolean
total_views
integer
views
Array<object>
object
avatar_chunk_id
integer
first_name
string
last_name
string
username
string
viewed_at
Unix timestamp
integer
viewer_address
string
Examplegenerated
{ "message": "example", "success": true, "total_views": 1, "views": [ { "avatar_chunk_id": 1, "first_name": "example", "last_name": "example", "username": "example", "viewed_at": 1, "viewer_address": "example" } ]}Bad Request
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Forbidden
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}