Asterisk Project : Asterisk 13 Events REST API

Events

Method

Path

Return Model

Summary

GET

/events

Message

WebSocket connection for events.

POST

/events/user/{eventName}

void

Generate a user event.

GET /events

WebSocket connection for events.

Query parameters

  • app: string - (required) Applications to subscribe to.
    • Allows comma separated values.

POST /events/user/{eventName}

Generate a user event.

Path parameters

  • eventName: string - Event name

Query parameters

  • application: string - (required) The name of the application that will receive this event
  • source: string - URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName}
    • Allows comma separated values.

Body parameter

  • variables: containers - The "variables" key in the body object holds custom key/value pairs to add to the user event. Ex. { "variables": { "key": "value" } }

Error Responses

  • 404 - Application does not exist.
  • 422 - Event source not found.
  • 400 - Invalid even tsource URI or userevent data.