List reindeer assigned to santas sleigh
GEThttp://localhost:8080/reindeers
List reindeer assigned to santas sleigh
Responses
- 200
- 401
- 500
List of reindeer for santas sleigh.
- application/json
- Schema
- Example (auto)
- oneReindeer
- allReindeer
Schema
- Array [
- ]
Name of the reindeer.
Possible values: [Dasher
, Dancer
, Prancer
, Vixen
, Comet
, Cupid
, Donner
, Blitzen
, Rudolph
]
Dasher
Age of the reindeer in years.
Possible values: >= 0
and <= 100
5
Colour of the reindeer's nose.
Possible values: [red
, blue
, green
]
red
Additional notes about the reindeer.
Possible values: <= 100 characters
Rudolph has a shiny nose.
Unique identifier for the reindeer.
reindeer1
[
{
"name": "Dasher",
"age": 5,
"nose_colour": "red",
"notes": "Rudolph has a shiny nose.",
"id": "reindeer1"
}
]
Single reindeer response
[
{
"id": "reindeer1",
"name": "Rudolph",
"age": 6,
"nose_colour": "red",
"notes": "Rudolph has a shiny nose."
}
]
All reindeers response
[
{
"id": "reindeer1",
"name": "Rudolph",
"age": 6,
"nose_colour": "red",
"notes": "Rudolph has a shiny nose."
},
{
"id": "reindeer2",
"name": "Prancer",
"age": 10,
"nose_colour": "green"
},
{
"id": "reindeer3",
"name": "Dasher",
"age": 5,
"nose_colour": "red"
},
{
"id": "reindeer4",
"name": "Dancer",
"age": 7,
"nose_colour": "blue",
"notes": "Dancer is a graceful reindeer."
},
{
"id": "reindeer5",
"name": "Vixen",
"age": 8,
"nose_colour": "red"
},
{
"id": "reindeer6",
"name": "Comet",
"age": 9,
"nose_colour": "green"
},
{
"id": "reindeer7",
"name": "Cupid",
"age": 4,
"nose_colour": "red"
},
{
"id": "reindeer8",
"name": "Donner",
"age": 3,
"notes": "Donner is a strong reindeer.",
"nose_colour": "blue"
},
{
"id": "reindeer9",
"name": "Blitzen",
"age": 2,
"nose_colour": "green"
}
]
Unauthorized - API key is missing or invalid.
- application/json
- Schema
- Example (auto)
- missingApiKey
Schema
A message indicating authorization failure.
{
"error": "string"
}
Missing API Key
{
"error": "Unauthorized - API key is required."
}
Internal Server Error - something went wrong on the server side.
- application/json
- Schema
- Example (auto)
- serverErrorExample
Schema
General error message indicating a server issue.
Additional details about the error, if available.
{
"error": "string",
"message": "string"
}
Example response for a server error
{
"error": "Internal Server Error",
"message": "An unexpected error occurred. Please try again later."
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8080/reindeers");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());