-
Notifications
You must be signed in to change notification settings - Fork 5.2k
/
Copy pathCommunicationTurn.json
137 lines (137 loc) · 3.68 KB
/
CommunicationTurn.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
{
"swagger": "2.0",
"info": {
"title": "CommunicationIdentityClient",
"description": "Azure Communication Relay Service",
"version": "2021-02-22-preview1"
},
"paths": {
"/turn/{id}/:issueCredentials": {
"post": {
"tags": [
"Turn"
],
"summary": "Issue TURN credentials for an existing identity.",
"operationId": "CommunicationIdentity_IssueTurnCredentials",
"produces": [
"application/json"
],
"parameters": [
{
"in": "path",
"name": "id",
"description": "Identifier of the existing identity to issue credentials for.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error",
"schema": {
"$ref": "../../../Microsoft.CommunicationServicesCommon/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse"
}
},
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/CommunicationTurnCredentialsResponse"
}
}
},
"x-ms-examples": {
"Issue Turn Credentials": {
"$ref": "./examples/IssueTurnCredentials.json"
}
}
}
}
},
"definitions": {
"CommunicationTurnServer": {
"description": "An instance of a TURN server with credentials.",
"required": [
"credential",
"urls",
"username"
],
"type": "object",
"properties": {
"urls": {
"description": "List of 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"
}
}
},
"CommunicationTurnCredentialsResponse": {
"description": "A TURN credentials response.",
"required": [
"expiresOn",
"turnServers"
],
"type": "object",
"properties": {
"expiresOn": {
"format": "date-time",
"description": "The date for which the username and credentials are not longer valid.",
"type": "string"
},
"turnServers": {
"description": "An array representing the credentials and the TURN server URL.",
"type": "array",
"items": {
"$ref": "#/definitions/CommunicationTurnServer"
}
}
}
}
},
"parameters": {
"ApiVersionParameter": {
"in": "query",
"name": "api-version",
"description": "Version of API to invoke.",
"required": true,
"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"
}
]
}
}