{ "swagger": "2.0", "info": { "title": "CommunicationNetworkingClient", "description": "Azure Communication Networking 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": "../../../Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" } }, "200": { "description": "Success", "schema": { "$ref": "#/definitions/CommunicationRelayConfiguration" } } }, "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" } } }, "CommunicationRelayConfiguration": { "description": "A relay configuration containing the TURN URLs and credentials.", "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, "enum": [ "2021-02-22-preview1" ], "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" } ] } }