# Asterisk Project : Asterisk 13 Applications REST API

Created by wikibot on Aug 08, 2014

# Applications

Method | Path | Return Model | Summary
--- | --- | --- | ---
GET | /applications | List[Application] | List all applications.
GET | /applications/{applicationName} | Application | Get details of an application.
POST | /applications/{applicationName}/subscription | Application | Subscribe an application to a event source.
DELETE | /applications/{applicationName}/subscription | Application | Unsubscribe an application from an event source.

## GET /applications

List all applications.

## GET /applications/{applicationName}

Get details of an application.

### Path parameters

- applicationName: string - Application's name

### Error Responses

- 404 - Application does not exist.

## POST /applications/{applicationName}/subscription

Subscribe an application to a event source. Returns the state of the application after the subscriptions have changed

### Path parameters

- applicationName: string - Application's name

### Query parameters

- eventSource: string - (required) URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}
  - Allows comma separated values.

### Error Responses

- 400 - Missing parameter.
- 404 - Application does not exist.
- 422 - Event source does not exist.

## DELETE /applications/{applicationName}/subscription

Unsubscribe an application from an event source. Returns the state of the application after the subscriptions have changed

### Path parameters

- applicationName: string - Application's name

### Query parameters

- eventSource: string - (required) URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}
  - Allows comma separated values.

### Error Responses

- 400 - Missing parameter; event source scheme not recognized.
- 404 - Application does not exist.
- 409 - Application not subscribed to event source.
- 422 - Event source does not exist.