App Metric

Get all app metrics

get

This endpoint retrieves all the app metrics.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
get
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"
  }
}

Create a new app metric

post

This endpoint allows creating a new app metric.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
metricstringRequiredExample: metric-1
namestringOptionalExample: Metric Name
descriptionstringOptionalExample: Metric description
typestringOptionalExample: metric_type
thresholdTimenumberOptionalExample: 10
platformstringOptionalExample: segment
eventNamestringOptionalExample: metric_event
Responses
200
Successful response
application/json
post
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"
  }
}

Get app metrics info of a user

get

This endpoint retrieves the app metrics info for a user.

Path parameters
entityIdstringRequired
userIdstringRequired
metricstringRequired
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
get
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
  }
}

Increment app metrics for a user

post

This endpoint allows to increment app metrics of a user.

Path parameters
entityIdstringRequired
userIdstringRequired
metricstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
countnumberOptionalExample: 10
Responses
200
Successful response
application/json
post
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
}

Get all app metrics of a user

get

This endpoint retrieves all the app metrics for a user.

Path parameters
entityIdstringRequired
userIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
get
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"
  }
}

Increment multiple app metrics for a user

post

This endpoint allows to increment multiple app metrics of a user.

Path parameters
entityIdstringRequired
userIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
Responses
200
Successful response
application/json
post
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
}

Delete an app metric

post

This endpoint allows deleting an app metric.

Path parameters
entityIdstringRequired
metricstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/metrics/{metric}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true
}

Update an app metric

post

This endpoint allows updating an app metric.

Path parameters
entityIdstringRequired
metricstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
namestringOptional
descriptionstringOptional
typestringOptional
thresholdTimenumberOptional
platformstringOptional
eventNamestringOptional
Responses
200
Successful response
application/json
post
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
}

Get metric claim summary

get

This endpoint retrieves a summary of metric claims for an entity.

Path parameters
entityIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
get
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
    }
  ]
}

Get Dapp metric value for entity

get

This endpoint retrieves the value of a Dapp metric for an entity.

Path parameters
entityIdstringRequired
userIdstringRequired
metricstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
get
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
}

Get metric summary for a quest

get

This endpoint retrieves the metric summary for a quest in a specified entity.

Path parameters
entityIdstringRequired
questIdstringRequired
Query parameters
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
apisecretstringOptional

The secret key for authentication

Example: test-secret
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
get
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