Tutorial 2 - Local C# setup for API requesting
This tutorial will show you how easy it is to set up a local environment for Cryos API testing using Visual Studio (Code editor)
The process and steps used in this tutorial using C# can also be used for the other programming languages.
First head over to the desired APIs api details page, press the green try it button as if you should send a new request. Scroll down untill you see "HTTP Request". As standard, it is set to HTTP, but you can choose other options like C# from the drop down menu like shown below.


This will give you the entire source code calling the API in this case it is for the Donor API.
Note that if you haven't entered any parameters before making the request for the source code - it will request all data. You can put in parameter values if you want to. This is handy if you already know what filtering option you are looking for.
In order to just create a quick test app for testing request of data you can from the code editor in visual studios terminal type dotnet new console -o app
which will create a simple base C# program for you. Go ahead and do that and delete the console.writeline("hello world")
Copy the generated code, and remember to replace the dots under Client.DefaultRequestHeaders with the actual subscription key.
In order to actually see the response in the terminal from in visual studio I have made some changes, now the MakeRequest
returns a Task
instead of being void
, allowing you to use await
in Main
. Also, MakeRequest
now uses StreamReader
to read the content of the response stream and prints it to the console.
The output
The output from above should give something like what you see in the below result, which indicates you have requested donor data.

We know that your EMR system operates in you own defined way, which we at Cryos knows nothing about. This turtorial is merely for testing purposes, since the integration from the API's into your system is a lot different.
Again if you experience any issues with the data format, then we are happy to help, but we cannot help in regards to how you integrate the APIs into your systems.