Tagging Methods

The Tagging API methods are used to export the type of data you see in your projects tags analytics page from the project. Available methods are:

  • Tag: Get the tags relating to events reported from your App
  • Tag-hit: Get info on devices generating the tags based on users app usage
  • Tag-attribute-client: Get info on attributes associated with users 

 

Tag

Used to get a list of the tags that have been reported from your App for example "home_page", "news_page", "checkout_btn" etc.

URL

api/external/list/tag

Parameters

Parameter Description
apptoken Your App token
order Order the list in either ascending or descending order based on any of the attributes e.g. “order”: ["id ASC", "id" ] or "order": ["id DESC", "id" ]
select Select what attributes to return e.g. "select": ["id","title"]
condition Filter the returned devices based on some criteria e.g. "condition": [ ["id", ">" , 3113692] ]
limit Used with offset for pagination e.g. "limit": 50, "offset": 0 returns a max of 50 devices starting at position 0
offset Used with limit for pagination e.g. "limit": 50, "offset": 0 returns a max of 50 devices starting at position 0

Example

Get all tags

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN"}' https://external-api.xtremepush.com//api/external/list/tag

Get all tags and order by ascending id

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "id" ]}' https://external-api.xtremepush.com//api/external/list/tag

Get all tags, order by ascending id, and select id and title

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "id" ], "select": ["id","title"] }' https://external-api.xtremepush.com//api/external/list/tag

Get all tags, order by ascending id, select id and title, and filter by a condition

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "id" ], "select": ["id","title"], "condition": [ ["id", ">" , 3113692] ] }' https://external-api.xtremepush.com//api/external/list/tag

Get all tags, order by ascending id, select id and title, and use pagination

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "id" ], "select": ["id","title"], "limit": 50, "offset": 0 }' https://external-api.xtremepush.com//api/external/list/tag

Sample JSON response for a single tag:

{
    "code": 200, 
    "data": [
        {
            "id": 3062, 
            "is_flag": 0, 
            "project_id": 261, 
            "title": "SettingsPage.IncreaseDifficulty.Hard"
        }
    ], 
    "success": true
}

Tag-hit

Used to get information on devices hitting the tags that have been seen.

URL

api/external/list/tag-hit

Parameters

Parameter Description
apptoken Your App token
order Order the list in either ascending or descending order based on any of the attributes e.g. “order”: ["id ASC", "create_time" ] or "order": ["id DESC", "create_time" ]
select Select what attributes to return e.g. "select": ["create_time","tag_id","device_id"]
condition Filter the returned devices based on some criteria e.g. "condition": [ ["create_time", ">" , 1432303411] ]
limit Used with offset for pagination e.g. "limit": 50, "offset": 0 returns a max of 50 devices starting at position 0
offset Used with limit for pagination e.g. "limit": 50, "offset": 0 returns a max of 50 devices starting at position 0

Example

Get all tag-hits

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN"}' https://external-api.xtremepush.com//api/external/list/tag-hit

Get all tag-hits ordered by ascending create_time

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "create_time" ]}' https://external-api.xtremepush.com//api/external/list/tag-hit

Get all tag-hits, ordered by ascending create_time, and select create_time, tag_id and device

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "create_time" ], "select": ["create_time","tag_id","device_id"] }' https://external-api.xtremepush.com//api/external/list/tag-hit

Get all tag-hits, ordered by ascending create_time, and filtered by a condition

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "create_time" ], "condition": [ ["create_time", ">" , 1432308930] ] }' https://external-api.xtremepush.com//api/external/list/tag-hit

Get all tag-hits, ordered by ascending create_time, select create_time, tag_id and device_id, and use pagination

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "order": ["id ASC", "create_time" ], "select": ["create_time","tag_id","device_id"], "limit": 1, "offset": 0 }' https://external-api.xtremepush.com//api/external/list/tag-hit

Sample JSON response for a single tag-hit:

{
    "code": 200, 
    "data": [
        {
            "id": 120052415,
            "project_id": 261,
            "tag_id": 3062,
            "device_id": 2824967,
            "metric_id": null,
            "value": null,
            "create_time": 1415031003
        }
    ], 
    "success": true
}

Description of attributes:

  • "id": 10, - id of tag hit
  • "project_id": 3,
  • "tag_id": 18, - id of tag
  • "device_id": 1, - id of the device that made the hit
  • "metric_id": null, - id of the metric attached to the hit
  • "value": null - null if value is not set, contains value related to tag if set
  • "create_time": 1431510125, - time and date of hit

 

Tag-attribute-client

Used to get information on attributes associated with users or devices.

URL

api/external/list/tag-attribute-client

Parameters

Parameter Description
apptoken Your App token
select Select what attributes to return e.g. "select": ["create_time","tag_id","device_id"]
condition Filter the returned devices based on some criteria e.g. "condition": [ ["create_time", ">" , 1432303411] ]
limit Used with offset for pagination e.g. "limit": 50, "offset": 0 returns a max of 50 devices starting at position 0
offset Used with limit for pagination e.g. "limit": 50, "offset": 0 returns a max of 50 devices starting at position 0

 

Example

Get all attributes:

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN"}' https://external-api.xtremepush.com/api/external/list/tag-attribute-client

Get all attributes for a specific device

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "condition": [["device_id","=", 55555], ["tag_id","=",55555555] ] }' https://external-api.xtremepush.com/api/external/list/tag-attribute-client

Get a specific attribute for a specific device

curl -X POST -d '{ "apptoken": "YOUR_APPTOKEN", "condition": [["device_id","=", 55555]] }' https://external-api.xtremepush.com/api/external/list/tag-attribute-client

Sample JSON response for a single attribute:

{
    "code": 200, 
    "data": [
        {
            "project_id": 261,
            "tag_id": 3062,
            "device_id": 2824967,
            "value": 500,
            "update_time": 1415031003
        }
    ], 
    "success": true
}

Description of attributes:

  • "project_id": 3, id of project (app or website attribute is linked to) 
  • "tag_id": 18, - id of tag
  • "device_id": 1, - id of the device that attribute is associated with
  • "value":  - contains value of attribute, can be null
  • "update_time": 1431510125, - time and date attribute was last updated
Have more questions? Submit a request

0 Comments

Article is closed for comments.