|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "title": "CommunicationNetworkingClient", |
| 5 | + "description": "Azure Communication Networking Service", |
| 6 | + "version": "2021-10-08-preview" |
| 7 | + }, |
| 8 | + "paths": { |
| 9 | + "/networktraversal/:issueRelayConfiguration": { |
| 10 | + "post": { |
| 11 | + "tags": [ |
| 12 | + "Turn" |
| 13 | + ], |
| 14 | + "summary": "Issue a configuration for an STUN/TURN server for an existing identity.", |
| 15 | + "operationId": "CommunicationNetworkTraversal_IssueRelayConfiguration", |
| 16 | + "consumes": [ |
| 17 | + "application/json" |
| 18 | + ], |
| 19 | + "produces": [ |
| 20 | + "application/json" |
| 21 | + ], |
| 22 | + "parameters": [ |
| 23 | + { |
| 24 | + "$ref": "#/parameters/ApiVersionParameter" |
| 25 | + }, |
| 26 | + { |
| 27 | + "in": "body", |
| 28 | + "name": "body", |
| 29 | + "schema": { |
| 30 | + "$ref": "#/definitions/CommunicationRelayConfigurationRequest" |
| 31 | + } |
| 32 | + } |
| 33 | + ], |
| 34 | + "responses": { |
| 35 | + "200": { |
| 36 | + "description": "Success", |
| 37 | + "schema": { |
| 38 | + "$ref": "#/definitions/CommunicationRelayConfiguration" |
| 39 | + } |
| 40 | + }, |
| 41 | + "default": { |
| 42 | + "description": "Error", |
| 43 | + "schema": { |
| 44 | + "$ref": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" |
| 45 | + } |
| 46 | + } |
| 47 | + }, |
| 48 | + "x-ms-examples": { |
| 49 | + "Issue Relay Configuration": { |
| 50 | + "$ref": "./examples/IssueRelayConfiguration.json" |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + } |
| 55 | + }, |
| 56 | + "definitions": { |
| 57 | + "CommunicationRelayConfigurationRequest": { |
| 58 | + "description": "Request for a CommunicationRelayConfiguration.", |
| 59 | + "type": "object", |
| 60 | + "properties": { |
| 61 | + "id": { |
| 62 | + "description": "An existing ACS identity.", |
| 63 | + "type": "string" |
| 64 | + }, |
| 65 | + "routeType": { |
| 66 | + "description": "The routing methodology to where the ICE server will be located from the client.", |
| 67 | + "type": "string", |
| 68 | + "default": "any", |
| 69 | + "enum": [ |
| 70 | + "any", |
| 71 | + "nearest" |
| 72 | + ] |
| 73 | + } |
| 74 | + } |
| 75 | + }, |
| 76 | + "CommunicationIceServer": { |
| 77 | + "description": "An instance of a STUN/TURN server with credentials to be used for ICE negotiation.", |
| 78 | + "required": [ |
| 79 | + "credential", |
| 80 | + "urls", |
| 81 | + "username", |
| 82 | + "routeType" |
| 83 | + ], |
| 84 | + "type": "object", |
| 85 | + "properties": { |
| 86 | + "urls": { |
| 87 | + "description": "List of STUN/TURN server URLs.", |
| 88 | + "type": "array", |
| 89 | + "items": { |
| 90 | + "type": "string" |
| 91 | + } |
| 92 | + }, |
| 93 | + "username": { |
| 94 | + "description": "User account name which uniquely identifies the credentials.", |
| 95 | + "type": "string" |
| 96 | + }, |
| 97 | + "credential": { |
| 98 | + "description": "Credential for the server.", |
| 99 | + "type": "string" |
| 100 | + }, |
| 101 | + "routeType": { |
| 102 | + "description": "The routing methodology to where the ICE server will be located from the client.", |
| 103 | + "type": "string", |
| 104 | + "enum": [ |
| 105 | + "any", |
| 106 | + "nearest" |
| 107 | + ] |
| 108 | + } |
| 109 | + } |
| 110 | + }, |
| 111 | + "CommunicationRelayConfiguration": { |
| 112 | + "description": "A relay configuration containing the STUN/TURN URLs and credentials.", |
| 113 | + "required": [ |
| 114 | + "expiresOn", |
| 115 | + "iceServers" |
| 116 | + ], |
| 117 | + "type": "object", |
| 118 | + "properties": { |
| 119 | + "expiresOn": { |
| 120 | + "format": "date-time", |
| 121 | + "description": "The date for which the username and credentials are not longer valid.", |
| 122 | + "type": "string" |
| 123 | + }, |
| 124 | + "iceServers": { |
| 125 | + "description": "An array representing the credentials and the STUN/TURN server URLs for use in ICE negotiations.", |
| 126 | + "type": "array", |
| 127 | + "items": { |
| 128 | + "$ref": "#/definitions/CommunicationIceServer" |
| 129 | + } |
| 130 | + } |
| 131 | + } |
| 132 | + } |
| 133 | + }, |
| 134 | + "parameters": { |
| 135 | + "ApiVersionParameter": { |
| 136 | + "in": "query", |
| 137 | + "name": "api-version", |
| 138 | + "description": "Version of API to invoke.", |
| 139 | + "required": true, |
| 140 | + "enum": [ |
| 141 | + "2021-10-08-preview" |
| 142 | + ], |
| 143 | + "type": "string" |
| 144 | + } |
| 145 | + }, |
| 146 | + "securityDefinitions": { |
| 147 | + "azure_auth": { |
| 148 | + "type": "oauth2", |
| 149 | + "flow": "implicit", |
| 150 | + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", |
| 151 | + "scopes": { |
| 152 | + "user_impersonation": "impersonate your user account" |
| 153 | + } |
| 154 | + } |
| 155 | + }, |
| 156 | + "x-ms-parameterized-host": { |
| 157 | + "hostTemplate": "{endpoint}", |
| 158 | + "useSchemePrefix": false, |
| 159 | + "parameters": [ |
| 160 | + { |
| 161 | + "name": "endpoint", |
| 162 | + "description": "The communication resource, for example https://my-resource.communication.azure.com", |
| 163 | + "required": true, |
| 164 | + "type": "string", |
| 165 | + "in": "path", |
| 166 | + "x-ms-skip-url-encoding": true, |
| 167 | + "x-ms-parameter-location": "client" |
| 168 | + } |
| 169 | + ] |
| 170 | + } |
| 171 | +} |
0 commit comments