Skip to content

Report a view of the published app

POST
/api/workspaces/{workspaceId}/apps/{id}/usage
curl --request POST \
--url http://localhost:8080/api/workspaces/example/apps/example/usage \
--header 'Content-Type: application/json' \
--cookie auth_session=<auth_session> \
--data '{ "kind": "open", "source": "app", "sessionId": "example", "referrerKind": "internal", "placement": { "surface": "home", "shelf": "popular", "position": 1 } }'

Sent by Mako’s own app views: open once per view, heartbeat every 60 s while the page is visible (each worth 60 active seconds), both carrying the view’s sessionId. Every accepted report lands in the raw event log; a repeat open inside the throttle window is logged flagged throttled and left out of the daily counters, a heartbeat flood is refused (429). API keys without a user are not viewers and are ignored. Answers 204.

workspaceId
required
string
id
required
string
Media typeapplication/json
object
kind
required
string
Allowed values: open heartbeat
source
string
default: app
Allowed values: app share embed
sessionId
string
>= 1 characters <= 64 characters
referrerKind
string
Allowed values: internal external direct
placement
object
surface
required
string
Allowed values: home
shelf
required
string
Allowed values: popular new recommended recent mine attention search
position
required
integer
<= 10000

Successful response

Media typeapplication/json
object
success

Whether the request succeeded.

boolean
data

Endpoint-specific response payload.

message
string
error
string

Example

{
"message": "Operation completed",
"error": "Error message"
}

Invalid request

Media typeapplication/json
object
success
boolean
error
string

Example

{
"error": "Error message"
}

Internal server error

Media typeapplication/json
object
success
boolean
error
string

Example

{
"error": "Error message"
}