-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathapi.yml
More file actions
210 lines (210 loc) · 5.74 KB
/
api.yml
File metadata and controls
210 lines (210 loc) · 5.74 KB
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
paths:
/outcalls:
get:
operationId: list_outcalls
summary: List outgoing calls
description: '**Required ACL:** `confd.outcalls.read`'
tags:
- outcalls
parameters:
- $ref: '#/parameters/tenantuuid'
- $ref: '#/parameters/recurse'
- $ref: '#/parameters/order'
- $ref: '#/parameters/direction'
- $ref: '#/parameters/limit'
- $ref: '#/parameters/offset'
- $ref: '#/parameters/search'
responses:
'200':
description: Outgoing calls list
schema:
$ref: '#/definitions/OutcallItems'
post:
operationId: create_outcall
summary: Create outgoing call
description: '**Required ACL:** `confd.outcalls.create`'
tags:
- outcalls
parameters:
- name: body
in: body
description: Outgoing call to create
required: true
schema:
$ref: '#/definitions/Outcall'
- $ref: '#/parameters/tenantuuid'
responses:
'201':
description: Outgoing call created
schema:
$ref: '#/definitions/Outcall'
'400':
$ref: '#/responses/CreateError'
/outcalls/{outcall_id}:
get:
operationId: get_outcall
summary: Get outgoing call
description: '**Required ACL:** `confd.outcalls.{outcall_id}.read`'
tags:
- outcalls
parameters:
- $ref: '#/parameters/tenantuuid'
- $ref: '#/parameters/outcallid'
responses:
'200':
description: Outgoing call
schema:
$ref: '#/definitions/Outcall'
'404':
$ref: '#/responses/NotFoundError'
put:
operationId: update_outcall
summary: Update outgoing call
description: '**Required ACL:** `confd.outcalls.{outcall_id}.update`'
tags:
- outcalls
parameters:
- $ref: '#/parameters/tenantuuid'
- $ref: '#/parameters/outcallid'
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Outcall'
responses:
'204':
$ref: '#/responses/ResourceUpdated'
'400':
$ref: '#/responses/UpdateError'
'404':
$ref: '#/responses/NotFoundError'
delete:
operationId: delete_outcall
summary: Delete outgoing call
description: '**Required ACL:** `confd.outcalls.{outcall_id}.delete`'
tags:
- outcalls
parameters:
- $ref: '#/parameters/tenantuuid'
- $ref: '#/parameters/outcallid'
responses:
'204':
$ref: '#/responses/ResourceDeleted'
'400':
$ref: '#/responses/DeleteError'
'404':
$ref: '#/responses/NotFoundError'
parameters:
outcallid:
required: true
type: integer
name: outcall_id
in: path
description: Outgoing call's ID
definitions:
Outcall:
title: Outcall
allOf:
- $ref: '#/definitions/OutcallRelationBase'
- properties:
description:
type: string
description: Additional information about the outgoing call
enabled:
type: boolean
default: true
internal_caller_id:
type: boolean
default: false
description: Use the internal caller id
preprocess_subroutine:
type: string
description: Name of the subroutine to execute in asterisk before receiving
a call
ring_time:
type: integer
description: Ringing time before hangup
tenant_uuid:
type: string
description: The UUID of the tenant
readOnly: true
- $ref: '#/definitions/OutcallRelationTrunks'
- $ref: '#/definitions/OutcallRelationExtensions'
- $ref: '#/definitions/OutcallRelationSchedules'
- $ref: '#/definitions/OutcallRelationCallPermissions'
- required:
- label
OutcallRelationBase:
properties:
id:
type: integer
readOnly: true
description: The id of the outgoing call
name:
type: string
description: The name of the outcall
readOnly: true
label:
type: string
description: The label of the outcall
OutcallRelationTrunks:
properties:
trunks:
type: array
readOnly: true
items:
$ref: '#/definitions/OutcallRelationTrunk'
OutcallRelationTrunk:
allOf:
- $ref: '#/definitions/TrunkRelationBase'
- $ref: '#/definitions/TrunkRelationEndpoints'
OutcallRelationExtensions:
properties:
extensions:
type: array
readOnly: true
items:
$ref: '#/definitions/OutcallRelationExtension'
OutcallRelationExtension:
allOf:
- $ref: '#/definitions/ExtensionRelationBase'
- properties:
caller_id:
type: string
external_prefix:
type: string
description: The prefix added to the outgoing call when sent on the trunk
prefix:
type: string
description: The prefix that the user need to dial before the extension
strip_digits:
type: integer
description: The number of leading digits to strip
OutcallRelationSchedules:
properties:
schedules:
type: array
readOnly: true
items:
$ref: '#/definitions/OutcallRelationSchedule'
OutcallRelationSchedule:
allOf:
- $ref: '#/definitions/ScheduleRelationBase'
OutcallRelationCallPermissions:
properties:
call_permissions:
type: array
readOnly: true
items:
$ref: '#/definitions/CallPermissionRelationBase'
OutcallItems:
title: OutcallItems
properties:
items:
type: array
items:
$ref: '#/definitions/Outcall'
total:
type: integer
required:
- total