### Get Ticket - Go Example Source: https://docs.auvious.com/docs/http-api/ticket Go program to retrieve a ticket. This example demonstrates setting up the request with necessary headers and executing it. ```go package main import ( "bytes", "net/http", ) func main() { headers := map[string][]string{ "Accept": []string{"*/*"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("GET", "https://auvious.video/security/ticket/{ticketId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Start Recording (Go) Source: https://docs.auvious.com/docs/http-api/recorder Starts a recording session using Go's net/http package. The request body is not included in this example but should be populated as needed. ```go package main import ( "bytes", "net/http", ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"*/*"}, "Authorization": []string{"API_KEY"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "/rtc-recorder/api/recordings/start", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Participant Details - Go Example Source: https://docs.auvious.com/docs/http-api/appointments/v2 Example of how to retrieve participant details using Go's http package. ```go package main import ( "bytes", "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"Bearer "}, } var body []byte // body = ... req, err := http.NewRequest("GET", "/api/v2/appointments/{id}/participants/{participantId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Application in Python Source: https://docs.auvious.com/docs/http-api/application This Python example uses the 'requests' library to make a GET request for application configuration. It shows how to set headers and print the JSON response. ```python import requests headers = { 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } r = requests.get( 'https://auvious.video/security/applications/{id}', params={}, headers = headers) print r.json() ``` -------------------------------- ### Get Application in Node.js Source: https://docs.auvious.com/docs/http-api/application This Node.js example uses the 'node-fetch' library to make a GET request for application configuration. It demonstrates setting headers and handling the JSON response. ```javascript const fetch = require('node-fetch'); const headers = { 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } fetch('https://auvious.video/security/applications/{id}', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` -------------------------------- ### Get Count of Overlapping Appointments Source: https://docs.auvious.com/docs/http-api/appointments/v2 This example shows how to make a GET request to retrieve the count of overlapping appointments. You must provide applicationId, organizationId, start time, and duration as query parameters. This endpoint does not require authorization. ```http GET /api/v2/appointments/overlap/count?applicationId=bf8215e5-a39e-490a-a0e2-07df6a3d8c1f&organizationId=mypurecloud.de_9da4d7e6-38c4-4a90-be39-0942f9843645&start=%222022-01-31T19%3A00%3A00.0Z%22&duration=%22PT5M%22 HTTP/1.1 Accept: application/json ``` -------------------------------- ### Create Client with Go Source: https://docs.auvious.com/docs/http-api/client This Go code demonstrates how to make a POST request to create a client. You need to provide the request body. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "https://auvious.video/security/clients", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Retrieve Interactions by Date Range (HTTP) Source: https://docs.auvious.com/docs/http-api/interaction This example shows how to retrieve interactions within a specific date range using an HTTP GET request. The `start` and `end` query parameters are required and should be in ISO 8601 format. ```http GET http://auvious.video/rtc-api/interactions?start=2025-01-20T22%3A00%3A00.928Z&end=2025-01-21T21%3A59%3A59.928Z HTTP/1.1 Host: auvious.video Accept: application/json ``` -------------------------------- ### Get Ticket - Java Example Source: https://docs.auvious.com/docs/http-api/ticket Java code snippet for retrieving a ticket. This example uses HttpURLConnection to make the GET request. ```java // This sample needs improvement. URL obj = new URL("https://auvious.video/security/ticket/{ticketId}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Create Application using Go Source: https://docs.auvious.com/docs/http-api/application This Go code snippet demonstrates how to make a POST request to create an application. It includes setting up headers and handling the request. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "https://auvious.video/security/applications", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Application Response Example Source: https://docs.auvious.com/docs/http-api/application This is an example of a successful (200 OK) response when retrieving application configuration. ```JSON { "version": 0, "id": "string", "organizationId": "string", "type": "GENESYS", "config": { "property1": {}, "property2": {} }, "createdAt": "2019-08-24T14:15:22Z", "visible": true, "expiresAt": "2019-08-24T14:15:22Z", "anonymousRegistrationEnabled": true } ``` -------------------------------- ### Get Compositions API Call Examples Source: https://docs.auvious.com/docs/http-api/recorder Examples of how to call the Get Compositions API endpoint using various programming languages. Ensure you are authenticated with an API key. ```shell curl -X GET /rtc-recorder/api/compositions/{conversationId} \ -H 'Accept: application/json' \ -H 'Authorization: API_KEY' ``` ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, } var body []byte // body = ... req, err := http.NewRequest("GET", "/rtc-recorder/api/compositions/{conversationId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```node const fetch = require('node-fetch'); const headers = { 'Accept': 'application/json', 'Authorization': 'API_KEY' } fetch('/rtc-recorder/api/compositions/{conversationId}', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` ```java // This sample needs improvement. URL obj = new URL("/rtc-recorder/api/compositions/{conversationId}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` ```python import requests headers = { 'Accept': 'application/json', 'Authorization': 'API_KEY' } r = requests.get( '/rtc-recorder/api/compositions/{conversationId}', params={}, headers = headers) print r.json() ``` ```ruby require 'rest-client' require 'json' headers = { 'Accept' => 'application/json', 'Authorization' => 'API_KEY' } result = RestClient.get '/rtc-recorder/api/compositions/{conversationId}', params: {}, headers: headers p JSON.parse(result) ``` -------------------------------- ### Get Active Recording Response Example Source: https://docs.auvious.com/docs/http-api/recorder Example JSON response for a successful request to get an active recording. It includes details about the recording instance, state, and any errors. ```json { "instanceId": "string", "recorderId": "string", "conversationId": "string", "state": "INITIALISED", "error": { "code": "string", "occurred": "string", "message": "string" } } ``` -------------------------------- ### Create Sketch - Go Example Source: https://docs.auvious.com/docs/http-api/sketch Example of creating a sketch using Go's net/http package. The request body needs to be populated. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("PUT", "http://localhost:5555/api/sketch", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Chat Transcript Request Example (HTTP) Source: https://docs.auvious.com/docs/http-api/recorder This is an example of an HTTP request to retrieve the chat transcript for a given conversation ID. It specifies the GET method and the Accept header. ```http GET /rtc-recorder/api/recordings/{conversationId}/chat/transcript HTTP/1.1 Accept: application/json ``` -------------------------------- ### Create Client with Python Source: https://docs.auvious.com/docs/http-api/client This Python example uses the `requests` library to send a POST request for client creation. It includes setting headers and printing the JSON response. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } r = requests.post( 'https://auvious.video/security/clients', params={}, headers = headers) print r.json() ``` -------------------------------- ### Create Application using Python Source: https://docs.auvious.com/docs/http-api/application This Python example uses the `requests` library to send a POST request for creating an application. It shows how to set up headers and make the request. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } r = requests.post( 'https://auvious.video/security/applications', params={}, headers = headers) print r.json() ``` -------------------------------- ### Get Participant Details - Shell Example Source: https://docs.auvious.com/docs/http-api/appointments/v2 Example of how to retrieve participant details using cURL. ```shell curl -X GET /api/v2/appointments/{id}/participants/{participantId} \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Get Translation API Request in Python Source: https://docs.auvious.com/docs/http-api/ai This Python example uses the requests library to get a translation. It defines the headers and makes the GET request. ```python import requests headers = { 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } r = requests.get( '/api/ai/{appId}/conversations/{conversationId}/transcriptions/{transcriptionId}/translations/{id}', params={}, headers = headers) print r.json() ``` -------------------------------- ### Create Client Request Example Source: https://docs.auvious.com/docs/http-api/client This is an example of an HTTP POST request to create a new client. It includes the host, content type, and accept headers. ```http POST https://auvious.video/security/clients HTTP/1.1 Host: auvious.video Content-Type: application/json Accept: application/json ``` -------------------------------- ### Get Participant Details - Node.js Example Source: https://docs.auvious.com/docs/http-api/appointments/v2 Example of how to retrieve participant details using Node.js fetch. ```javascript const fetch = require('node-fetch'); const headers = { 'Accept': 'application/json', 'Authorization': "Bearer " } fetch('/api/v2/appointments/{id}/participants/{participantId}', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` -------------------------------- ### Get Interaction by ID - 200 Response Example Source: https://docs.auvious.com/docs/http-api/interaction Example of a successful response when retrieving interaction data. ```JSON { "id": "string", "organizationId": "string", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "type": "string", "data": { "property1": {}, "property2": {} }, "version": 0 } ``` -------------------------------- ### Start Recording (Java) Source: https://docs.auvious.com/docs/http-api/recorder Starts a recording session using Java's HttpURLConnection. This sample demonstrates setting the request method and reading the response. ```java // This sample needs improvement. URL obj = new URL("/rtc-recorder/api/recordings/start"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Get Recordings List (Go) Source: https://docs.auvious.com/docs/http-api/recorder This Go code demonstrates how to make a GET request to the recordings endpoint. It sets up the necessary headers and client for the HTTP request. The body is currently commented out. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, } var body []byte // body = ... req, err := http.NewRequest("GET", "/rtc-recorder/api/recordings/{conversationId}/{recorderId}/{instanceId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Active Recording (HTTP Request) Source: https://docs.auvious.com/docs/http-api/recorder This is an HTTP request example to get an active recording by its conversation ID. It specifies the GET method and required headers. ```http GET /rtc-recorder/api/recordings/{conversationId}/active HTTP/1.1 Accept: application/json ``` -------------------------------- ### Verify Storage Provider Configuration (Python) Source: https://docs.auvious.com/docs/http-api/recorder This Python example uses the 'requests' library to send a POST request for verifying storage provider configuration. It prints the JSON response. ```python import requests headers = { 'Authorization': 'API_KEY' } r = requests.post( '/rtc-recorder/api/storageproviders/{applicationId}/verified', params={}, headers = headers) print r.json() ``` -------------------------------- ### GET Appointments API v2 Request Source: https://docs.auvious.com/docs/http-api/appointments/v2 This section provides examples of how to make a GET request to the Appointments API v2. Authentication is required using a JWT Bearer token. Examples are provided for multiple programming languages. ```shell curl -X GET /api/v2/appointments/ \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"Bearer "}, } var body []byte // body = ... req, err := http.NewRequest("GET", "/api/v2/appointments/", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```node const fetch = require('node-fetch'); const headers = { 'Accept': 'application/json', 'Authorization': "Bearer " } fetch('/api/v2/appointments/', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` ```java // This sample needs improvement. URL obj = new URL("/api/v2/appointments/"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` ```python import requests headers = { 'Accept': 'application/json', 'Authorization': "Bearer " } r = requests.get( '/api/v2/appointments/', params={}, headers = headers) print r.json() ``` ```ruby require 'rest-client' require 'json' headers = { 'Accept' => 'application/json', 'Authorization' => "Bearer " } result = RestClient.get '/api/v2/appointments/', params: {}, headers: headers p JSON.parse(result) ``` -------------------------------- ### Start Video Stream API Request (Go) Source: https://docs.auvious.com/docs/http-api/ai This Go code demonstrates how to make a POST request to start a video stream. It includes setting necessary headers and preparing the request body. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "/api/ai/{appId}/live/{id}/video/{streamId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Player Composition (Node.js) Source: https://docs.auvious.com/docs/http-api/composition This Node.js snippet uses the 'node-fetch' library to make a GET request for a player composition. It shows how to define headers and handle the response. Ensure you have 'node-fetch' installed (`npm install node-fetch`). ```javascript const fetch = require('node-fetch'); const headers = { 'Accept': '*/*', 'Range': 'string', 'Authorization': 'API_KEY' } fetch('http://auvious.video/composition/api/player/inline/{conversationId}/{compositionId}/{fileName}?Date=string&Expires=string&Signature=string', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` -------------------------------- ### Initiate File Transfer (Go) Source: https://docs.auvious.com/docs/http-api/file-transfer This Go code demonstrates how to make an HTTP POST request to initiate a file transfer. It includes setting up headers and the request body. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"*/*"}, "X-Auvious-TransactionId": []string{"string"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "http://auvious.video/rtc-api/filetransfers", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Participant Details - Ruby Example Source: https://docs.auvious.com/docs/http-api/appointments/v2 Example of how to retrieve participant details using Ruby's rest-client. ```ruby require 'rest-client' require 'json' headers = { 'Accept' => 'application/json', 'Authorization' => "Bearer " } result = RestClient.get '/api/v2/appointments/{id}/participants/{participantId}', params: {}, headers: headers p JSON.parse(result) ``` -------------------------------- ### Get Participant Details - Java Example Source: https://docs.auvious.com/docs/http-api/appointments/v2 Example of how to retrieve participant details using Java's HttpURLConnection. ```java // This sample needs improvement. URL obj = new URL("/api/v2/appointments/{id}/participants/{participantId}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Verify Storage Provider Profile - Python Example Source: https://docs.auvious.com/docs/http-api/recorder Python example using the 'requests' library to send a POST request for storage provider verification. It includes setting headers and printing the JSON response. ```python import requests headers = { 'Accept': 'application/json', 'Authorization': 'API_KEY' } r = requests.post( '/rtc-recorder/api/storageproviders/{applicationId}/verify', params={}, headers = headers) print r.json() ``` -------------------------------- ### Initiate File Transfer (Python) Source: https://docs.auvious.com/docs/http-api/file-transfer This Python example uses the 'requests' library to send a POST request for file transfer. It shows how to set up headers and query parameters. ```python import requests headers = { 'Content-Type': 'multipart/form-data', 'Accept': '*/*', 'X-Auvious-TransactionId': 'string', 'Authorization': 'Bearer {access-token}' } r = requests.post( 'http://auvious.video/rtc-api/filetransfers', params={ 'targetType': 'user'}, headers = headers) print r.json() ``` -------------------------------- ### Get Participant Details - Python Example Source: https://docs.auvious.com/docs/http-api/appointments/v2 Example of how to retrieve participant details using Python's requests library. ```python import requests headers = { 'Accept': 'application/json', 'Authorization': "Bearer " } r = requests.get( '/api/v2/appointments/{id}/participants/{participantId}', params={}, headers = headers) print r.json() ``` -------------------------------- ### Create Basic Appointment (Python) Source: https://docs.auvious.com/docs/http-api/appointments/v2 This Python example uses the 'requests' library to send a POST request for creating a basic appointment. It shows how to set headers and handle the JSON response. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } r = requests.post( '/api/v2/appointments/basic', params={}, headers = headers) print r.json() ``` -------------------------------- ### Create Client with Java Source: https://docs.auvious.com/docs/http-api/client This Java code snippet shows how to create an HTTP POST request to create a client. It includes basic response handling. ```java // This sample needs improvement. URL obj = new URL("https://auvious.video/security/clients"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Get All Transcriptions (HTTP Request) Source: https://docs.auvious.com/docs/http-api/ai This is an example of an HTTP GET request to retrieve all transcriptions for a given conversation. It specifies the `Accept` header. ```http GET /api/ai/{appId}/conversations/{conversationId}/transcriptions HTTP/1.1 Accept: application/json ``` -------------------------------- ### Create Appointment - Python Source: https://docs.auvious.com/docs/http-api/appointments/v2 This Python example uses the `requests` library to send a POST request for creating an appointment. It demonstrates setting up headers. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': "Bearer " } r = requests.post( '/api/v2/appointments/', params={}, headers = headers) print r.json() ``` -------------------------------- ### 200 Response Example for Get Extension Version Source: https://docs.auvious.com/docs/http-api/cobrowse This is an example of a successful response (status code 200) when retrieving the cobrowse extension version. ```json { "version": "string" } ``` -------------------------------- ### Create Key using Node.js Source: https://docs.auvious.com/docs/http-api/key This Node.js example shows how to create a key using the `node-fetch` library. It includes setting up the request body, headers, and making the POST call. ```javascript const fetch = require('node-fetch'); const input = '{ "type": "SSH_RSA", "organizationId": "string", "privateKey": "string", "publicKey": "string", "key": "string", "comment": "string" }'; const headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } fetch('https://auvious.video/security/keys', { method: 'POST', body: input, headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` -------------------------------- ### Get Ticket - cURL Example Source: https://docs.auvious.com/docs/http-api/ticket Example of how to retrieve a ticket using cURL. Ensure you replace {ticketId} and {access-token} with actual values. ```shell curl -X GET https://auvious.video/security/ticket/{ticketId} \ -H 'Accept: */*' \ -H 'Authorization: Bearer {access-token}' ``` -------------------------------- ### Get Appointment Interaction in Python Source: https://docs.auvious.com/docs/http-api/appointments/v2 This Python example uses the 'requests' library to get appointment interaction details. It demonstrates setting up headers and making a GET request with an empty parameters object. ```python import requests headers = { 'Accept': 'application/json', 'Authorization': "Bearer " } r = requests.get( '/api/v2/appointments/{id}/interaction', params={}, headers = headers) print r.json() ``` -------------------------------- ### Get All Prompts for a Transcription (Go) Source: https://docs.auvious.com/docs/http-api/ai Example of how to fetch all prompts for a transcription using Go's net/http package. Ensure proper error handling and client configuration. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("GET", "/api/ai/{appId}/conversations/{conversationId}/transcriptions/{transcriptionId}/prompts", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Create Key using Python Source: https://docs.auvious.com/docs/http-api/key This Python example uses the `requests` library to send a POST request for creating a key. It includes setting the necessary headers. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } r = requests.post( 'https://auvious.video/security/keys', params={}, headers = headers) print r.json() ``` -------------------------------- ### Get Interaction by ID - Node.js Request Source: https://docs.auvious.com/docs/http-api/interaction Node.js example using `node-fetch` to get interaction data. Sets required headers for the request. ```javascript const fetch = require('node-fetch'); const headers = { 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } fetch('http://auvious.video/rtc-api/interactions/{interactionId}', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` -------------------------------- ### Get Recordings List (Java) Source: https://docs.auvious.com/docs/http-api/recorder A Java example for fetching recordings, demonstrating the use of URL and HttpURLConnection. Note: This sample may need improvement for production use. ```java // This sample needs improvement. URL obj = new URL("/rtc-recorder/api/recordings/{conversationId}"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Get All Notifications (Ruby) Source: https://docs.auvious.com/docs/http-api/appointments/notifications This Ruby example utilizes the 'rest-client' gem to make a GET request to the notifications API. It parses the JSON response. ```ruby require 'rest-client' require 'json' headers = { 'Accept' => 'application/json', 'Authorization' => "Bearer " } result = RestClient.get '/api/notifications/', params: { 'applicationId' => 'string'}, headers: headers p JSON.parse(result) ``` -------------------------------- ### Send Audio to Live Session (Go) Source: https://docs.auvious.com/docs/http-api/ai This Go code demonstrates how to send audio data to a live session using the net/http package. It includes setting up headers and making the POST request. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "/api/ai/{appId}/live/{id}/audio/{streamId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### 200 Response Example for Get Translations Source: https://docs.auvious.com/docs/http-api/ai This is an example of a successful JSON response when retrieving all translations of a transcription. It details the structure of the 'translations' array and its elements. ```json { "translations": [ { "id": "string", "transcript": "string", "state": "SUBMITTED", "language": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ] } ``` -------------------------------- ### Retrieve Key Request Example Source: https://docs.auvious.com/docs/http-api/key This is an example of an HTTP GET request to retrieve a specific key by its ID. The ID is passed as a path parameter. ```http GET https://auvious.video/security/keys/{id} HTTP/1.1 Host: auvious.video Accept: application/json ``` -------------------------------- ### Create Key using Ruby Source: https://docs.auvious.com/docs/http-api/key This Ruby example uses the `rest-client` gem to create a key. It shows how to set up the request headers and make the POST call. ```ruby require 'rest-client' require 'json' headers = { 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'Authorization' => 'Bearer {access-token}' } result = RestClient.post 'https://auvious.video/security/keys', params: {}, headers: headers p JSON.parse(result) ``` -------------------------------- ### Get Player Composition (Ruby) Source: https://docs.auvious.com/docs/http-api/composition This Ruby code snippet utilizes the 'rest-client' and 'json' gems to retrieve a player composition. It sets up the required headers and makes a GET request with parameters for authentication. Make sure to install the gems (`gem install rest-client json`). ```ruby require 'rest-client' require 'json' headers = { 'Accept' => '*/*', 'Range' => 'string', 'Authorization' => 'API_KEY' } result = RestClient.get 'http://auvious.video/composition/api/player/inline/{conversationId}/{compositionId}/{fileName}', params: { 'Date' => 'string', 'Expires' => 'string', 'Signature' => 'string'}, headers: headers p JSON.parse(result) ``` -------------------------------- ### POST Callback Request using Go Source: https://docs.auvious.com/docs/http-api/facades This Go code demonstrates how to construct and send a POST request to the Auvious callback facade. It includes setting up headers and the request body. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"*/*"}, "X-OtpVerificationId": []string{"string"}, "X-OtpCode": []string{"string"}, "X-ApplicationId": []string{"string"}, "X-UrlBase": []string{"string"}, "X-Ticket-Expiration-Seconds": []string{"0"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "https://auvious.video/security/facades/callback", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Join Live Session using Go Source: https://docs.auvious.com/docs/http-api/ai This Go code snippet demonstrates how to join a live session using the net/http package. You need to provide the access token in the Authorization header. ```go package main import ( "bytes", "net/http", ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "/api/ai/{appId}/live/{id}/join/{conferenceId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Player Composition (Python) Source: https://docs.auvious.com/docs/http-api/composition This Python script uses the 'requests' library to fetch a player composition. It defines the necessary headers and makes a GET request, passing query parameters for authentication and date/expiry information. Ensure you have the 'requests' library installed (`pip install requests`). ```python import requests headers = { 'Accept': '*/*', 'Range': 'string', 'Authorization': 'API_KEY' } r = requests.get( 'http://auvious.video/composition/api/player/inline/{conversationId}/{compositionId}/{fileName}', params={ 'Date': 'string', 'Expires': 'string', 'Signature': 'string'}, headers = headers) print r.json() ``` -------------------------------- ### Get Available Languages (HTTP Request) Source: https://docs.auvious.com/docs/http-api/ai This is an example of an HTTP request to get the supported languages for an AI provider. It specifies the endpoint and required headers. ```http GET /api/ai/{appId}/providers/{provider}/languages HTTP/1.1 Accept: application/json ``` -------------------------------- ### Start Recording (Shell) Source: https://docs.auvious.com/docs/http-api/recorder Initiates a recording session using a cURL command. Ensure you replace 'API_KEY' with your actual API key. ```shell curl -X POST /rtc-recorder/api/recordings/start \ -H 'Content-Type: application/json' \ -H 'Accept: */*' \ -H 'Authorization: API_KEY' ``` -------------------------------- ### Create Basic Appointment (Go) Source: https://docs.auvious.com/docs/http-api/appointments/v2 This Go code demonstrates how to make a POST request to create a basic appointment. It includes setting up headers and the request body. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, } var body []byte // body = ... req, err := http.NewRequest("POST", "/api/v2/appointments/basic", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get All Translations of a Transcription (HTTP Request) Source: https://docs.auvious.com/docs/http-api/ai This is an example of an HTTP GET request to retrieve all translations for a specific transcription. It includes the endpoint and required headers. ```http GET /api/ai/{appId}/conversations/{conversationId}/transcriptions/{transcriptionId}/translations HTTP/1.1 Accept: application/json ``` -------------------------------- ### Get Cobrowse Extension Version Source: https://docs.auvious.com/docs/http-api/cobrowse This example shows how to make an HTTP GET request to retrieve the version of the cobrowsing extension. This operation does not require authentication. ```http GET http://localhost:4444/cobrowser/extension HTTP/1.1 Host: localhost:4444 Accept: application/json ``` -------------------------------- ### Generate Signed URL for Snapshot (Java) Source: https://docs.auvious.com/docs/http-api/snapshot A basic Java example demonstrating how to establish an HTTP POST connection to request a signed URL for a snapshot. Note: This sample needs improvement. ```java // This sample needs improvement. URL obj = new URL("http://auvious.video/rtc-api/snapshots/signedUrl"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("POST"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Get Recording Information (HTTP) Source: https://docs.auvious.com/docs/http-api/recorder This is an HTTP request example to get recording information for a given conversation ID. It specifies the endpoint and required headers. ```http GET /rtc-recorder/api/compositions/{conversationId} HTTP/1.1 Accept: application/json ``` -------------------------------- ### Get Application in Go Source: https://docs.auvious.com/docs/http-api/application This Go code snippet shows how to perform a GET request to fetch application configuration. It includes setting necessary headers and making the HTTP request. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, } var body []byte // body = ... req, err := http.NewRequest("GET", "https://auvious.video/security/applications/{id}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Storage Info for Recorder (Go) Source: https://docs.auvious.com/docs/http-api/recorder Example of how to fetch recorder storage information using Go's net/http package. Ensure proper error handling and client configuration. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, } var body []byte // body = ... req, err := http.NewRequest("GET", "/rtc-recorder/api/recordings/{conversationId}/{recorderId}/{instanceId}/storage/info", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` -------------------------------- ### Get Total Metrics (Python) Source: https://docs.auvious.com/docs/http-api/reporting This Python example uses the 'requests' library to perform a GET request for total metrics. It prints the JSON response. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get( 'https://auvious.video/api/reporting/metrics/total/{metric}', params={}, headers = headers) print r.json() ``` -------------------------------- ### Get Snapshots with Java Source: https://docs.auvious.com/docs/http-api/snapshot This Java code example illustrates how to retrieve snapshots. Ensure you replace '{access-token}' with your actual token and handle potential exceptions. ```java // This sample needs improvement. URL obj = new URL("http://auvious.video/rtc-api/snapshots?interactionId=string"); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); BufferedReader in = new BufferedReader( new InputStreamReader(con.getInputStream()) ); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Get Total Metrics (Node.js) Source: https://docs.auvious.com/docs/http-api/reporting This Node.js example uses the 'node-fetch' library to make a GET request for total metrics. It logs the JSON response. ```javascript const fetch = require('node-fetch'); const headers = { 'Accept': 'application/json' } fetch('https://auvious.video/api/reporting/metrics/total/{metric}', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` -------------------------------- ### Get All Compositions (HTTP Request) Source: https://docs.auvious.com/docs/http-api/composition This is an example HTTP request to get all compositions initiated by the currently authenticated user. It specifies the endpoint and required headers. ```http GET http://auvious.video/composition/api/query/composition?pageable=page,0,size,1,sort,string HTTP/1.1 Host: auvious.video Accept: application/json ``` -------------------------------- ### Start Recording (Python) Source: https://docs.auvious.com/docs/http-api/recorder Initiates a recording session using the Python requests library. The 'params' argument is included but should be populated with the appropriate payload. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': '*/*', 'Authorization': 'API_KEY' } r = requests.post( '/rtc-recorder/api/recordings/start', params={}, headers = headers) print r.json() ``` -------------------------------- ### Get Applications (Python) Source: https://docs.auvious.com/docs/http-api/application This Python example uses the 'requests' library to retrieve application data. It includes parameters for pagination and sorting. ```python import requests headers = { 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}' } r = requests.get( 'https://auvious.video/security/applications', params={ 'pageable': { "page": 0, "size": 1, "sort": [ "string" ] }}, headers = headers) print r.json() ``` -------------------------------- ### Get All Notifications (Node.js) Source: https://docs.auvious.com/docs/http-api/appointments/notifications This Node.js example uses the 'node-fetch' library to make a GET request to the notifications API. It logs the JSON response to the console. ```javascript const fetch = require('node-fetch'); const headers = { 'Accept': 'application/json', 'Authorization': "Bearer " } fetch('/api/notifications/?applicationId=bf8215e5-a39e-490a-a0e2-07df6a3d8c1f', { method: 'GET', headers }) .then(r => r.json()) .then((body) => { console.log(body) }) ``` -------------------------------- ### Get Recordings List (Go) Source: https://docs.auvious.com/docs/http-api/recorder This Go code demonstrates how to make a GET request to the recordings API. It shows how to set up headers and execute the request. ```go package main import ( "bytes" "net/http" ) func main() { headers := map[string][]string{ "Accept": []string{"application/json"}, "Accept-Version": []string{"string"}, "Authorization": []string{"API_KEY"}, } var body []byte // body = ... req, err := http.NewRequest("GET", "/rtc-recorder/api/recordings/{conversationId}", bytes.NewBuffer(body)) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ```