summaryrefslogtreecommitdiff
path: root/rest-api/api-docs/channels.json
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-11-07 21:10:31 +0000
committerDavid M. Lee <dlee@digium.com>2013-11-07 21:10:31 +0000
commit7d0d1a1efb1d484cce28137f1abc1a6ece61d7e9 (patch)
treea61c7891a423ff7a70ae5bb3a5880ba4437702fd /rest-api/api-docs/channels.json
parentcdfbc02df164a9bc49e23900fae66e696c4623aa (diff)
ari: User better nicknames for ARI operations
While working on building client libraries from the Swagger API, I noticed a problem with the nicknames. channel.deleteChannel() channel.answerChannel() channel.muteChannel() Etc. We put the object name in the nickname (since we were generating C code), but it makes OO generators redundant. This patch makes the nicknames more OO friendly. This resulted in a lot of name changing within the res_ari_*.so modules, but not much else. There were a couple of other fixed I made in the process. * When reversible operations (POST /hold, POST /unhold) were made more RESTful (POST /hold, DELETE /unhold), the path for the second operation was left in the API declaration. This worked, but really the two operations should have been on the same API. * The POST /unmute operation had still not been REST-ified. Review: https://reviewboard.asterisk.org/r/2940/ ........ Merged revisions 402528 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'rest-api/api-docs/channels.json')
-rw-r--r--rest-api/api-docs/channels.json54
1 files changed, 18 insertions, 36 deletions
diff --git a/rest-api/api-docs/channels.json b/rest-api/api-docs/channels.json
index 02284385e..d3ed5194d 100644
--- a/rest-api/api-docs/channels.json
+++ b/rest-api/api-docs/channels.json
@@ -14,7 +14,7 @@
{
"httpMethod": "GET",
"summary": "List all active channels in Asterisk.",
- "nickname": "getChannels",
+ "nickname": "list",
"responseClass": "List[Channel]"
},
{
@@ -106,7 +106,7 @@
{
"httpMethod": "GET",
"summary": "Channel details.",
- "nickname": "getChannel",
+ "nickname": "get",
"responseClass": "Channel",
"parameters": [
{
@@ -128,7 +128,7 @@
{
"httpMethod": "DELETE",
"summary": "Delete (i.e. hangup) a channel.",
- "nickname": "deleteChannel",
+ "nickname": "hangup",
"responseClass": "void",
"parameters": [
{
@@ -233,7 +233,7 @@
{
"httpMethod": "POST",
"summary": "Answer a channel.",
- "nickname": "answerChannel",
+ "nickname": "answer",
"responseClass": "void",
"parameters": [
{
@@ -265,7 +265,7 @@
{
"httpMethod": "POST",
"summary": "Indicate ringing to a channel.",
- "nickname": "ringChannel",
+ "nickname": "ring",
"responseClass": "void",
"parameters": [
{
@@ -297,7 +297,7 @@
{
"httpMethod": "POST",
"summary": "Send provided DTMF to a given channel.",
- "nickname": "sendDTMFChannel",
+ "nickname": "sendDTMF",
"responseClass": "void",
"parameters": [
{
@@ -377,7 +377,7 @@
{
"httpMethod": "POST",
"summary": "Mute a channel.",
- "nickname": "muteChannel",
+ "nickname": "mute",
"responseClass": "void",
"parameters": [
{
@@ -416,17 +416,11 @@
"reason": "Channel not in a Stasis application"
}
]
- }
- ]
- },
- {
- "path": "/channels/{channelId}/unmute",
- "description": "Unmute a channel",
- "operations": [
+ },
{
- "httpMethod": "POST",
+ "httpMethod": "DELETE",
"summary": "Unmute a channel.",
- "nickname": "unmuteChannel",
+ "nickname": "unmute",
"responseClass": "void",
"parameters": [
{
@@ -475,7 +469,7 @@
{
"httpMethod": "POST",
"summary": "Hold a channel.",
- "nickname": "holdChannel",
+ "nickname": "hold",
"responseClass": "void",
"parameters": [
{
@@ -497,17 +491,11 @@
"reason": "Channel not in a Stasis application"
}
]
- }
- ]
- },
- {
- "path": "/channels/{channelId}/hold",
- "description": "Remove a channel from hold",
- "operations": [
+ },
{
"httpMethod": "DELETE",
"summary": "Remove a channel from hold.",
- "nickname": "unholdChannel",
+ "nickname": "unhold",
"responseClass": "void",
"parameters": [
{
@@ -540,7 +528,7 @@
"httpMethod": "POST",
"summary": "Play music on hold to a channel.",
"notes": "Using media operations such as playOnChannel on a channel playing MOH in this manner will suspend MOH without resuming automatically. If continuing music on hold is desired, the stasis application must reinitiate music on hold.",
- "nickname": "mohStartChannel",
+ "nickname": "startMoh",
"responseClass": "void",
"parameters": [
{
@@ -570,17 +558,11 @@
"reason": "Channel not in a Stasis application"
}
]
- }
- ]
- },
- {
- "path": "/channels/{channelId}/moh",
- "description": "Stop playing music on hold to a channel",
- "operations": [
+ },
{
"httpMethod": "DELETE",
"summary": "Stop playing music on hold to a channel.",
- "nickname": "mohStopChannel",
+ "nickname": "stopMoh",
"responseClass": "void",
"parameters": [
{
@@ -613,7 +595,7 @@
"httpMethod": "POST",
"summary": "Start playback of media.",
"notes": "The media URI may be any of a number of URI's. Currently sound: and recording: URI's are supported. This operation creates a playback resource that can be used to control the playback of media (pause, rewind, fast forward, etc.)",
- "nickname": "playOnChannel",
+ "nickname": "play",
"responseClass": "Playback",
"parameters": [
{
@@ -679,7 +661,7 @@
"httpMethod": "POST",
"summary": "Start a recording.",
"notes": "Record audio from a channel. Note that this will not capture audio sent to the channel. The bridge itself has a record feature if that's what you want.",
- "nickname": "recordChannel",
+ "nickname": "record",
"responseClass": "LiveRecording",
"parameters": [
{