The Respirer Quartz Bulk Raw Data API is a specialized tool designed for the seamless collection and uploading of environmental sensor data. This API facilitates the transmission of multiple sensor readings in a single request, promoting efficiency and reducing the need for repeated individual submissions.
The primary purpose of this API is to enable users, particularly developers and technical teams in the environmental monitoring and IoT sectors, to upload data from various environmental sensors. This includes but is not limited to:
The API allows for:
The Respirer Quartz Bulk Raw Data API is accessed through a specific endpoint designed for data submission. To upload your sensor readings, use the following HTTP method and URL:
HTTP Method: POST
Endpoint URL: http://api.domainname.in/quartz/bulk_rawdataWhen making a request to this endpoint, users can expect a structured response that will inform them about the success or failure of their data submissions. The API is designed to accept an array of JSON objects in the request body, with each object containing various fields related to environmental sensor metrics
To successfully interact with the Respirer Quartz Bulk Raw Data API, it is essential to format the requests correctly as JSON objects. The API requires an array of JSON objects to be sent in the request body, where each object corresponds to an individual sensor reading. Below are the specific considerations for constructing these requests.
The request body must adhere to the following JSON array structure:
[
{
"imei": "device_identifier",
"timestr2": "DD/MM/YYYYTHH:MM:SS",
"pm1cnc": "value",
...
}
]
Each JSON object must contain certain required fields:
While the API allows for numerous optional fields that provide additional data on environmental conditions, submitting as much data as available is encouraged for comprehensive monitoring. The optional fields include:
Providing well-structured and comprehensive JSON objects will enhance the effectiveness and efficiency of data uploads, maximizing the utility of the API in environmental monitoring applications.
To ensure proper functioning of the Respirer Quartz Bulk Raw Data API, specific headers are required in the API requests. The primary header to include is:
When submitting sensor readings to the Respirer Quartz Bulk Raw Data API, it is crucial that the request body is accurately constructed. The requested data must be formatted as an array of JSON objects, with each representing an individual sensor reading. Below is a detailed breakdown of the required and optional fields that should be included in the request body.
The following fields must be present in each JSON object:
Field | Type | Description | Required |
---|---|---|---|
imei | String | Unique device identifier | Yes |
timestr2 | String | Timestamp in the format "DD/MM/YYYYTHH:MM:SS" | Yes |
The API allows the inclusion of several optional fields that can enhance the richness of the environmental data being submitted. These include:
Field | Type | Description | Required |
---|---|---|---|
pm1cnc | String | PM1 concentration (μg/m³) | No |
pm2.5cnc | String | PM2.5 concentration (μg/m³) | No |
pm10cnc | String/null | PM10 concentration (μg/m³) | No |
pm0.3cnt | String | Particle count for 0.3μm particles | No |
pm0.5cnt | String | Particle count for 0.5μm particles | No |
pm1cnt | String | Particle count for 1μm particles | No |
pm2.5cnt | String | Particle count for 2.5μm particles | No |
pm5cnt | String | Particle count for 5μm particles | No |
pm10cnt | String | Particle count for 10μm particles | No |
pm25conc | String | Alternative PM2.5 concentration reading | No |
pm25raw | String | Raw PM2.5 sensor reading | No |
temp | String | Temperature in Celsius | No |
humidity | String | Relative humidity percentage | No |
pres | String | Atmospheric pressure in hPa | No |
altd | String | Altitude in meters | No |
power_avl | String | Power availability flag (1=available, 0=unavailable) | No |
solar_avl | String | Solar power availability flag (1=available, 0=unavailable) | No |
pms_status | String | Status of the particulate matter sensor | No |
lat | String | Latitude in decimal degrees | No |
lon | String | Longitude in decimal degrees | No |
battery | String | Battery level percentage | No |
By adhering to these guidelines, users can maximize the effectiveness of their data submissions to the Respirer Quartz Bulk Raw Data API, contributing to more robust environmental monitoring.
To demonstrate the proper use of the Respirer Quartz Bulk Raw Data API, below is a detailed example of a valid request body, complete with commentary on its key elements.
[
{
"imei": "simulator",
"timestr2": "11/11/2025T16:12:00",
"pm1cnc": "95",
"pm2.5cnc": "121",
"pm10cnc": null,
"pm0.3cnt": "0",
"pm0.5cnt": "658",
"pm1cnt": "763",
"pm2.5cnt": "767",
"temp": "28.2",
"humidity": "38.9",
"pres": "947",
"altd": "1841",
"power_avl": "1",
"solar_avl": "0",
"lat": "23.98569",
"lon": "74.63634",
"battery": "97.50"
},
{
"imei": "simulator",
"timestr2": "11/11/2025T16:13:00",
"pm1cnc": "90",
"pm2.5cnc": "115",
"pm10cnc": null,
"pm0.3cnt": "1",
"pm0.5cnt": "600",
"pm1cnt": "710",
"pm2.5cnt": "750",
"temp": "28.3",
"humidity": "39.2",
"pres": "948",
"altd": "1840",
"power_avl": "1",
"solar_avl": "0",
"lat": "23.98569",
"lon": "74.63634",
"battery": "96.50"
}
]
This structured request clearly illustrates not just correct syntax but also how to incorporate a mix of required and optional fields, optimizing data collection and environmental monitoring capabilities
When interacting with the Respirer Quartz Bulk Raw Data API, it's vital to understand the various HTTP status codes that can be returned in the API's responses. These codes provide insight into the outcome of your requests, indicating whether they were successful, partially successful, or failed. Here are the key response codes you may encounter:
Status Code | Description |
---|---|
200 | OK: All messages were sent successfully. |
207 | Multi-Status: Some messages failed to send. |
400 | Bad Request: The request was malformed (e.g., input is not a list). |
500 | Internal Server Error: Server-side issue encountered. |
{
"message": "Bulk ingestion successful",
"messages_processed": 3
}
{
"message": "Bulk ingestion partially successful",
"messages_processed": 2,
"failed_messages": 1,
"errors": [
"Message 2 failed: KafkaError ..."
]
}
{
"error": "Expected a list of JSON objects"
}
{
"error": "Internal Server Error: <error message>"
}
Understanding these response codes will help you quickly diagnose issues that may arise during the data submission process while working with the Respirer Quartz Bulk Raw Data API.
The Respirer Quartz Bulk Raw Data API provides various response codes to indicate the success or failure of bulk data submissions. Below are detailed examples of potential responses for each status code, featuring sample JSON payloads.
When the API processes all messages successfully, it will return a response indicating the successful ingestion of data:
{
"message": "Bulk ingestion successful",
"messages_processed": 3
}
This response confirms that all three sensor readings sent were processed without any issues.
In cases where some messages are processed, while others fail, the API will respond with a multi-status indication. For example:
{
"message": "Bulk ingestion partially successful",
"messages_processed": 2,
"failed_messages": 1,
"errors": [
"Message 2 failed: KafkaError ..."
]
}
This response informs users that two readings were successfully ingested while one encountered an error, allowing for targeted troubleshooting.
If the request format is incorrect, the API will respond with a 400 status code. An example could be:
{
"error": "Expected a list of JSON objects"
}
This alerts users to the formatting issue that needs rectification.
If a server-side issue occurs, the API returns a 500 status code, as shown here:
{
"error": "Internal Server Error: <error message>"
}
This response indicates an unexpected problem within the server, requiring further investigation for resolution.
These response examples guide users in understanding the outcome of their API interactions and help troubleshoot issues effectively.
When utilizing the Respirer Quartz Bulk Raw Data API, there are several important considerations to keep in mind for efficient and effective use
By observing these practices, users can maximize the utility of the Respirer Quartz Bulk Raw Data API for their environmental monitoring initiatives
The Respirer Quartz Bulk Raw Data API can handle up to 2,000 records per request. Exceeding this may lead to errors or failed submissions
For detailed guidance, please contact Respirer Living Sciences Pvt. Ltd. directly based on your project and usage needs.