User Tools

Site Tools


api:pbx:audio:update

API : PBX : Sound Update

Introduction

Audio items can be played back to a caller. An audio item consists of metadata (name, length, owner) and link to the audio on the audio servers.

This request will update the name of an audio item (metadata, not the actual audio).

Request

URL https://api.telecomx.dk/pbx/audio/AUDIO_ID
Method POST
Access level PERSONAL if audio belongs to the user
MANAGER, OWNER, RESELLER, ADMIN.
Param AUDIO_ID String Id of the audio (24 hex-char string)
Body name String Name/description of the audio item.

Request body example

{
  name: 'Outside opening hours'
}

Response

The response will be the updated audio item, if no errors occurred.

Json object
_id Id Unique ID of the audio.
usedBy Array Array of Id's of - dialplan items that uses the audio.
name String Human readable name of the audio.
length Number Length of the audio in seconds.

Note that properties holding no value may be omitted from the object.

Example

{
  _id: '12345678901234578901234',
  usedBy: [],
  name: 'Outside opening hours',
  length: 5
}

Errors

Error code Message Description
404 id Audio not found
422 name Name of audio is missing
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/audio/update.txt · Last modified: 2019/06/26 12:23 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki