-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
CommunicationNetworkTraversal.json
174 lines (174 loc) · 5.29 KB
/
CommunicationNetworkTraversal.json
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
{
"swagger": "2.0",
"info": {
"title": "CommunicationNetworkTraversalClient",
"description": "Azure Communication Network Traversal Service",
"version": "2022-02-01"
},
"paths": {
"/networkTraversal/:issueRelayConfiguration": {
"post": {
"tags": [
"Turn"
],
"summary": "Issue a configuration for an STUN/TURN server.",
"operationId": "CommunicationNetworkTraversal_IssueRelayConfiguration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"description": "Optional request for providing the id and/or route type for the returned relay configuration.",
"in": "body",
"name": "body",
"schema": {
"$ref": "#/definitions/CommunicationRelayConfigurationRequest"
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CommunicationRelayConfiguration"
}
},
"default": {
"description": "Error",
"schema": {
"$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse"
}
}
},
"x-ms-examples": {
"Issue Relay Configuration": {
"$ref": "./examples/IssueRelayConfiguration.json"
}
}
}
}
},
"definitions": {
"CommunicationRelayConfigurationRequest": {
"description": "Request for a CommunicationRelayConfiguration.",
"type": "object",
"properties": {
"id": {
"description": "An identity to be associated with telemetry for data relayed using the returned credentials. Must be an existing ACS user identity. If not provided, the telemetry will not contain an associated identity value.",
"type": "string"
},
"routeType": {
"description": "Filter the routing methodology returned. If not provided, will return all route types in separate ICE servers.",
"$ref": "#/definitions/RouteType"
}
}
},
"CommunicationIceServer": {
"description": "An instance of a STUN/TURN server with credentials to be used for ICE negotiation.",
"required": [
"credential",
"urls",
"username",
"routeType"
],
"type": "object",
"properties": {
"urls": {
"description": "List of STUN/TURN server URLs.",
"type": "array",
"items": {
"type": "string"
}
},
"username": {
"description": "User account name which uniquely identifies the credentials.",
"type": "string"
},
"credential": {
"description": "Credential for the server.",
"type": "string"
},
"routeType": {
"$ref": "#/definitions/RouteType"
}
}
},
"CommunicationRelayConfiguration": {
"description": "A relay configuration containing the STUN/TURN URLs and credentials.",
"required": [
"expiresOn",
"iceServers"
],
"type": "object",
"properties": {
"expiresOn": {
"format": "date-time",
"description": "The date for which the username and credentials are not longer valid. Will be 48 hours from request time.",
"type": "string"
},
"iceServers": {
"description": "An array representing the credentials and the STUN/TURN server URLs for use in ICE negotiations.",
"type": "array",
"items": {
"$ref": "#/definitions/CommunicationIceServer"
}
}
}
},
"RouteType": {
"description": "The routing methodology to where the ICE server will be located from the client. \"any\" will have higher reliability while \"nearest\" will have lower latency. It is recommended to default to use the \"any\" routing method unless there are specific scenarios which minimizing latency is critical.",
"enum": [
"any",
"nearest"
],
"type": "string",
"x-ms-enum": {
"name": "RouteType",
"modelAsString": true
}
}
},
"parameters": {
"ApiVersionParameter": {
"in": "query",
"name": "api-version",
"description": "Version of API to invoke.",
"required": true,
"enum": [
"2022-02-01"
],
"type": "string"
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"x-ms-parameterized-host": {
"hostTemplate": "{endpoint}",
"useSchemePrefix": false,
"parameters": [
{
"name": "endpoint",
"description": "The communication resource, for example https://my-resource.communication.azure.com",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "client"
}
]
}
}