The Wisenet API root endpoint is the ‘homepage’ of the Wisenet API.
Ideally, from this API call, you should be able to reach all other API endpoints and all resources by simply following the hypertext links provided in each following response.
Supported Methods: GET
List all Endpoints
GET /
Returns the list of all accessible endpoints.
Sample request:
curl -X GET \ -H 'Accept: application/vnd.mywisenet.api.v1+xml' \ https://tst-api.wisenet.co/
Sample response:
<ApiRoot xmlns="http://api.mywisenet.com.au/v1/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Links> <Link> <Href>/</Href> <Rel>self</Rel> <Title>API Root</Title> </Link> <Link> <Href>/courseoffers</Href> <Rel>course-offers</Rel> <Title>All Course Offers</Title> </Link> <Link> <Href>/students</Href> <Rel>students</Rel> <Title>All Students</Title> </Link> <Link> <Href>/unitoffers</Href> <Rel>unit-offers</Rel> <Title>All Unit Offers</Title> </Link> </Links> </ApiRoot>
C# Code Sample
public static void GetCourseOffersSample() { var request = HttpWebRequest.Create("https://tst-api.wisenet.co/") as HttpWebRequest; request.Accept = "application/vnd.mywisenet.api.v1+xml"; request.Method = "GET"; request.UserAgent = "C# Sample Client"; try { // Get response using (var response = request.GetResponse() as HttpWebResponse) { // Get the response stream using (var responseReader = new StreamReader(response.GetResponseStream())) { string responseBody = responseReader.ReadToEnd(); // Console application output Console.WriteLine(responseBody); } } } catch (WebException ex) { Console.WriteLine("Error: {0}", ex.Message); } }