Avaya Breeze® platform
EFC REST API

Create Subscription


Sample subscription - the remote subscriber endpoint expects events in multipart/form-data format

In this case callbackContentType is optional

{
    "family":"Call",
    "eventTypes":[
        "CALL_ALERTING",
        "PARTICIPANT_DROPPED"
    ],
    "callbackUrl":"http://example.com:9988",
    "callbackContentType":"multipart/form-data",
    "filter":{
        "user":"someuser",
        "criteria":[
            {
                "key":"appid",
                "value":"1234"
            },
            {
                "key":"appid7",
                "value":"12347"
            },
        ]
    }
}


Sample subscription - the remote subscriber endpoint expects events in json format
{
    "family":"Call",
    "eventTypes":[
        "CALL_ALERTING",
        "PARTICIPANT_DROPPED"
    ],
    "callbackUrl":"http://example.com:9988",
    "callbackContentType":"application/json",
    "filter":{
        "user":"someuser",
        "criteria":[
            {
                "key":"appid",
                "value":"1234"
            },
            {
                "key":"appid7",
                "value":"12347"
            },
        ]
    }
}

Sample subscription response
{
    "subscriptionId":"EventingConnect-PREFERRED-66c5ad968cf52f291452c09b126bf386d17466ea5722ed61439e039423c00dd3",
    "additionalProperties":{}
}

Subscription.json
{
    "title":"Subscription",
    "description":"Subscription schema",
    "type":"object",
    "properties":{
        "family":{
            "description":"The family of event",
            "type":"string"
        },
        "eventTypes":{
            "type":"array",
            "eventType":{
                "type":"string"
            },
            "minItems":0,
            "uniqueItems":true
        },
        "callbackUrl":{
            "description":"endpoint of the listener",
            "type":"string"
        },
        "callbackContentType":{
            "description":"content-type of the event to be sent to endpoint of the listener, options [multipart/form-data, application/json]. Default is multipart/form-data",
            "type":"string"
        },
        "filter":{
            "description":"filters on metadata",
            "type":"object",
            "properties":{
                "correlationId":{
                    "type":"string"
                },
                "user":{
                    "type":"string"
                },
                "serviceProfile":{
                    "type":"string"
                },
                "criteria":{
                    "id":"criteria",
                    "type":"array",
                    "items":{
                        "$ref":"#/criterion"
                    },
                    "additionalItems":false
                },
                "ignoreCaseCriteria":{
                    "id":"ignoreCaseCriteria",
                    "type":"array",
                    "items":{
                        "$ref":"#/criterion"
                    },
                    "additionalItems":false
                }
            }
        }
    },
    "criterion":{
        "id":"items",
        "type":"object",
        "properties":{
            "key":{
                "id":"key",
                "type":"string"
            },
            "value":{
                "id":"value",
                "type":"string"
            }
        },
        "additionalProperties":false
    }
}

SubscriptionResponse.json
{
    "title":"SubscriptionResponse",
    "description":"Response object of subscription from EFC",
    "type":"object",
    "properties":{
        "subscriptionId":{
            "type":"string",
            "description":"ID of the subscription"
        },
        "message":{
            "type":"string"
        }
    }
}

Copyright © 2017 Avaya. All Rights Reserved.