This example is a simple client application that uses C# to access the main API (REST). It will find all the available instruments, display the status of the first instrument, and then show all the measurements for today.
- Clone the code from this repository.
- Or download the ZIP file and extract it.
- Navigate to the
Examples/CSharp_Basicfolder.
git clone https://github.com/CirrusResearch/MyCirrus.git
git checkout master
cd Examples/CSharp_Basic- Edit the
Program.csfile and replace<YOUR_API_KEY>with your API key.
You can create an API key in the MyCirrus website. For more details see the Authentication guide.
const string Key = "<YOUR_API_KEY>"; // Your API key- Run
dotnet runto build and run the example
EXAMPLE_OUTPUTThis example showed how to connect to the MyCirrus API using C#. It demonstrated how to make authenticated requests to the API, retrieve information about available instruments, and access measurement data.
You can modify the example to suit your needs, such as changing which instruments you query or how you process the retrieved data. For more information on the available API endpoints and data formats, refer to the API Reference section.