forked from tropo/apigee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tropo-applications-wadl.xml
606 lines (491 loc) · 27.9 KB
/
tropo-applications-wadl.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apigee="http://api.apigee.com/wadl/2010/07/"
xmlns="http://wadl.dev.java.net/2009/02"
xsi:schemaLocation="http://wadl.dev.java.net/2009/02 http://apigee.com/schemas/wadl-schema.xsd http://api.apigee.com/wadl/2010/07/ http://apigee.com/schemas/apigee-wadl-extensions.xsd">
<resources base="https://api.tropo.com/v1">
<resource path="applications">
<method name="POST" id="application_create" apigee:displayName="Create">
<!-- Tags are used to organize the list of methods. Primary tag will list the default placement. -->
<apigee:tags>
<apigee:tag primary="true">Applications</apigee:tag>
<apigee:tag>Create</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_new_app.htm">
Use this method to add a brand new application. You can define a voice and messaging URL in the Request Body, but this method won't assign any addresses. You'll need to update the application once it's created to add a phone number or IM account.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"name":"new app",
"voiceUrl":"http://website.com",
"messagingUrl":"http://website2.com",
"platform":"scripting",
"partition":"staging"
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="GET" id="application_findAll" apigee:displayName="ViewAll">
<apigee:tags>
<apigee:tag primary="true">Applications</apigee:tag>
<apigee:tag>ViewAll</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_view_apps.htm">
Sometimes you need to access a list of the applications associated with your account; maybe you need to find a particular application's ID number or need to verify whether it's a Scripting or WebAPI application. Using a GET on the applications folder will provide you with the information you need.
</doc>
</method>
<!-- <resource path="/{applicationId: [0-9]+}"> -->
<method name="GET" id="application_find" apigee:displayName="ViewApp">
<apigee:tags>
<apigee:tag primary="true">Applications</apigee:tag>
<apigee:tag>ViewApp</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_view_apps.htm">
Sometimes you need to access a list a specific application.
</doc>
</method>
<method name="DELETE" id="application_delete" apigee:displayName="Delete">
<apigee:tags>
<apigee:tag primary="true">Applications</apigee:tag>
<apigee:tag>Delete</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_deleting_app.htm">
Use this method to remove an application. This cannot be undone; once an application has been deleted, it cannot be restored without recreating it from scratch.
</doc>
</method>
<method name="PUT" id="application_update" apigee:displayName="Update">
<apigee:tags>
<apigee:tag primary="true">Applications</apigee:tag>
<apigee:tag>Update</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_update_name.htm">
When you want to change the name, platform or partition of an application, just run a PUT on the application specific folder and specify the new details. The old information will be removed and the new information entered in its place. Note that if you do not have a production Tropo account, you will not be able to change the partition to production.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"name":"new app updated",
"platform":"webapi",
"partition":"production"
}
]]></apigee:payload>
</representation>
</request>
</method>
</resource>
<resource path="/applications/{AppId}/addresses">
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xs:string" style="template" name="applicationId"/>
<method name="POST" id="address_addprefix" apigee:displayName="AddNumberByPrefix">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>AddNumberByPrefix</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_add_number.htm">
This method will add a number to the application, based on a specified prefix. While the prefix is not necessary, if it's omitted you will be provisioned a randomly selected U.S. number.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"type":"number",
"prefix":"1407"
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="POST" id="address_addtollfree" apigee:displayName="AddNumberTollfree">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>AddNumberTollfree</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_add_toll_free.htm">
This method will add a toll free number to the application, based on a specified prefix. This is essentially the same process as the one you would use to add a standard U.S. phone number , however you must already having billing setup for Tropo or you will receive a 400 response code, as all toll free numbers require a production account.
Possible values include 855, 866, 877 and 888; if there are no available numbers with the prefix specified, you will receive a 503 response code, at which point you can try one of the other options.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"type":"number",
"prefix":"1866"
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="POST" id="address_addintl" apigee:displayName="AddNumberInternational">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>AddNumberInternational</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_add_international.htm">
This method will add an international number, based on a specified country code prefix. Currently, you cannot select a specific area code prefix for International numbers, just the country code (so you can't select 31+20 for Amsterdam - you might get 31+10 for Rotterdam instead).
If there are no available numbers with the prefix specified, you will receive a 503 response code.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"type":"number",
"prefix":"31"
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="POST" id="address_addspecific" apigee:displayName="AddNumberSpecific">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>AddNumberSpecific</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_add_specific_num.htm">
The ability to add a specific number is really only used when you need to move a number from one application to another. You would use this method on the destination application - the one where you want the phone number to go. You don't need to do anything to the original application. The two applications do need to exist on the same account - you can't use this method to move a phone number between two different accounts.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"type":"number",
"number":"4075551235"
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="POST" id="address_addim" apigee:displayName="AddIM">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>AddIM</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_add_im.htm">
This method will show how to add an IM account to your application - we'll use AIM as our example. The same method can be used to add YAHOO, MSN, JABBER, GTALK and SKYPE - just change the value in type.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"type":"aim",
"username":"tropocloud",
"password":"password01"
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="POST" id="address_addtoken" apigee:displayName="AddToken">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>AddToken</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses" />
<!-- <request>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
<representation mediaType="application/x-www-form-urlencoded"/>
</request>
<response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_add_token.htm">
This example will add a voice token to your application; you can add a messaging token just by changing the channel to "messaging" instead of "voice".
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"type":"token",
"channel":"voice"
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="GET" id="address_findAll" apigee:displayName="ViewAll">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>ViewAll</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_view_app_addresses.htm">
Sometimes you'll need to view all the addresses associated with a specific application. Using a GET on the addresses folder will provide you with the information you need; running a GET on a specific address type folder, such as addresses/number or addresses/aim, will get you a list of all the addresses that match that type for this application.
</doc>
</method>
<!-- <resource path="/{type}/{value}">
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xs:string" style="template" name="applicationId"/>
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xs:string" style="template" name="value"/>
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xs:string" style="template" name="type"/> -->
<method name="GET" id="address_find" apigee:displayName="ViewAddress">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>ViewAddress</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses/number/{AddressId}" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_view_app_addresses.htm">
Sometimes you'll need to view all the addresses associated with a specific application. Using a GET on the addresses folder will provide you with the information you need; running a GET on a specific address type folder, such as addresses/number or addresses/aim, will get you a list of all the addresses that match that type for this application.
</doc>
</method>
<method name="DELETE" id="address_delete" apigee:displayName="Delete">
<apigee:tags>
<apigee:tag primary="true">Addresses</apigee:tag>
<apigee:tag>Delete</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/applications/{AppId}/addresses/number/{AddressId}" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_delete_address.htm">
You can remove a phone number, IM account or token from an application. If you remove a phone number, it will become available for use by someone else, so it's not recommended to delete a phone number unless you're absolutely sure you have no further need for it. If you want to move a phone number between applications, there's an easier way. Check out the Adding a Specific Number/Moving a Number> example for more info.
</doc>
</method>
<!-- </resource> -->
<!-- </resource> -->
</resource>
<resource path="exchanges">
<method name="GET" id="address_viewexchanges" apigee:displayName="ViewExchanges">
<apigee:tags>
<apigee:tag primary="true">Exchanges</apigee:tag>
<apigee:tag>ViewExchanges</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/exchanges" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/prov_view_exchanges.htm">
Exchanges identify the locations and prefixes for phone numbers; using the following method will allow you to view the exchanges available to you (e.g., if you're still in staging, toll free numbers won't be displayed). The results are abbreviated for ease of viewing; there's typically many, many more available.
</doc>
</method>
</resource>
<resource path="sessions">
<method name="POST" id="session_start" apigee:displayName="Start">
<apigee:tags>
<apigee:tag primary="true">Sessions</apigee:tag>
<apigee:tag>Start</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/sessions" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/starting_session.htm">
The following example shows how to kick off an "outbound session" using a token and the REST API, which then launches the application, makes a call and plays a message. It will also show how to pass additional parameters into your application when initiating the Tropo Scripting session. To find your token, login to your Tropo account, display the application configuration screen, and look down under the phone numbers
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"token":"TOKEN",
"customerName":"Chris Matthieu",
"numberToDial":"4075551212",
"msg":"hello superman."
}
]]></apigee:payload>
</representation>
</request>
</method>
<method name="POST" id="session_interrupt" apigee:displayName="Interrupt">
<apigee:tags>
<apigee:tag primary="true">Sessions</apigee:tag>
<apigee:tag>Interrupt</apigee:tag>
</apigee:tags>
<!-- Is authentication required for this method? -->
<apigee:authentication required="true" />
<!-- Example element is used to specify the sample URL to display in the Console's request URL field. -->
<apigee:example url="/sessions/{session-id}/signals" />
<!-- <response>
<representation mediaType="application/json"/>
<representation mediaType="text/xml"/>
</response> -->
<!-- The content of the doc element is shown as a tooltip in the Console's method list. -->
<doc title="" apigee:url="https://www.tropo.com/docs/rest/interrupting_code_one_signal.htm">
Say you want to play some hold music, then interrupt it later. In order to interrupt, you would give a the say that's playing the hold music a signal using the allowSignals parameter. You can then make a web service call using that name and Tropo will stop running that function. If the function has already run and completed, your interrupt request will be ignored. If it has not run yet, it will be queued until the function runs.
Note: transfer and conference must include the terminator parameter for signaling to work.
</doc>
<request>
<param name="Content-Type" required="true" type="xsd:string" style="header" default="application/json"/>
<representation>
<apigee:payload><![CDATA[
{
"value":"exit"
}
]]></apigee:payload>
</representation>
</request>
</method>
</resource>
</resources>
</application>