Tag API

PARAMETERS

X-netmera-api-key :  Netmera API Key. You can get it from the application’s overview page on netmera.com

customFields : It is a key-value pairs which is is used to add those fields during push user registration.

List Tags

Following code is used to list all existing tags for the given application apikey.

curl -X GET \
-H "X-netmera-api-key: ${API_KEY}" \
-H "Content-Type: application/json"
https://api.netmera.com/tag/1.0
Create a Tag

Following code is used to create a tag, Note that, tags are created implicitly when devices registered with tag information.

curl -X POST \
-H "X-netmera-api-key: ${API_KEY}" \
-H "Content-Type: application/json"
https://api.netmera.com/tag/1.0/{tagName}
Delete a Tag

Following code is used to delete a tag, Note that, this will delete the tag from all devices, all devices registered with this tag will be unregistered from the given tag.

curl -X DELETE \
-H "X-netmera-api-key: ${API_KEY}" \
-H "Content-Type: application/json"
https://api.netmera.com/tag/1.0/{tagName}
Get a Tag Detail

Following code is used to get detailed information related with the tag.

curl -X GET \
-H "X-netmera-api-key: ${API_KEY}" \
-H "Content-Type: application/json"
https://api.netmera.com/tag/1.0/{tagName}
Adding Devices to Tag

Following code is used to add multiple devices to the tag. All devices will be registered to the given tag.

curl -X POST \
-H "X-netmera-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"registrationIds": ["55555555", "666666666", "7777777777"],
}' \
https://api.netmera.com/tag/1.0/{tagName}/batch
Removing Devices from Tag

Following code is used to remove multiple devices from the tag. All devices will be unregistered from the given tag.

curl -X DELETE \
-H "X-netmera-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"registrationIds": ["55555555", "666666666", "7777777777"],
}' \
http://api.netmera.com/tag/1.0/{tagName}/batch
Tag Users by Custom Field

Following code is used to add given tag to the users who has a given custom field(s).

curl -X POST \
-H "X-netmera-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
        "customFields": {
            "key1": "value1",
            "key2": "value2"
        }
}' \
https://api.netmera.com/tag/1.0/{tagName}/tagging

March 31, 2015 / parag

Recent Blog Posts
ROI based app marketing for your business
App Indexing: some insights
Categories