App Metric
This endpoint retrieves all the app metrics.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/metrics HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"id": "id-1",
"name": "app-metric-name"
}
}
This endpoint allows creating a new app metric.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
metric-1
Metric Name
Metric description
metric_type
10
segment
metric_event
POST /api/entities/{entityId}/metrics HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 165
{
"metric": "metric-1",
"name": "Metric Name",
"description": "Metric description",
"type": "metric_type",
"thresholdTime": 10,
"platform": "segment",
"eventName": "metric_event"
}
{
"success": true,
"data": {
"metric": "metric-1",
"entityId": "entityId-1",
"type": "metric_type",
"name": "Metric Name",
"description": "Metric description",
"thresholdTime": 10,
"isEnabled": true,
"createdAt": "2023-01-01T00:00:00Z",
"platform": "segment",
"eventName": "metric_event"
}
}
This endpoint retrieves the app metrics info for a user.
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/users/{userId}/metrics/{metric} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"metric": "metric-1",
"counter": 10
}
}
This endpoint allows to increment app metrics of a user.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The Id of the user performing the request.
dummy-userid
The token for user authentication.
dummy-token
10
POST /api/entities/{entityId}/users/{userId}/metrics/{metric} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 12
{
"count": 10
}
{
"success": true
}
This endpoint retrieves all the app metrics for a user.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/users/{userId}/metrics HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
"success": true,
"data": {
"id": "id-1",
"name": "app-metric-name"
}
}
This endpoint allows to increment multiple app metrics of a user.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
POST /api/entities/{entityId}/users/{userId}/metrics HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"metrics": [
{
"metricId": "dummy-id",
"count": 10
}
]
}
{
"success": true
}
This endpoint allows deleting an app metric.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
POST /api/entities/{entityId}/metrics/{metric}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
"success": true
}
This endpoint allows updating an app metric.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
POST /api/entities/{entityId}/metrics/{metric}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 161
{
"name": "Updated Metric Name",
"description": "Updated metric description.",
"type": "counter",
"thresholdTime": 3600,
"platform": "segment",
"eventName": "updated_event"
}
{
"success": true
}
This endpoint retrieves a summary of metric claims for an entity.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/metrics/claims HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
"success": true,
"data": [
{
"metric": "metric-1",
"count": 10
}
]
}
This endpoint retrieves the value of a Dapp metric for an entity.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/users/{userId}/getmetrics/{metric} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
"success": true,
"data": 10
}
This endpoint retrieves the metric summary for a quest in a specified entity.
The Id of the user performing the request.
dummy-userid
The API key for authentication
test
The secret key for authentication
test-secret
The token for user authentication.
dummy-token
GET /api/entities/{entityId}/quests/{questId}/metric-summary HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
"success": true,
"data": [
{
"metric": "quest-metric-1",
"date": "2023-12-31",
"count": 10,
"metricDetails": {
"metric": "quest-metric-1",
"entityId": "entity-id-1",
"type": "metric-type",
"name": "metric-name",
"description": "metric-description",
"thresholdTime": 60000,
"isEnabled": true,
"createdAt": "2023-01-01T00:00:00Z",
"platform": "segment",
"eventName": "metric-event"
}
}
]
}
Last updated