Admin API

Overview

This API documentation covers management of tags and tag groups from external services.

URL scheme: https://<customer-id>.push.delivery/push-admin-api/<endpoint>

To use the service you need HTTP basic auth. Data is sent as JSON via POST. The client ID used in the endpoints is listed in the admin UI.

REST Endpoints

tag/add

Create a tag or make sure a tag or tag group with a specific source id exists. More than one tag or tag group can be specified in a single request. The expiration timestamps are optional. This is a POST request.

Example URL
https://<customer-id>.push.delivery/push-admin-api/tag/add/<client-id>
Example POST Request (content type: application/json) : create single tag in root
{
    "tags": [
        {
            "name" : "My Tag No. 1",
            "sourceId" : "my_tag_1",
            "expiration" : "expiration date in milliseconds (optional)",
            "tagOptionalParameters":{
                "auto-subscribe":"true",
                "visible":"false"
            }
        }
    ]
}
Example POST Request (content type: application/json) : create single tag in specific group
{
    "tags": [
        {
            "name" : "My Tag No. 1",
            "sourceId" : "my_tag_1",
            "expiration" : "expiration date in milliseconds (optional)",
            "groupSourceId" : "my_group_1",
            "tagOptionalParameters":{
                "auto-subscribe":"true",
                "visible":"false"
            }
        }
    ]
}
Example POST Request (content type: application/json) : create group in root
{
    "groups": [
        {
            "name" : "My Group Of Tags No. 1",
            "sourceId" : "my_group_1"
        }
    ]
}
Example POST Request (content type: application/json) : create group in other group
{
    "groups": [
        {
            "name" : "My Group Of Tags No. 2",
            "sourceId" : "my_group_2",
            "parentGroupSourceId" : "my_group_1"
        }
    ]
}
Example Response (content type: application/json) : after creating a tag
{
    "tags": [
        {
            "name" : "My Tag No. 1",
            "sourceId" : "my_tag_1",
            "expiration" : "expiration date in milliseconds (optional)",
            "id" : 123,
            "tagOptionalParameters":{
                "auto-subscribe":"true",
                "visible":"false"
            }
        }
    ]
}

tag/update

Update a tag or a tag group. Can also be used to move a tag or group to a different parent group. Only one tag or tag group can be specified in a single request. This is a POST request.

Example URL
https://<customer-id>.push.delivery/push-admin-api/tag/update/<client-id>

The update tag endpoint works the same way as the tag/add endpoint.

Example POST Request (content type: application/json) : update single tag to different specific group
{
    "tags": [
            {
                "sourceId" : "my_tag_1",
                "groupSourceId" : "my_group_2",
                "expiration" : "expiration date in milliseconds (optional)",
                "tagOptionalParameters":{
                    "auto-subscribe":"true",
                    "visible":"false"
                }
            }
      ]
}

tag/delete

Delete a tag or a tag group. Groups have to be empty before deleting. Only one tag or tag group can be specified in a single request. This is a POST request.

Example URL
https://<customer-id>.push.delivery/push-admin-api/tag/delete/<client-id>
Example POST Request (content type: application/json) : delete a tag by its source ID
{
    "tags": [
        {
            "sourceId" : "my_tag_1"
        }
    ]
}
Example POST Request (content type: application/json) : delete a tag group by its source ID
{
    "groups": [
        {
            "sourceId" : "my_group_1"
        }
    ]
}
Example Response (content type: text/plain)
  <empty-string>

tag/get

Get all tags and tag groups as tree. This is a GET request.

Example URL
https://<customer-id>.push.delivery/push-admin-api/tag/get/<client-id>
Example Response (content type: application/json)
{
    "tags": [
        {
            "id" : 123,
            "name" : "My Tag No. 1",
            "sourceId" : "my_tag_1",
            "expiration":"date in milliseconds (optional)",
            "tagOptionalParameters":{
                "auto-subscribe":"true",
                "visible":"false"
            }
        }
    ],
    "groups": [
        {
            "id" : 124,
            "name" : "My Group Of Tags No. 1",
            "sourceId" : "my_group_1",
            "tags" : [ ... ],
            "groups" : [ ... ]
        }
    ]
}