Simplify Big Data Integration with Dowell’s API Classification Framework
Welcome to the Dowell Classification of Big Data API! The Classification API is a comprehensive tool that enables users to classify a large set of data efficiently by using three classification methods which are –
Non-Hierarchial Classification
Hierarchial Classification
Tree Structure
It provides a reliable and high-performance solution for the classification of data.
This feature enables the users to classify the data by selecting and setting the basket order by their own choice.
The project owner has set a basket order, enabling users to classify the data by following it
This feature enables users to classify data by arranging baskets and items in the form of parent nodes and child nodes, following the properties of a data tree
Final Result: Upon processing, users receive the final classified results, organized according to the chosen classification method.
For detailed API documentation, including endpoint descriptions, request and response examples, and authentication details, please refer to the API documentation
In the following scenarios, Dowell will furnish comprehensive instructions on obtaining the Service key and guide you through the steps to use the API. You’ll find examples in various formats such as Python, PHP, React, Flutter, and WordPress in the tabs below. Feel free to explore the examples in each tab for practical insights.
Dive into the world of possibilities with Dowell’s Classification of Big Data API! Explore how you can effortlessly organize documents, streamline product management, and unlock insights into customer behavior. Join us on an exciting journey where technology meets simplicity, making complex tasks a breeze for everyone!
You can classify your data using the Non-Hierarchical method by selecting and setting the basket order according to your preference.
Non-Hierarchical classification allows users to set their own basket order, while Hierarchical classification follows a predetermined basket order set by the project owner.
Tree Structure Classification organizes data into parent nodes and child nodes, resembling the properties of a data tree.
Yes, you can customize the classification process by selecting the appropriate method and setting parameters according to your requirements.
The API is designed to provide reliable and high-performance classification solutions, ensuring efficient processing of data.
If you encounter any issues, have questions, or need assistance with Dowell Classification of Big Data API, you can contact the support team for prompt assistance. Contact us at Dowell@dowellresearch.uk
Yes, the API is designed to be easily integrated into existing software or applications using the provided endpoints and request formats.
Yes, the API supports multiple programming languages, making it versatile for integration into different environments.
Yes a trial version or demo available for new users.
Dowell UX Living Lab offers a wide range of APIs to enhance user experience and streamline various processes. To explore the full list of APIs available, including Dowell Email, Dowell Newsletter, Samanta Content Evaluator, and many more.
For more details and to explore the complete list of APIs provided by Dowell UX Living Lab, please visit our documentation page.
This script sends a POST request to a specified URL, submitting a structured payload containing information about countries, states, and cities. The server processes this data, and if successful, it prints the created resource’s details.
import requests
url = "http://100061.pythonanywhere.com/allbaskets/"
payload = {
"country": [
{"item": "India", "itemLink": "Asia"},
{"item": "USA", "itemLink": "North America"},
{"item": "Germany", "itemLink": "Europe"},
],
"state": [
{"item": "Uttar Pradesh", "itemLink": "India"},
{"item": "Maharashtra", "itemLink": "India"},
{"item": "Georgia", "itemLink": "USA"},
{"item": "Nevada", "itemLink": "USA"},
{"item": "Bavaria", "itemLink": "Germany"},
{"item": "Brandenburg", "itemLink": "Germany"},
],
"city": [
{"item": "Agra", "itemLink": "Uttar Pradesh"},
{"item": "Noida", "itemLink": "Uttar Pradesh"},
{"item": "Pune", "itemLink": "Maharashtra"},
{"item": "Mumbai", "itemLink": "Maharashtra"},
{"item": "Atlanta", "itemLink": "Georgia"},
{"item": "Carson City", "itemLink": "Nevada"},
{"item": "Munich", "itemLink": "Bavaria"},
{"item": "Potsdam", "itemLink": "Brandenburg"},
],
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
The script makes a POST request to a designated URL, submitting details about the classification type, the number of levels, and a database ID. If the request is successful (HTTP status code 201), it prints the confirmation message along with the response data.
import requests
url = "http://100061.pythonanywhere.com/type/"
payload = {
"numberOfLevels": 3,
"classificationType": "N",
"dbInsertedId": "657af39974f3ec7b903c6ff5",
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
This script sends a POST request to a predefined URL, submitting information about a selected basket, a list of baskets, and an inserted ID. If the request is successful, it prints a confirmation message and optionally processes the response data.live).
import requests
url = "http://100061.pythonanywhere.com/basket/"
payload = {
"selectedBasket": "state",
"baskets": ["country", "state"],
"insertedId": "657af3b13751ba556c902578",
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
The script submits a POST request to a specified URL, providing an inserted ID and a selected permutation. If the request is successful, it prints a confirmation message and optionally processes the response data received from the server.
import requests
url = "http://100061.pythonanywhere.com/savepermutations/"
payload = {
"inserted_id": "657af3b13751ba556c902578",
"selectedPermutation": ["state", "city"],
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
This script sends a POST request to a predefined URL, submitting details about the classification type, the number of levels, and a database ID. If the request is successful, it prints a confirmation message and optionally processes the response data, including the details of the created resource.
import requests
url = "http://100061.pythonanywhere.com/type/"
payload = {
"numberOfLevels": 3,
"classificationType": "T",
"dbInsertedId": "649c0b9dda081daa9f9543fa",
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
err
This Python script initializes a payment using the PayPal API. It sends a POST request to a specified endpoint with details such as the PayPal client ID, PayPal secret key, price, product name, currency code, callback URL, and mode (sandbox or live). The script handles the response, printing the success message along with the response data if the payment initiation is successful.
import requests
url = "http://100061.pythonanywhere.com/savepermutations/"
payload = {
"inserted_id": "657af40f27ba2526f702d39f",
"selectedPermutation": ["India", "Germany"],
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
err
This script sends a POST request to a specified URL, submitting a structured payload containing information about countries, states, and cities. The server processes this data, and if successful, it prints the created resource’s details.
import requests
url = "http://100061.pythonanywhere.com/allbaskets/"
payload = {
"country": [
{"item": "India", "itemLink": "Asia"},
{"item": "USA", "itemLink": "North America"},
{"item": "Germany", "itemLink": "Europe"},
],
"state": [
{"item": "Uttar Pradesh", "itemLink": "India"},
{"item": "Maharashtra", "itemLink": "India"},
{"item": "Georgia", "itemLink": "USA"},
{"item": "Nevada", "itemLink": "USA"},
{"item": "Bavaria", "itemLink": "Germany"},
{"item": "Brandenburg", "itemLink": "Germany"},
],
"city": [
{"item": "Agra", "itemLink": "Uttar Pradesh"},
{"item": "Noida", "itemLink": "Uttar Pradesh"},
{"item": "Pune", "itemLink": "Maharashtra"},
{"item": "Mumbai", "itemLink": "Maharashtra"},
{"item": "Atlanta", "itemLink": "Georgia"},
{"item": "Carson City", "itemLink": "Nevada"},
{"item": "Munich", "itemLink": "Bavaria"},
{"item": "Potsdam", "itemLink": "Brandenburg"},
],
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
The script makes a POST request to a designated URL, submitting details about the classification type, the number of levels, and a database ID. If the request is successful (HTTP status code 201), it prints the confirmation message along with the response data.
import requests
url = "http://100061.pythonanywhere.com/type/"
payload = {
"numberOfLevels": 3,
"classificationType": "N",
"dbInsertedId": "657af39974f3ec7b903c6ff5",
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
This script sends a POST request to a predefined URL, submitting information about a selected basket, a list of baskets, and an inserted ID. If the request is successful, it prints a confirmation message and optionally processes the response data.live).
import requests
url = "http://100061.pythonanywhere.com/basket/"
payload = {
"selectedBasket": "state",
"baskets": ["country", "state"],
"insertedId": "657af3b13751ba556c902578",
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
The script submits a POST request to a specified URL, providing an inserted ID and a selected permutation. If the request is successful, it prints a confirmation message and optionally processes the response data received from the server.
import requests
url = "http://100061.pythonanywhere.com/savepermutations/"
payload = {
"inserted_id": "657af3b13751ba556c902578",
"selectedPermutation": [
"country",
"state",
"city"
]
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
err
This Python script initializes a payment using the PayPal API. It sends a POST request to a specified endpoint with details such as the PayPal client ID, PayPal secret key, price, product name, currency code, callback URL, and mode (sandbox or live). The script handles the response, printing the success message along with the response data if the payment initiation is successful.
import requests
url = "http://100061.pythonanywhere.com/savepermutations/"
payload = {
"inserted_id": "657af40f27ba2526f702d39f",
"selectedPermutation":[
"Agra",
"Mumbai"
]
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
err
This PHP script sends a POST request with a JSON payload to a specified URL and prints the response.
[
["item" => "India", "itemLink" => "Asia"],
["item" => "USA", "itemLink" => "North America"],
["item" => "Germany", "itemLink" => "Europe"],
],
"state" => [
["item" => "Uttar Pradesh", "itemLink" => "India"],
["item" => "Maharashtra", "itemLink" => "India"],
["item" => "Georgia", "itemLink" => "USA"],
["item" => "Nevada", "itemLink" => "USA"],
["item" => "Bavaria", "itemLink" => "Germany"],
["item" => "Brandenburg", "itemLink" => "Germany"],
],
"city" => [
["item" => "Agra", "itemLink" => "Uttar Pradesh"],
["item" => "Noida", "itemLink" => "Uttar Pradesh"],
["item" => "Pune", "itemLink" => "Maharashtra"],
["item" => "Mumbai", "itemLink" => "Maharashtra"],
["item" => "Atlanta", "itemLink" => "Georgia"],
["item" => "Carson City", "itemLink" => "Nevada"],
["item" => "Munich", "itemLink" => "Bavaria"],
["item" => "Potsdam", "itemLink" => "Brandenburg"],
],
];
$options = [
"http" => [
"header" => "Content-type: application/json",
"method" => "POST",
"content" => json_encode($payload),
],
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== false) {
echo "Resource created successfully\n";
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed\n";
}
?>
This PHP script sends a POST request to a specified URL with a JSON payload. It then checks the response status code and prints relevant information.
3,
"classificationType" => "N",
"dbInsertedId" => "657af39974f3ec7b903c6ff5",
];
try {
$response = requests($url, 'POST', ['json' => $payload]);
if ($response->getStatusCode() == 201) {
echo "Resource created successfully\n";
// Optionally, you can also print or process the response data
$data = json_decode($response->getBody(), true);
print_r($data);
} else {
echo "Request failed with status code: " . $response->getStatusCode() . "\n";
echo $response->getBody();
}
} catch (Exception $e) {
echo "Request failed with an exception: " . $e->getMessage() . "\n";
}
?>
This PHP script sends a POST request to a specified URL with a JSON payload. It handles the response, printing success or failure messages along with the response data.
"state",
"baskets" => ["country", "state"],
"insertedId" => "657af3b13751ba556c902578",
];
try {
$response = requests_post($url, json_encode($payload));
if ($response->getStatusCode() == 201) {
echo "Resource created successfully\n";
// Optionally, you can also print or process the response data
$data = json_decode($response->getBody(), true);
print_r($data);
} else {
echo "Request failed with status code: {$response->getStatusCode()}\n";
echo $response->getBody();
}
} catch (Exception $e) {
echo "Request failed with an exception: {$e->getMessage()}\n";
}
This PHP script performs a POST request to a specified URL with a JSON payload, handling success and error responses accordingly.
3,
"classificationType" => "T",
"dbInsertedId" => "649c0b9dda081daa9f9543fa",
];
try {
$response = requests.post($url, ['json' => $payload]);
if ($response->getStatusCode() == 201) {
echo "Resource created successfully\n";
$data = json_decode($response->getBody(), true);
print_r($data);
} else {
echo "Request failed with status code: {$response->getStatusCode()}\n";
echo $response->getBody();
}
} catch (Exception $e) {
echo "Request failed with an exception: {$e->getMessage()}\n";
}
?>
This PHP code snippet is a basic implementation of sending a POST request to a specified URL using cURL (Client URL Library). Let’s break down the code and provide a description for each part:
3,
"classificationType" => "T",
"dbInsertedId" => "649c0b9dda081daa9f9543fa",
);
$options = array(
CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
),
CURLOPT_RETURNTRANSFER => true,
);
$curl = curl_init();
curl_setopt_array($curl, $options);
try {
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($httpCode == 201) {
echo "Resource created successfully\n";
// Optionally, you can also print or process the response data
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed with status code: $httpCode\n";
echo $response;
}
} catch (Exception $e) {
echo "Request failed with an exception: " . $e->getMessage() . "\n";
} finally {
curl_close($curl);
}
?>
err
This PHP script makes a POST request to a specified URL with a JSON payload containing an inserted ID and selected permutations. It then prints the response data if the request is successful.
"657af40f27ba2526f702d39f",
"selectedPermutation" => array("India", "Germany"),
);
$options = array(
'http' => array(
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($payload),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== FALSE) {
echo "Resource created successfully\n";
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed\n";
}
?>
err
This PHP script sends a POST request with a JSON payload to a specified URL and prints the response.
[
["item" => "India", "itemLink" => "Asia"],
["item" => "USA", "itemLink" => "North America"],
["item" => "Germany", "itemLink" => "Europe"],
],
"state" => [
["item" => "Uttar Pradesh", "itemLink" => "India"],
["item" => "Maharashtra", "itemLink" => "India"],
["item" => "Georgia", "itemLink" => "USA"],
["item" => "Nevada", "itemLink" => "USA"],
["item" => "Bavaria", "itemLink" => "Germany"],
["item" => "Brandenburg", "itemLink" => "Germany"],
],
"city" => [
["item" => "Agra", "itemLink" => "Uttar Pradesh"],
["item" => "Noida", "itemLink" => "Uttar Pradesh"],
["item" => "Pune", "itemLink" => "Maharashtra"],
["item" => "Mumbai", "itemLink" => "Maharashtra"],
["item" => "Atlanta", "itemLink" => "Georgia"],
["item" => "Carson City", "itemLink" => "Nevada"],
["item" => "Munich", "itemLink" => "Bavaria"],
["item" => "Potsdam", "itemLink" => "Brandenburg"],
],
];
$options = [
"http" => [
"header" => "Content-type: application/json",
"method" => "POST",
"content" => json_encode($payload),
],
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== false) {
echo "Resource created successfully\n";
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed\n";
}
?>
This PHP script sends a POST request to a specified URL with a JSON payload. It then checks the response status code and prints relevant information.
3,
"classificationType" => "N",
"dbInsertedId" => "657af39974f3ec7b903c6ff5",
];
try {
$response = requests($url, 'POST', ['json' => $payload]);
if ($response->getStatusCode() == 201) {
echo "Resource created successfully\n";
// Optionally, you can also print or process the response data
$data = json_decode($response->getBody(), true);
print_r($data);
} else {
echo "Request failed with status code: " . $response->getStatusCode() . "\n";
echo $response->getBody();
}
} catch (Exception $e) {
echo "Request failed with an exception: " . $e->getMessage() . "\n";
}
?>
This PHP script sends a POST request to a specified URL with a JSON payload. It handles the response, printing success or failure messages along with the response data.
"state",
"baskets" => ["country", "state"],
"insertedId" => "657af3b13751ba556c902578",
];
try {
$response = requests_post($url, json_encode($payload));
if ($response->getStatusCode() == 201) {
echo "Resource created successfully\n";
// Optionally, you can also print or process the response data
$data = json_decode($response->getBody(), true);
print_r($data);
} else {
echo "Request failed with status code: {$response->getStatusCode()}\n";
echo $response->getBody();
}
} catch (Exception $e) {
echo "Request failed with an exception: {$e->getMessage()}\n";
}
This PHP script sends a POST request to a specified URL with a JSON payload, handling the response accordingly.
"657af3b13751ba556c902578",
"selectedPermutation" => ["country", "state", "city"],
);
$options = array(
'http' => array(
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($payload),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== FALSE) {
echo "Resource created successfully\n";
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed\n";
}
?>
err
This PHP script makes a POST request to a specified URL with a JSON payload containing an inserted ID and selected permutations. It then prints the response data if the request is successful.
"657af40f27ba2526f702d39f",
"selectedPermutation" => array(
"Agra",
"Mumbai"
)
);
$options = array(
'http' => array(
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($payload),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== FALSE) {
echo "Resource created successfully\n";
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed\n";
}
?>
err
This React script uses the Axios library to send a POST request with a JSON payload to a specified URL and logs the response.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/allbaskets/";
const payload = {
"country": [
{"item": "India", "itemLink": "Asia"},
{"item": "USA", "itemLink": "North America"},
{"item": "Germany", "itemLink": "Europe"},
],
"state": [
{"item": "Uttar Pradesh", "itemLink": "India"},
{"item": "Maharashtra", "itemLink": "India"},
{"item": "Georgia", "itemLink": "USA"},
{"item": "Nevada", "itemLink": "USA"},
{"item": "Bavaria", "itemLink": "Germany"},
{"item": "Brandenburg", "itemLink": "Germany"},
],
"city": [
{"item": "Agra", "itemLink": "Uttar Pradesh"},
{"item": "Noida", "itemLink": "Uttar Pradesh"},
{"item": "Pune", "itemLink": "Maharashtra"},
{"item": "Mumbai", "itemLink": "Maharashtra"},
{"item": "Atlanta", "itemLink": "Georgia"},
{"item": "Carson City", "itemLink": "Nevada"},
{"item": "Munich", "itemLink": "Bavaria"},
{"item": "Potsdam", "itemLink": "Brandenburg"},
],
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
// Optionally, you can also log or process the response data
const data = response.data;
console.log(data);
} else {
console.error(`Request failed with status code: ${response.status}`);
console.error(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
In a React (JavaScript) environment, this script uses the Axios library to send a POST request to a specified URL with a JSON payload. It then handles the response based on the status code.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/type/";
const payload = {
numberOfLevels: 3,
classificationType: "N",
dbInsertedId: "657af39974f3ec7b903c6ff5",
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
// Optionally, you can also print or process the response data
const data = response.data;
console.log(data);
} else {
console.log(`Request failed with status code: ${response.status}`);
console.log(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
This React script uses the Axios library to send a POST request to a specified URL with a JSON payload. It handles the response, logging success or failure messages along with the response data.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/basket/";
const payload = {
selectedBasket: "state",
baskets: ["country", "state"],
insertedId: "657af3b13751ba556c902578",
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
// Optionally, you can also print or process the response data
const data = response.data;
console.log(data);
} else {
console.error(`Request failed with status code: ${response.status}`);
console.error(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
This React script utilizes the Axios library to send a POST request to a specified URL with a JSON payload, handling the response accordingly.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/savepermutations/";
const payload = {
inserted_id: "657af3b13751ba556c902578",
selectedPermutation: ["state", "city"],
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
const data = response.data;
console.log(data);
} else {
console.log(`Request failed with status code: ${response.status}`);
console.log(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
This React script uses the Axios library to send a POST request to a specified URL with a JSON payload and handles the response.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/type/";
const payload = {
numberOfLevels: 3,
classificationType: "T",
dbInsertedId: "649c0b9dda081daa9f9543fa",
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
// Optionally, you can also log or process the response data
const data = response.data;
console.log(data);
} else {
console.log(`Request failed with status code: ${response.status}`);
console.log(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
err
This React component uses the axios library to make a POST request to a specified URL with a JSON payload. It logs the response data on success and error details on failure.
import React, { useEffect } from 'react';
import axios from 'axios';
const MyComponent = () => {
const url = "http://100061.pythonanywhere.com/savepermutations/";
useEffect(() => {
const payload = {
inserted_id: "657af40f27ba2526f702d39f",
selectedPermutation: ["India", "Germany"],
};
axios.post(url, payload)
.then(response => {
console.log("Resource created successfully");
console.log(response.data);
})
.catch(error => {
console.error(`Request failed with status code: ${error.response.status}`);
console.error(error.response.data);
});
}, []);
return (
// Your React component content here
);
};
export default MyComponent;
err
This React script uses the Axios library to send a POST request with a JSON payload to a specified URL and logs the response.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/allbaskets/";
const payload = {
"country": [
{"item": "India", "itemLink": "Asia"},
{"item": "USA", "itemLink": "North America"},
{"item": "Germany", "itemLink": "Europe"},
],
"state": [
{"item": "Uttar Pradesh", "itemLink": "India"},
{"item": "Maharashtra", "itemLink": "India"},
{"item": "Georgia", "itemLink": "USA"},
{"item": "Nevada", "itemLink": "USA"},
{"item": "Bavaria", "itemLink": "Germany"},
{"item": "Brandenburg", "itemLink": "Germany"},
],
"city": [
{"item": "Agra", "itemLink": "Uttar Pradesh"},
{"item": "Noida", "itemLink": "Uttar Pradesh"},
{"item": "Pune", "itemLink": "Maharashtra"},
{"item": "Mumbai", "itemLink": "Maharashtra"},
{"item": "Atlanta", "itemLink": "Georgia"},
{"item": "Carson City", "itemLink": "Nevada"},
{"item": "Munich", "itemLink": "Bavaria"},
{"item": "Potsdam", "itemLink": "Brandenburg"},
],
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
// Optionally, you can also log or process the response data
const data = response.data;
console.log(data);
} else {
console.error(`Request failed with status code: ${response.status}`);
console.error(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
In a React (JavaScript) environment, this script uses the Axios library to send a POST request to a specified URL with a JSON payload. It then handles the response based on the status code.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/type/";
const payload = {
numberOfLevels: 3,
classificationType: "N",
dbInsertedId: "657af39974f3ec7b903c6ff5",
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
// Optionally, you can also print or process the response data
const data = response.data;
console.log(data);
} else {
console.log(`Request failed with status code: ${response.status}`);
console.log(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
This React script uses the Axios library to send a POST request to a specified URL with a JSON payload. It handles the response, logging success or failure messages along with the response data.
import axios from 'axios';
const url = "http://100061.pythonanywhere.com/basket/";
const payload = {
selectedBasket: "state",
baskets: ["country", "state"],
insertedId: "657af3b13751ba556c902578",
};
try {
const response = await axios.post(url, payload);
if (response.status === 201) {
console.log("Resource created successfully");
// Optionally, you can also print or process the response data
const data = response.data;
console.log(data);
} else {
console.error(`Request failed with status code: ${response.status}`);
console.error(response.data);
}
} catch (error) {
console.error(`Request failed with an exception: ${error.message}`);
}
This React script utilizes the Axios library to send a POST request to a specified URL with a JSON payload, handling the response accordingly.
import React, { useEffect } from 'react';
import axios from 'axios';
const MyComponent = () => {
const url = "http://100061.pythonanywhere.com/savepermutations/";
useEffect(() => {
const payload = {
inserted_id: "657af3b13751ba556c902578",
selectedPermutation: ["country", "state", "city"],
};
axios.post(url, payload)
.then(response => {
console.log("Resource created successfully");
console.log(response.data);
})
.catch(error => {
console.error(`Request failed with status code: ${error.response.status}`);
console.error(error.response.data);
});
}, []);
return (
// Your React component content here
);
};
export default MyComponent;
err
This React component uses the axios library to make a POST request to a specified URL with a JSON payload. It logs the response data on success and error details on failure.
import React, { useEffect } from 'react';
import axios from 'axios';
const MyComponent = () => {
const url = "http://100061.pythonanywhere.com/savepermutations/";
useEffect(() => {
const payload = {
inserted_id: "657af40f27ba2526f702d39f",
selectedPermutation: [
"Agra",
"Mumbai"
]
};
axios.post(url, payload)
.then(response => {
console.log("Resource created successfully");
console.log(response.data);
})
.catch(error => {
console.error(`Request failed with status code: ${error.response.status}`);
console.error(error.response.data);
});
}, []);
return (
// Your React component content here
);
};
export default MyComponent;
err
This Flutter script uses the http package to send a POST request with a JSON payload to a specified URL and prints the response.
import 'dart:convert';
import 'package:http/http.dart' as http;
void main() async {
final url = "http://100061.pythonanywhere.com/allbaskets/";
final payload = {
"country": [
{"item": "India", "itemLink": "Asia"},
{"item": "USA", "itemLink": "North America"},
{"item": "Germany", "itemLink": "Europe"},
],
"state": [
{"item": "Uttar Pradesh", "itemLink": "India"},
{"item": "Maharashtra", "itemLink": "India"},
{"item": "Georgia", "itemLink": "USA"},
{"item": "Nevada", "itemLink": "USA"},
{"item": "Bavaria", "itemLink": "Germany"},
{"item": "Brandenburg", "itemLink": "Germany"},
],
"city": [
{"item": "Agra", "itemLink": "Uttar Pradesh"},
{"item": "Noida", "itemLink": "Uttar Pradesh"},
{"item": "Pune", "itemLink": "Maharashtra"},
{"item": "Mumbai", "itemLink": "Maharashtra"},
{"item": "Atlanta", "itemLink": "Georgia"},
{"item": "Carson City", "itemLink": "Nevada"},
{"item": "Munich", "itemLink": "Bavaria"},
{"item": "Potsdam", "itemLink": "Brandenburg"},
],
};
try {
final response = await http.post(
Uri.parse(url),
headers: {'Content-Type': 'application/json'},
body: jsonEncode(payload),
);
if (response.statusCode == 201) {
print("Resource created successfully");
// Optionally, you can also print or process the response data
final data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (error) {
print("Request failed with an exception: $error");
}
}
In Flutter (Dart), this script utilizes the http package to perform a POST request to a specified URL with a JSON payload. It then handles the response based on the status code.
import 'package:http/http.dart' as http;
import 'dart:convert';
void main() async {
var url = "http://100061.pythonanywhere.com/type/";
var payload = {
"numberOfLevels": 3,
"classificationType": "N",
"dbInsertedId": "657af39974f3ec7b903c6ff5",
};
try {
var response = await http.post(
Uri.parse(url),
body: jsonEncode(payload),
headers: {"Content-Type": "application/json"},
);
if (response.statusCode == 201) {
print("Resource created successfully");
// Optionally, you can also print or process the response data
var data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (e) {
print("Request failed with an exception: $e");
}
}
This Flutter script uses the http package to send a POST request to a specified URL with a JSON payload. It handles the response, printing success or failure messages along with the response data.
import 'dart:convert';
import 'package:http/http.dart' as http;
void main() async {
var url = Uri.parse("http://100061.pythonanywhere.com/basket/");
var payload = {
"selectedBasket": "state",
"baskets": ["country", "state"],
"insertedId": "657af3b13751ba556c902578",
};
try {
var response = await http.post(
url,
body: jsonEncode(payload),
headers: {"Content-Type": "application/json"},
);
if (response.statusCode == 201) {
print("Resource created successfully");
// Optionally, you can also print or process the response data
var data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (e) {
print("Request failed with an exception: $e");
}
}
This Flutter script uses the http package to send a POST request to a specified URL with a JSON payload, handling the response accordingly.
import 'dart:convert';
import 'package:http/http.dart' as http;
void main() async {
var url = Uri.parse("http://100061.pythonanywhere.com/savepermutations/");
var payload = {
"inserted_id": "657af3b13751ba556c902578",
"selectedPermutation": ["state", "city"],
};
try {
var response = await http.post(
url,
headers: {"Content-Type": "application/json"},
body: jsonEncode(payload),
);
if (response.statusCode == 201) {
print("Resource created successfully");
var data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (e) {
print("Request failed with an exception: $e");
}
}
This Flutter script uses the http package to send a POST request to a specified URL with a JSON payload and handles the response.
import 'package:http/http.dart' as http;
import 'dart:convert';
void main() async {
var url = Uri.parse("http://100061.pythonanywhere.com/type/");
var payload = {
"numberOfLevels": 3,
"classificationType": "T",
"dbInsertedId": "649c0b9dda081daa9f9543fa",
};
try {
var response = await http.post(url, body: jsonEncode(payload));
if (response.statusCode == 201) {
print("Resource created successfully");
// Optionally, you can also print or process the response data
var data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (error) {
print("Request failed with an exception: $error");
}
}
err
This Dart script, suitable for Flutter, performs a POST request to a specified URL using the http package. It logs the response data on success and error details on failure.
import 'package:http/http.dart' as http;
import 'dart:convert';
void main() async {
final url = Uri.parse("http://100061.pythonanywhere.com/savepermutations/");
final payload = {
"inserted_id": "657af40f27ba2526f702d39f",
"selectedPermutation": ["India", "Germany"],
};
final response = await http.post(
url,
headers: {"Content-Type": "application/json"},
body: json.encode(payload),
);
if (response.statusCode == 201) {
print("Resource created successfully");
print(json.decode(response.body));
} else {
print("Request failed with status code: ${response.statusCode}");
print(json.decode(response.body));
}
}
err
This Flutter script uses the http package to send a POST request with a JSON payload to a specified URL and prints the response.
import 'dart:convert';
import 'package:http/http.dart' as http;
void main() async {
final url = "http://100061.pythonanywhere.com/allbaskets/";
final payload = {
"country": [
{"item": "India", "itemLink": "Asia"},
{"item": "USA", "itemLink": "North America"},
{"item": "Germany", "itemLink": "Europe"},
],
"state": [
{"item": "Uttar Pradesh", "itemLink": "India"},
{"item": "Maharashtra", "itemLink": "India"},
{"item": "Georgia", "itemLink": "USA"},
{"item": "Nevada", "itemLink": "USA"},
{"item": "Bavaria", "itemLink": "Germany"},
{"item": "Brandenburg", "itemLink": "Germany"},
],
"city": [
{"item": "Agra", "itemLink": "Uttar Pradesh"},
{"item": "Noida", "itemLink": "Uttar Pradesh"},
{"item": "Pune", "itemLink": "Maharashtra"},
{"item": "Mumbai", "itemLink": "Maharashtra"},
{"item": "Atlanta", "itemLink": "Georgia"},
{"item": "Carson City", "itemLink": "Nevada"},
{"item": "Munich", "itemLink": "Bavaria"},
{"item": "Potsdam", "itemLink": "Brandenburg"},
],
};
try {
final response = await http.post(
Uri.parse(url),
headers: {'Content-Type': 'application/json'},
body: jsonEncode(payload),
);
if (response.statusCode == 201) {
print("Resource created successfully");
// Optionally, you can also print or process the response data
final data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (error) {
print("Request failed with an exception: $error");
}
}
In Flutter (Dart), this script utilizes the http package to perform a POST request to a specified URL with a JSON payload. It then handles the response based on the status code.
import 'package:http/http.dart' as http;
import 'dart:convert';
void main() async {
var url = "http://100061.pythonanywhere.com/type/";
var payload = {
"numberOfLevels": 3,
"classificationType": "N",
"dbInsertedId": "657af39974f3ec7b903c6ff5",
};
try {
var response = await http.post(
Uri.parse(url),
body: jsonEncode(payload),
headers: {"Content-Type": "application/json"},
);
if (response.statusCode == 201) {
print("Resource created successfully");
// Optionally, you can also print or process the response data
var data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (e) {
print("Request failed with an exception: $e");
}
}
This Flutter script uses the http package to send a POST request to a specified URL with a JSON payload. It handles the response, printing success or failure messages along with the response data.
import 'dart:convert';
import 'package:http/http.dart' as http;
void main() async {
var url = Uri.parse("http://100061.pythonanywhere.com/basket/");
var payload = {
"selectedBasket": "state",
"baskets": ["country", "state"],
"insertedId": "657af3b13751ba556c902578",
};
try {
var response = await http.post(
url,
body: jsonEncode(payload),
headers: {"Content-Type": "application/json"},
);
if (response.statusCode == 201) {
print("Resource created successfully");
// Optionally, you can also print or process the response data
var data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (e) {
print("Request failed with an exception: $e");
}
}
This Flutter script uses the http package to send a POST request to a specified URL with a JSON payload, handling the response accordingly.
import 'package:http/http.dart' as http;
import 'dart:convert';
void main() async {
final url = Uri.parse("http://100061.pythonanywhere.com/savepermutations/");
final payload = {
"inserted_id": "657af3b13751ba556c902578",
"selectedPermutation": ["country", "state", "city"],
};
final response = await http.post(
url,
headers: {"Content-Type": "application/json"},
body: json.encode(payload),
);
if (response.statusCode == 201) {
print("Resource created successfully");
print(json.decode(response.body));
} else {
print("Request failed with status code: ${response.statusCode}");
print(json.decode(response.body));
}
}
err
This Dart script, suitable for Flutter, performs a POST request to a specified URL using the http package. It logs the response data on success and error details on failure.
import 'package:http/http.dart' as http;
import 'dart:convert';
void main() async {
final url = Uri.parse("http://100061.pythonanywhere.com/savepermutations/");
final payload = {
"inserted_id": "657af40f27ba2526f702d39f",
"selectedPermutation": [
"Agra",
"Mumbai"
]
};
final response = await http.post(
url,
headers: {"Content-Type": "application/json"},
body: json.encode(payload),
);
if (response.statusCode == 201) {
print("Resource created successfully");
print(json.decode(response.body));
} else {
print("Request failed with status code: ${response.statusCode}");
print(json.decode(response.body));
}
}
err
Set up the API name, unique ID and the base url(below). It’s a prerequisite to have WP-GET API plugin installed in your wordpress website.
Step 1: Establish the API endpoint ALL Baskets and configure the request body to contain the required POST fields.
Step 2: Test the endpoint All Basket to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Call Classification Type and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Call Classification Type to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Basket Selection and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Basket Selection to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Save Permutation and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Save Permutation to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Classification Type and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Classification Type to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Item Selection and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Item Selection to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Save Permutation and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Save Permutation to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Calling Classification Function and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Calling Classification Function to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Set up the API name, unique ID and the base url(below). It’s a prerequisite to have WP-GET API plugin installed in your wordpress website.
Step 1: Establish the API endpoint ALL Baskets and configure the request body to contain the required POST fields.
Step 2: Test the endpoint All Basket to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Classification Type and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Classification Type to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Basket Selection and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Basket Selection to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Save Permutation and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Save Permutation to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Item Selection and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Item Selection to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Save Permutation and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Save Permutation to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Calling Classification Function and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Calling Classification Function to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
D’Well Research validates and explores each stage of open innovation using user experience research from the field to support user-centered product design of medium and large companies globally.