Welcome to the MyCirrus API Quickstart Guide! This guide will walk you through some set up steps and making your first API requests.
- Make sure you have a MyCirrus account.
- Ensure your instruments are powered on and connected to MyCirrus.
- Ensure that your subscription is active and the instruments have valid subscription plans.
- Visit the API Keys Page.
- Create a new API key if you don't have one already.
- Select the appropriate permissions and instruments for your API key.
Your API key is required to authenticate all API requests.
Let's start by making a simple request to the API to fetch the list of instruments.
Use the following curl command to fetch the list of instruments:
curl -i -X GET \
https://api.mycirrus.cloud/v1/control/instruments \
-H 'X-Api-Key: YOUR_API_KEY_HERE'[
{
"type": "Noise",
"serialNumber": "QT123456",
"model": "CR:900",
"name": "My Quantum",
... other instrument details ...
},
{
"type": "Noise",
"serialNumber": "QT654321",
"model": "CR:920",
"name": "Outdoor Quantum",
... other instrument details ...
}
]This response shows the list of instruments associated with your account.
Next, let's load some noise measurements from your instrument.
Use the following curl command to fetch the noise measurements:
curl -i -X GET \
'https://api.mycirrus.cloud/v1/data/noise/measurements?instruments=QT123456&start=2023-01-01T00%3A00%3A00Z&end=2023-01-02T00%3A00%3A00Z' \
-H 'X-Api-Key: YOUR_API_KEY_HERE'instruments: The instruments you want to fetch measurements for.start: The start date and time for the measurements.end: The end date and time for the measurements.
[
{
"startTime": "2023-01-01T00:00:00Z",
"endTime": "2023-01-01T01:00:00Z",
"duration": 3600,
"instrument": "QT123456",
"overload": false,
"values": [
{
"name": "LAeq",
"value": 50.73
},
{
"name": "LCPeak",
"value": 81.93
},
{
"name": "LAFMax",
"value": 75.94
}
]
},
... more measurements ...
]This response contains the noise measurements for the specified instrument and time range.
You can customise the results by adding additional query parameters for settings the period and choosing the values you want to retrieve.
You’ve completed the Quickstart Guide and made your first API requests! You can now explore more features of the MyCirrus API.
For more information, refer to the API Reference and be sure to check out the other Guides and Examples. Happy coding!