Update reindeer details for a specific sleigh
PUThttp://localhost:8080/reindeers/:reindeerId
Update reindeer details for a specific sleigh
Request
Path Parameters
- application/json
Bodyrequired
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
Responses
- 200
- 401
- 404
- 500
Reindeer updated successfully.
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."
}
Not Found - reindeer with the specified ID does not exist.
- application/json
- Schema
- Example (auto)
- reindeerNotFound
Schema
A message indicating that the resource was not found.
{
"error": "string"
}
Reindeer not found
{
"error": "Reindeer with the specified ID was not found."
}
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.Put, "http://localhost:8080/reindeers/:reindeerId");
var content = new StringContent("{\n \"name\": \"Dasher\",\n \"age\": 5,\n \"nose_colour\": \"red\",\n \"notes\": \"Rudolph has a shiny nose.\",\n \"id\": \"reindeer1\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());