Quest Protocol
  • Introduction
    • Welcome to Quest Protocol
    • Integrate & Partner with Quest
    • Use Cases
      • Creator Platforms
      • Gaming
      • NFT Marketplaces
      • Social Media DApps
      • DeFi
  • QUEST PLATFORM
    • Creating a Campaign
    • Audience Overview
    • User Profile
    • Discover Page
    • Perk Store
    • Integrations
    • Memberships
    • Segmentation & Targetting
    • AI Insights
  • QUEST PROTOCOL - SDKs & APIs
    • UI SDK Components
      • Embedded XP Points
      • Embedded in-dApp Guides
      • Embedded Web3 Search
      • Embedded Quests
    • Quest SDKs & APIs
      • User
      • Entity
      • Badge
      • Campaign
      • App Metric
      • Membership Card
      • Entity Tag
      • Membership Tier
      • Skill
      • Entity Credit Tier
      • Gem
      • Custom Reward
      • Entity Gem
      • Entity Alert
      • Entity Feature Flag
      • Entity Data contract
      • Entity Authentication Token
      • Event Metric Mapping
    • Data Engine
  • Website
  • Quest Thesis
Powered by GitBook
On this page
  1. QUEST PROTOCOL - SDKs & APIs
  2. Quest SDKs & APIs

Event Metric Mapping

PreviousEntity Authentication TokenNextData Engine

Last updated 1 year ago

Get Event Metric Mapping by Event Name

get

Retrieve event metric mapping details based on entity ID and event name.

Path parameters
entityIdstringRequired

The ID of the entity.

Example: exampleEntityId
eventNamestringRequired

The name of the event.

Example: exampleEventName
Responses
200
Successful operation
application/json
400
EventMetricMapping not found
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/eventMetricMapping/eventName/{eventName} HTTP/1.1
Host: api.questprotocol.xyz
Accept: */*
{
  "entityId": "exampleEntityId",
  "eventName": "exampleEventName",
  "properties": [
    {
      "value": "exampleValue"
    }
  ],
  "metrics": [
    "exampleMetric"
  ],
  "platform": "examplePlatform",
  "isDeleted": false
}

Delete Event Metric Mapping by Event Name

post

Delete event metric mapping based on entity ID and event name.

Path parameters
entityIdstringRequired

The ID of the entity.

Example: exampleEntityId
eventNamestringRequired

The name of the event.

Example: exampleEventName
Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful operation
application/json
400
EventMetricMapping not found
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/eventMetricMapping/eventName/{eventName}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true
}
  • GETGet All Event Metric Mappings
  • POSTCreate Event Metric Mapping
  • GETGet Event Metric Mapping by Event Name
  • POSTUpdate Event Metric Mapping by Event Name
  • POSTDelete Event Metric Mapping by Event Name
  • POSTRemove Metrics from Event Metric Mapping
  • POSTCreate Many Event Metric Mappings

Get All Event Metric Mappings

get

Get all event metric mappings for a specific entity.

Path parameters
entityIdstringRequired

The ID of the entity.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful operation
application/json
500
Internal Server Error
application/json
get
GET /api/entities/{entityId}/eventMetricMapping HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true,
  "data": [
    {
      "entityId": "exampleEntityId",
      "eventName": "exampleEventName",
      "properties": [
        {
          "value": "exampleValue"
        }
      ],
      "metrics": [
        "exampleMetric"
      ],
      "platform": "examplePlatform",
      "isDeleted": false
    }
  ]
}

Create Event Metric Mapping

post

Create a new event metric mapping for an entity.

Path parameters
entityIdstringRequired

The ID of the entity.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
eventNamestringRequired
platformstringRequired
Responses
201
Successful operation
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/eventMetricMapping HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "eventName": "text",
  "properties": [
    {
      "value": "text"
    }
  ],
  "platform": "text"
}
{
  "success": true,
  "message": "New Event metric mapping created successfully."
}

Update Event Metric Mapping by Event Name

post

Update event metric mapping details based on entity ID and event name.

Path parameters
entityIdstringRequired

The ID of the entity.

Example: exampleEntityId
eventNamestringRequired

The name of the event.

Example: exampleEventName
Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
platformstringRequired
Responses
200
Successful operation
application/json
400
EventMetricMapping not found
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/eventMetricMapping/eventName/{eventName}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "properties": [
    {
      "value": "exampleValue"
    }
  ],
  "platform": "examplePlatform"
}
{
  "entityId": "exampleEntityId",
  "eventName": "exampleEventName",
  "properties": [
    {
      "value": "exampleValue"
    }
  ],
  "metrics": [
    "exampleMetric"
  ],
  "platform": "examplePlatform",
  "isDeleted": false
}

Remove Metrics from Event Metric Mapping

post

Remove specified metrics from an event metric mapping based on entity ID and event name.

Path parameters
entityIdstringRequired

The ID of the entity.

Example: exampleEntityId
eventNamestringRequired

The name of the event.

Example: exampleEventName
Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
metricstringRequired
Responses
200
Successful operation
application/json
400
EventMetricMapping not found
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/eventMetricMapping/eventName/{eventName}/remove-metrics HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "metric": "exampleMetric"
}
{
  "success": true
}

Create Many Event Metric Mappings

post

Create multiple event metric mappings.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
Responses
201
Successful operation
application/json
500
Server error
application/json
post
POST /api/create-many/eventMetricMapping HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 338

{
  "data": [
    {
      "entityId": "exampleEntityId1",
      "eventName": "exampleEventName1",
      "properties": [
        {
          "value": "exampleValue1"
        }
      ],
      "metrics": [
        "exampleMetric1"
      ],
      "platform": "examplePlatform1"
    },
    {
      "entityId": "exampleEntityId2",
      "eventName": "exampleEventName2",
      "properties": [
        {
          "value": "exampleValue2"
        }
      ],
      "metrics": [
        "exampleMetric2"
      ],
      "platform": "examplePlatform2"
    }
  ]
}
{
  "success": true,
  "data": [
    {
      "entityId": "exampleEntityId1",
      "eventName": "exampleEventName1",
      "properties": [
        {
          "value": "exampleValue1"
        }
      ],
      "metrics": [
        "exampleMetric1"
      ],
      "platform": "examplePlatform1"
    },
    {
      "entityId": "exampleEntityId2",
      "eventName": "exampleEventName2",
      "properties": [
        {
          "value": "exampleValue2"
        }
      ],
      "metrics": [
        "exampleMetric2"
      ],
      "platform": "examplePlatform2"
    }
  ]
}