Wazo Asterisk Manager Interface API (wazo-amid)

A thin REST facade over the Asterisk Manager Interface. Executes AMI actions and Asterisk CLI commands, and republishes AMI events onto the Wazo bus. Internal-platform surface, not intended for direct tenant use.

OpenAPI Specification

wazo-amid-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: wazo-amid
  description: Send AMI actions to Asterisk, providing token based authentication.
  version: '0.1'
  contact:
    name: Wazo Dev Team
    url: https://wazo-platform.org/
    email: dev@wazo.community
  x-logo:
    url: https://wazo-platform.org/images/logo-black.svg
    backgroundColor: '#FAFAFA'
    altText: Wazo Logo
schemes:
- http
basePath: /1.0
produces:
- application/json
x-xivo-name: amid
x-xivo-port: 9491
securityDefinitions:
  wazo_auth_token:
    type: apiKey
    name: X-Auth-Token
    in: header
security:
- wazo_auth_token: []
paths:
  /config:
    get:
      produces:
      - application/json
      summary: Show the current configuration
      description: '**Required ACL:** `amid.config.read`'
      operationId: getConfig
      tags:
      - config
      responses:
        '200':
          description: The configuration of the service
    patch:
      produces:
      - application/json
      summary: Update the current configuration.
      description: '**Required ACL:** `amid.config.update`

        Changes are not persistent across service restart.

        '
      operationId: patchConfig
      tags:
      - config
      parameters:
      - $ref: '#/parameters/ConfigPatch'
      responses:
        '200':
          description: The updated configuration of the service
        '400':
          description: The given configuration is invalid
  /action/{action}:
    post:
      summary: AMI action
      description: '**Required ACL:** `amid.action.{action}.create`


        The Action endpoint sends an action to the Asterisk Manager.


        See https://docs.asterisk.org/Latest_API/API_Documentation/AMI_Actions/ for more details about the AMI message parameters.

        '
      parameters:
      - name: action
        in: path
        description: 'Name of the manager action. Currently not supported: Queues, Command.'
        required: true
        type: string
      - name: action_arguments
        in: body
        description: 'Arguments for the manager action.


          Action: taken from the URL

          ActionID: not necessary


          If you need a same key multiple times, give a list of values.


          For Action: Originate, you should always use Async: True'
        schema:
          $ref: '#/definitions/ActionArguments'
      tags:
      - action
      responses:
        '200':
          description: The Asterisk Manager responses
          schema:
            $ref: '#/definitions/Response'
        '401':
          description: Invalid authentication token
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Another service is unavailable (e.g. wazo-auth)
          schema:
            $ref: '#/definitions/Error'
  /action/Command:
    post:
      summary: AMI command
      description: '**Required ACL:** `amid.action.Command.create`


        This endpoint sends a command to the Asterisk Manager.


        See https://docs.asterisk.org/Latest_API/API_Documentation/AMI_Actions/ for more details about the AMI message parameters.

        '
      parameters:
      - name: command
        in: body
        description: 'The command to send to the manager.


          '
        schema:
          $ref: '#/definitions/Command'
      tags:
      - command
      responses:
        '200':
          description: The Asterisk Manager response
          schema:
            $ref: '#/definitions/CommandResponse'
        '400':
          description: Invalid request
          schema:
            $ref: '#/definitions/Error'
        '401':
          description: Invalid authentication token
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Another service is unavailable (e.g. wazo-auth)
          schema:
            $ref: '#/definitions/Error'
  /status:
    get:
      summary: Print infos about internal status of wazo-amid
      description: '**Required ACL:** `amid.status.read`'
      tags:
      - status
      responses:
        '200':
          description: The internal infos of wazo-amid
          schema:
            $ref: '#/definitions/StatusSummary'
definitions:
  Response:
    properties:
      response:
        type: string
        description: Name of the action response
  ActionArguments:
    properties: {}
    example:
      Channel: SIP/abcdef
      Priority: '1'
      Exten: '1234'
      Context: default
      Variable:
      - Var1=one
      - Var2=two
      Async: 'True'
  Error:
    properties:
      timestamp:
        type: number
        format: timestamp
      message:
        type: string
      error_id:
        type: string
      details:
        type: object
  Command:
    properties:
      command:
        type: string
    required:
    - command
  CommandResponse:
    properties:
      response:
        type: array
        items:
          type: string
  ConfigPatchItem:
    properties:
      op:
        type: string
        description: 'Patch operation. Supported operations: `replace`.'
      path:
        type: string
        description: 'JSON path to operate on. Supported paths: `/debug`.'
      value:
        type: object
        description: The new value for the operation. Type of value is dependent of `path`
  StatusSummary:
    type: object
    properties:
      rest_api:
        $ref: '#/definitions/ComponentWithStatus'
      service_token:
        $ref: '#/definitions/ComponentWithStatus'
      ami_socket:
        $ref: '#/definitions/ComponentWithStatus'
      bus_publisher:
        $ref: '#/definitions/ComponentWithStatus'
  ComponentWithStatus:
    type: object
    properties:
      status:
        $ref: '#/definitions/StatusValue'
  StatusValue:
    type: string
    enum:
    - fail
    - ok
parameters:
  ConfigPatch:
    name: ConfigPatch
    in: body
    required: true
    description: See https://en.wikipedia.org/wiki/JSON_Patch.
    schema:
      type: array
      items:
        $ref: '#/definitions/ConfigPatchItem'
x-apievangelist-source:
  harvested_from: https://github.com/wazo-platform/wazo-amid
  assembly: base plugin api.yml deep-merged with all plugin api.yml fragments, reproducing what the running service serves
    at /api/amid/1.0/api/api.yml (see wazo_amid/plugins/api/http.py — xivo.chain_map.ChainMap)
  spec_version: Swagger 2.0 (as published by Wazo)
  harvested: '2026-08-17'