### Get Website Details using Ruby Source: https://api-docs.mouseflow.com/ Fetch website details using Ruby's Net::HTTP library. This example demonstrates setting up the HTTP connection, authentication, and making the GET request. ```ruby require 'net/http' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Recording Details with Python Source: https://api-docs.mouseflow.com/ This Python example uses the `requests` library to retrieve recording details. It utilizes `HTTPBasicAuth` for authentication and makes a GET request to the specified API endpoint. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get Saved View Details (Ruby) Source: https://api-docs.mouseflow.com/ This Ruby example uses the Net::HTTP library to fetch saved view details. It sets up an HTTP connection, makes a GET request with basic authentication, and handles the response. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}/views/{view-id}') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Recording Details with C# Source: https://api-docs.mouseflow.com/ This C# example demonstrates fetching recording details using `HttpClient`. It configures `HttpClientHandler` for network credentials and deserializes the JSON response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get Recordings with Navigational Filters (C#) Source: https://api-docs.mouseflow.com/ This C# example demonstrates fetching filtered recordings using `HttpClient` and `NetworkCredential` for basic authentication. It deserializes the JSON response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}/recordings?entry=%2Flanding-page&funnel=%2Fproducts&exit=%2Fthank-you&visitmin=18000"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Search Recordings with Python Source: https://api-docs.mouseflow.com/#introduction A Python example using the `requests` library to search for recordings. It includes basic authentication setup. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/recordings?search=products", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get Saved View Details (C#) Source: https://api-docs.mouseflow.com/ This C# example uses HttpClient to fetch saved view details. It configures credentials using NetworkCredential and awaits the asynchronous GET request. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}/views/{view-id}"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get Recording Details with Java Source: https://api-docs.mouseflow.com/ This Java example shows how to retrieve recording details using `HttpURLConnection`. It encodes credentials for basic authentication and reads the response from the API. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); ``` -------------------------------- ### Get List of Forms using C# Source: https://api-docs.mouseflow.com/#introduction This C# example uses HttpClient to fetch form data. It configures credentials for basic authentication and deserializes the JSON response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}/forms"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get Recorded Sessions with Python Source: https://api-docs.mouseflow.com/#introduction This Python example uses the `requests` library to make a GET request to the Mouseflow API. It includes basic authentication with your email and API token. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/recordings", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get Recordings with Navigational Filters (Java) Source: https://api-docs.mouseflow.com/#introduction This Java example shows how to fetch filtered recordings using HttpURLConnection. It encodes credentials for Basic Authentication and reads the response from the input stream. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/recordings?entry=%2Flanding-page&funnel=%2Fproducts&exit=%2Fthank-you&visitmin=18000"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); ``` -------------------------------- ### Get Recordings with Navigational Filters (Java) Source: https://api-docs.mouseflow.com/ This Java example shows how to retrieve filtered recordings using `HttpURLConnection`. It encodes authentication credentials using Base64. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/recordings?entry=%2Flanding-page&funnel=%2Fproducts&exit=%2Fthank-you&visitmin=18000"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); ``` -------------------------------- ### Start Sharing a Recording (jQuery) Source: https://api-docs.mouseflow.com/ This jQuery AJAX example demonstrates how to share a recording. It sends a POST request with basic authentication encoded using `btoa`. The response data is logged to the console. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}/share", dataType: "json", type: "POST", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### List Websites using Python Source: https://api-docs.mouseflow.com/ This Python example utilizes the requests library for making an authenticated GET request to the Mouseflow API's /websites endpoint. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get Recorded Sessions with C# HttpClient Source: https://api-docs.mouseflow.com/#introduction This C# example uses `HttpClient` to retrieve recorded sessions. It configures `HttpClientHandler` with `NetworkCredential` for basic authentication and deserializes the JSON response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}/recordings"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get Website Details using Java Source: https://api-docs.mouseflow.com/ Fetch website details using Java's HttpURLConnection. This example demonstrates setting the Authorization header with Base64 encoded credentials. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); ``` -------------------------------- ### Start Website Recording with Mouseflow API Source: https://api-docs.mouseflow.com/ Use this endpoint to start recording visitors on a specific website. Ensure you replace `{website-id}` with the actual website ID. ```api PUT /websites/{website-id} {"recordingStatus":"Recording"} ``` -------------------------------- ### Start recording visitors on a website Source: https://api-docs.mouseflow.com/ This endpoint allows you to start the recording of website visitors for a specific website. ```APIDOC ## PUT /websites/{website-id} ### Description Starts the recording of website visitors. ### Method PUT ### Endpoint /websites/{website-id} ### Request Body - **recordingStatus** (string) - Required - Must be set to "Recording". ### Request Example ```json { "recordingStatus": "Recording" } ``` ### Response #### Success Response (200) - **recordingStatus** (string) - Indicates the current recording status. #### Response Example ```json { "recordingStatus": "Recording" } ``` ``` -------------------------------- ### Get Website Details using C# HttpClient Source: https://api-docs.mouseflow.com/ Retrieve website details using C#'s HttpClient. This example configures the HttpClient with NetworkCredential for basic authentication and deserializes the JSON response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get Recordings with Navigational Filters (Ruby) Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to make an authenticated GET request to retrieve filtered recordings. It sets up an HTTP connection and includes basic authentication. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}/recordings?entry=%2Flanding-page&funnel=%2Fproducts&exit=%2Fthank-you&visitmin=18000') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Website Details using jQuery AJAX Source: https://api-docs.mouseflow.com/#introduction This example shows how to fetch website details using jQuery's AJAX method. It includes basic authentication by encoding credentials and handling the response. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Get Website Details using PHP Source: https://api-docs.mouseflow.com/ Use PHP's cURL functions to retrieve website details. This example configures cURL options for the URL, authentication, and return transfer. ```php ``` -------------------------------- ### List Websites using jQuery AJAX Source: https://api-docs.mouseflow.com/ This example uses jQuery's AJAX method to make a GET request. It includes basic authentication by encoding credentials and setting the Authorization header. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Get Recorded Sessions using jQuery AJAX Source: https://api-docs.mouseflow.com/ This example shows how to fetch recorded sessions using jQuery's AJAX method. It includes basic authentication by encoding credentials and setting the Authorization header. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/recordings", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Get Recorded Sessions using Ruby Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to make an authenticated GET request to retrieve recorded sessions. Ensure you have the `net/http` and `openssl` libraries available. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}/recordings') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Funnel Report with Python Source: https://api-docs.mouseflow.com/ This Python example uses the `requests` library to retrieve funnel report data. It utilizes `HTTPBasicAuth` for authentication and makes a GET request to the specified endpoint. Ensure you have the `requests` library installed (`pip install requests`). ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/funnels/{funnel-id}", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Create Website using Java Source: https://api-docs.mouseflow.com/ This Java example shows how to create a new website using HttpURLConnection. It includes setting the Authorization header with Basic encoding. ```java URL url = new URL("https://api-us.mouseflow.com/websites"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("POST"); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); wr.write("{\"domain\": \"myshop2.com\", \"recordingRate\": 50}"); wr.flush(); int HttpResult = conn.getResponseCode(); ``` -------------------------------- ### Get Recordings with Date Range Filter Source: https://api-docs.mouseflow.com/#introduction This example demonstrates how to fetch recordings within a specific date range using the Mouseflow API. The `fromdate` parameter specifies the start date (inclusive), and the `todate` parameter specifies the end date (exclusive). ```APIDOC ## GET /websites/{website-id}/recordings ### Description Retrieves a list of recordings for a given website, with optional date range filtering. ### Method GET ### Endpoint /websites/{website-id}/recordings ### Query Parameters - **fromdate** (Date) - Required - The start date of the query. The actual start time is midnight on the selected date, according to the user's selected time zone. - **todate** (Date) - Required - The end date of the query. This date is not included in the query. ### Request Example ``` https://api-us.mouseflow.com/websites/{website-id}/recordings?fromdate=2015-10-04&todate=2015-10-15 ``` ### Authentication Basic Authentication with email and API token. ### Response #### Success Response (200) Returns a JSON object containing a list of recordings. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Start Sharing a Recording (Ruby) Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to share a recording using Net::HTTP. It sets up an HTTP connection, constructs a POST request, and includes basic authentication. SSL verification is disabled for simplicity, which may not be suitable for production environments. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new('/websites/{website-id}/recordings/{recording-id}/share') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Create Website using C# HttpClient Source: https://api-docs.mouseflow.com/ This C# example uses HttpClient to create a new website. It configures credentials and sends the POST request with a JSON string content. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.PostAsync("https://api-us.mouseflow.com/websites", new StringContent("{\"domain\": \"myshop2.com\", \"recordingRate\": 50}")); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get List of Forms using Python Source: https://api-docs.mouseflow.com/#introduction This Python example uses the requests library to get form data. It utilizes HTTPBasicAuth for authentication and makes a GET request to the specified endpoint. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/forms", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get Single Journey with Python Source: https://api-docs.mouseflow.com/ Fetch a single journey using the Python requests library. This example demonstrates basic authentication and making a GET request. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/flows/{flow-id}", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Create Website using Ruby Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to make a POST request to create a new website. It handles SSL verification and basic authentication. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new('/websites') request.basic_auth('my@email.com', 'token1234') request.body = '{"domain": "myshop2.com", "recordingRate": 50}' response = http.request(request) ``` -------------------------------- ### Get Website Journeys using Python Source: https://api-docs.mouseflow.com/#introduction Fetch journey data in your Python projects using the requests library. Ensure you have the library installed (`pip install requests`). ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/flows", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Start Sharing a Recording (cURL) Source: https://api-docs.mouseflow.com/ Use this command to initiate sharing for a specific recording. Ensure you replace `{website-id}` and `{recording-id}` with actual values. Authentication is done via basic auth with your email and API token. ```curl curl -X POST -u my@email.com:token1234 https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}/share ``` -------------------------------- ### Search Recordings with C# Source: https://api-docs.mouseflow.com/#introduction This C# example uses `HttpClient` to search for recordings. It sets up `HttpClientHandler` for credentials and deserializes the JSON response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}/recordings?search=products"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get List of Saved Views using Python Source: https://api-docs.mouseflow.com/#introduction This Python example uses the `requests` library to get saved views from the Mouseflow API. It includes basic HTTP authentication with your email and API token. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/views", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Start Sharing a Recording (C#) Source: https://api-docs.mouseflow.com/ This C# code uses `HttpClient` to share a recording. It configures `HttpClientHandler` with network credentials for basic authentication and sends a POST request. The response is read as a string and deserialized. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.PostAsync("https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}/share", new StringContent("")); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Get Heatmap Page List (Python) Source: https://api-docs.mouseflow.com/ This Python example uses the requests library to retrieve heatmap page list data. It utilizes HTTPBasicAuth for authentication and makes a GET request to the specified endpoint. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/pagelist?url={url}", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Filter Recordings by Minimum Friction (Java) Source: https://api-docs.mouseflow.com/ This Java example shows how to fetch recordings filtered by minimum friction using `HttpURLConnection`. It includes setting up basic authentication with Base64 encoding. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/recordings?frictionmin=2.5"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); ``` -------------------------------- ### Star a Recording using Ruby Source: https://api-docs.mouseflow.com/#introduction This Ruby script demonstrates how to star a recording. It sets up an HTTP connection and sends a POST request with basic authentication. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new('/websites/{website-id}/recordings/{recording-id}/star') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Search Recordings with Java Source: https://api-docs.mouseflow.com/#introduction This Java example shows how to search recordings using `HttpURLConnection` and Base64 encoded authentication. It reads the response line by line. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/recordings?search=products"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); ``` -------------------------------- ### Get Funnel List with Python Source: https://api-docs.mouseflow.com/ This Python example uses the requests library to retrieve funnel information. It utilizes HTTPBasicAuth for authentication. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/funnels", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get List of Saved Views using jQuery AJAX Source: https://api-docs.mouseflow.com/#introduction This example demonstrates how to use jQuery's AJAX method to retrieve saved views. It sets the URL, specifies JSON data type and GET method, and includes basic authentication in the headers. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/views", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Get Recordings with Navigational Filters (Ruby) Source: https://api-docs.mouseflow.com/#introduction This Ruby script demonstrates how to make an authenticated GET request to retrieve filtered recordings. It sets up an HTTP connection, includes SSL verification, and sends the request with basic authentication. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}/recordings?entry=%2Flanding-page&funnel=%2Fproducts&exit=%2Fthank-you&visitmin=18000') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Single Journey with C# Source: https://api-docs.mouseflow.com/ Retrieve a single journey using C#'s HttpClient. This example configures `HttpClientHandler` for credentials and asynchronously fetches the response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites/{website-id}/flows/{flow-id}"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### Create Feedback Survey with C# Source: https://api-docs.mouseflow.com/ This C# snippet shows how to create a feedback survey using `HttpClient` with `HttpClientHandler` for basic authentication. It sets up the client and handler with provided credentials. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { ``` -------------------------------- ### Get Single Journey with Java Source: https://api-docs.mouseflow.com/ Retrieve a single journey using Java's HttpURLConnection. This example shows how to set the Authorization header with Base64 encoded credentials. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/flows/{flow-id}"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; StringBuffer response = new StringBuffer(); while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); System.out.println(response.toString()); ``` -------------------------------- ### Add User via Ruby Source: https://api-docs.mouseflow.com/#introduction This Ruby script demonstrates how to add a user using the Net::HTTP library. It includes setting up SSL and basic authentication. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP:post.new('/account/users') request.basic_auth('my@email.com', 'token1234') request.body = '{"email": "subuser@example.com", "ssoEnabled": false, "ssoExcluded": false, "password": "Qwerts123!", "active": true, "permissionRole": "Read", "permissions": []}' response = http.request(request) ``` -------------------------------- ### Get Website Journeys using PHP Source: https://api-docs.mouseflow.com/#introduction Retrieve journey information within your PHP applications using cURL. This example shows how to set the URL, authentication, and execute the request. ```php ``` -------------------------------- ### Add User via Ruby Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to add a new user using the Net::HTTP library. It includes setting up the HTTP connection, authentication, and the request body. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP:post.new('/account/users') request.basic_auth('my@email.com', 'token1234') request.body = '{"email": "subuser@example.com", "ssoEnabled": false, "ssoExcluded": false, "password": "Qwerts123!", "active": true, "permissionRole": "Read", "permissions": []}' response = http.request(request) ``` -------------------------------- ### Fetch Available Forms (Ruby) Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to fetch available forms from a given URL using the Net::HTTP library. It includes setting up the HTTP connection, making a GET request with basic authentication, and handling the response. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}/forms/available?url={url}') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Recordings with Navigational Filters (Python) Source: https://api-docs.mouseflow.com/#introduction This Python snippet uses the requests library to fetch filtered recordings. It utilizes HTTPBasicAuth for authentication and includes the same navigational filters as the cURL example. ```python import requests from requests.auth import HTTPBasicAuth r = requests.get("https://api-us.mouseflow.com/websites/{website-id}/recordings?entry=%2Flanding-page&funnel=%2Fproducts&exit=%2Fthank-you&visitmin=18000", auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Create Website using Python Source: https://api-docs.mouseflow.com/ This Python snippet uses the 'requests' library to send a POST request for creating a new website. It includes basic HTTP authentication. ```python import requests from requests.auth import HTTPBasicAuth r = requests.post("https://api-us.mouseflow.com/websites", '{"domain": "myshop2.com", "recordingRate": 50}', auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get Saved View Details (PHP) Source: https://api-docs.mouseflow.com/ This PHP example uses cURL to retrieve saved view details. It sets the URL, user credentials, and return transfer options before executing the request. ```php ``` -------------------------------- ### Start sharing a recording Source: https://api-docs.mouseflow.com/ Initiates the sharing of a specific recording. Returns a sharing token upon successful execution. ```APIDOC ## POST /websites/{website-id}/recordings/{recording-id}/share ### Description Starts sharing a specific recording. Requires authentication with email and token. ### Method POST ### Endpoint /websites/{website-id}/recordings/{recording-id}/share ### Parameters #### Path Parameters - **website-id** (string) - Required - The ID of the website. - **recording-id** (string) - Required - The ID of the recording to share. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **sharingToken** (string) - The token generated for sharing the recording. #### Response Example ```json { "example": "HQ7068MglEuUZlA6WOSF-w" } ``` ``` -------------------------------- ### Get Page URL List using jQuery AJAX Source: https://api-docs.mouseflow.com/ This example shows how to use jQuery's AJAX method to retrieve page URLs. It includes basic authentication and handles the response. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/pagelist/urls", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Star a Recording using Ruby Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to star a recording using the Net::HTTP library. SSL verification is disabled for simplicity. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new('/websites/{website-id}/recordings/{recording-id}/star') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Retrieve Feedback List using Ruby Source: https://api-docs.mouseflow.com/#introduction This Ruby script demonstrates how to make a GET request to the feedback endpoint. Ensure you have the `net/http` and `openssl` libraries available. Basic authentication is used with your email and token. ```ruby require 'net/http' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}/feedback') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Website Tags using jQuery AJAX Source: https://api-docs.mouseflow.com/ This example shows how to use jQuery's AJAX method to retrieve website tags. It includes basic authentication headers and logs the response. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/recordings/tags", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Create Website using cURL Source: https://api-docs.mouseflow.com/ Use this command to create a new website via the Mouseflow API. Ensure your authentication credentials and domain are correctly specified. ```bash curl -X POST -u my@email.com:token1234 -d '{"domain": "myshop2.com", "recordingRate": 50}' https://api-us.mouseflow.com/websites ``` -------------------------------- ### Get Single Journey with JavaScript (jQuery) Source: https://api-docs.mouseflow.com/ Fetch a single journey using jQuery's AJAX method. This example demonstrates setting the Authorization header using `btoa` for Base64 encoding. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/flows/{flow-id}", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Star a Recording using Java Source: https://api-docs.mouseflow.com/#introduction This Java code snippet shows how to star a recording using `HttpURLConnection`. It encodes credentials for basic authentication. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}/star"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("POST"); int HttpResult = conn.getResponseCode(); ``` -------------------------------- ### Start Sharing a Recording (Python) Source: https://api-docs.mouseflow.com/ This Python snippet uses the `requests` library to share a recording. It utilizes `HTTPBasicAuth` for authentication. The request body is empty. ```python import requests from requests.auth import HTTPBasicAuth r = requests.post("https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}/share", '', auth=HTTPBasicAuth("my@email.com", "token1234")) ``` -------------------------------- ### Get Funnel List with JavaScript (jQuery) Source: https://api-docs.mouseflow.com/ This JavaScript example uses jQuery's AJAX method to retrieve funnel data. It employs basic authentication by encoding credentials and setting the Authorization header. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/funnels", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Get List of Forms using jQuery AJAX Source: https://api-docs.mouseflow.com/#introduction This example shows how to use jQuery's AJAX method to retrieve form data. It includes basic authentication using btoa and logs the JSON response. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/forms", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Get Recording Details with Ruby Source: https://api-docs.mouseflow.com/ This Ruby snippet demonstrates how to fetch recording details using the Net::HTTP library. It sets up an HTTPS connection, authenticates using basic auth, and makes a GET request. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new('/websites/{website-id}/recordings/{recording-id}') request.basic_auth('my@email.com', 'token1234') response = http.request(request) ``` -------------------------------- ### Get Saved View Details (JavaScript) Source: https://api-docs.mouseflow.com/ This JavaScript example uses jQuery's AJAX method to retrieve saved view details. It employs basic authentication by encoding credentials and setting the Authorization header. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/views/{view-id}", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Create Form using Ruby Source: https://api-docs.mouseflow.com/ This Ruby script demonstrates how to create a form using the Net::HTTP library. It sets up an HTTP POST request with basic authentication and the form data in JSON format. ```ruby require 'net/https' http = Net::HTTP.new('https://api-us.mouseflow.com') http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new('/websites/{website-id}/forms') request.basic_auth('my@email.com', 'token1234') request.body = '{"url":"/checkout","target":"checkout-form","alias":"Checkout Form","fields":[{"target":"coupon","alias":"Coupon Code Input"},{"target":"user","alias":"User Name Input"},{"target":"terms","alias":"Terms Checkbox"}]}' response = http.request(request) ``` -------------------------------- ### Start Sharing a Recording (Java) Source: https://api-docs.mouseflow.com/ This Java code snippet shows how to share a recording using `HttpURLConnection`. It encodes the authentication credentials using Base64 and sets the `Authorization` header. The request method is set to POST. ```java URL url = new URL("https://api-us.mouseflow.com/websites/{website-id}/recordings/{recording-id}/share"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); String encoded = Base64.encodeToString(("my@email.com:token1234").getBytes("UTF-8"), Base64.NO_WRAP); conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestMethod("POST"); int HttpResult = conn.getResponseCode(); ``` -------------------------------- ### Get Feedback List using jQuery AJAX Source: https://api-docs.mouseflow.com/ This example shows how to use jQuery's AJAX method to retrieve feedback data. It uses basic authentication by encoding credentials and setting the Authorization header. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/feedback", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### Fetch Form Report using jQuery AJAX Source: https://api-docs.mouseflow.com/ This example uses jQuery's `$.ajax` method to make a GET request for form report data. It uses `btoa` to encode credentials for Basic Authentication. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/forms/{form-id}", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ``` -------------------------------- ### List Websites using C# Source: https://api-docs.mouseflow.com/ This C# code uses HttpClient to fetch website data. It configures credentials for basic authentication and deserializes the JSON response. ```csharp using (var handler = new HttpClientHandler { Credentials = new NetworkCredential("my@email.com", "token1234") }) using (var client = new HttpClient(handler)) { var response = await client.GetAsync("https://api-us.mouseflow.com/websites"); var jsonString = await response.Content.ReadAsStringAsync(); return JsonConvert.DeserializeObject(jsonString); } ``` -------------------------------- ### List Page Groups with jQuery AJAX Source: https://api-docs.mouseflow.com/ This example uses jQuery's `$.ajax` method to make a GET request for page groups. It uses `btoa` to encode credentials for Basic Authentication and logs the JSON response. ```javascript $.ajax({ url: "https://api-us.mouseflow.com/websites/{website-id}/pagegroup", dataType: "json", type: "GET", headers: { "Authorization": "Basic " + btoa("my@email.com:token1234") } }).always(function (data) { console.log(JSON.stringify(data)); }); ```