OpenAPI Specification (1.0.0)
A RESTful API about dinosaurs built using Express, MongoDB and Mongoose.
Retrieve general information about the API or dinosaurs such as all clades, diets, locomotions, and names within the API.
Retrieve all dinosaurs
This endpoint retrieves all dinosaurs.
path Parameters
page
required
|
integer
<int32>
Page number for pagination |
Responses
Response samples
- 200
- 404
- 500
[
-
{
-
"id":
0,
-
"name":
"string",
-
"temporalRange":
"string",
-
"diet":
"string",
-
"locomotionType":
"string",
-
"description":
"string",
-
"classificationInfo":
"string",
-
"image":
"string",
-
"source":
"string"
}
]
Retrieve a dinosaur by ID
This endpoint retrieves a dinosaur by its ID.
path Parameters
id
required
|
integer
<int32>
ID of the dinosaur to retrieve |
Responses
Response samples
- 200
- 404
- 500
{
-
"id":
0,
-
"name":
"string",
-
"temporalRange":
"string",
-
"diet":
"string",
-
"locomotionType":
"string",
-
"description":
"string",
-
"classificationInfo":
"string",
-
"image":
"string",
-
"source":
"string"
}
Retrieve a dinosaur by name
This endpoint retrieves a dinosaur by its name.
path Parameters
name
required
|
string
Name of the dinosaur to retrieve |
Responses
Response samples
- 200
- 404
- 500
{
-
"id":
0,
-
"name":
"string",
-
"temporalRange":
"string",
-
"diet":
"string",
-
"locomotionType":
"string",
-
"description":
"string",
-
"classificationInfo":
"string",
-
"image":
"string",
-
"source":
"string"
}
Retrieve dinosaurs by diet
This endpoint retrieves dinosaurs by their diet.
path Parameters
diet
required
|
string
Diet of the dinosaurs to retrieve |
Responses
Response samples
- 200
- 404
- 500
{
-
"count":
0,
-
"data":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"temporalRange":
"string",
-
"diet":
"string",
-
"locomotionType":
"string",
-
"description":
"string",
-
"classificationInfo":
"string",
-
"image":
"string",
-
"source":
"string"
}
]
}
Retrieve dinosaurs by locomotion type
This endpoint retrieves dinosaurs by their locomotion type.
path Parameters
locomotion
required
|
string
Locomotion type of the dinosaurs to retrieve |
Responses
Response samples
- 200
- 404
- 500
{
-
"count":
0,
-
"data":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"temporalRange":
"string",
-
"diet":
"string",
-
"locomotionType":
"string",
-
"description":
"string",
-
"classificationInfo":
"string",
-
"image":
"string",
-
"source":
"string"
}
]
}
Retrieve a random number of dinosaurs
This endpoint retrieves a random number of dinosaurs.
path Parameters
count
required
|
integer
<int32>
Number of dinosaurs to retrieve |
Responses
Response samples
- 200
- 500
{
-
"count":
0,
-
"data":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"temporalRange":
"string",
-
"diet":
"string",
-
"locomotionType":
"string",
-
"description":
"string",
-
"classificationInfo":
"string",
-
"image":
"string",
-
"source":
"string"
}
]
}
Retrieve dinosaurs by query
This endpoint retrieves dinosaurs by a query.
query Parameters
clade |
Array of strings
Clade of the dinosaurs to retrieve |
diet |
string
Diet of the dinosaurs to retrieve |
locomotion |
string
Locomotion type of the dinosaurs to retrieve |
Responses
Response samples
- 200
- 404
- 500
{
-
"count":
0,
-
"data":
[
-
{
-
"id":
0,
-
"name":
"string",
-
"temporalRange":
"string",
-
"diet":
"string",
-
"locomotionType":
"string",
-
"description":
"string",
-
"classificationInfo":
"string",
-
"image":
"string",
-
"source":
"string"
}
]
}
Retrieve all dinosaur images
This endpoint retrieves all dinosaur images.
path Parameters
page
required
|
integer
<int32>
Page number for pagination |
Responses
Response samples
- 200
[
-
{
-
"title":
"string",
-
"description":
"string",
-
"author":
"string",
-
"authorURL":
"string",
-
"imageURL":
"string",
-
"license":
"string",
-
"licenseURL":
"string",
-
"dateCreated":
"string",
-
"dateAccessed":
"string"
}
]
Retrieve a dinosaur image by ID
This endpoint retrieves a dinosaur image by its ID.
path Parameters
id
required
|
integer
<int32>
ID of the dinosaur image to retrieve |
Responses
Response samples
- 200
- 404
- 500
{
-
"title":
"string",
-
"description":
"string",
-
"author":
"string",
-
"authorURL":
"string",
-
"imageURL":
"string",
-
"license":
"string",
-
"licenseURL":
"string",
-
"dateCreated":
"string",
-
"dateAccessed":
"string"
}
Retrieve a random number of dinosaur images
This endpoint retrieves a random number of dinosaur images.
path Parameters
count
required
|
integer
<int32>
Number of dinosaur images to retrieve |
Responses
Response samples
- 200
- 500
{
-
"count":
0,
-
"data":
[
-
{
-
"title":
"string",
-
"description":
"string",
-
"author":
"string",
-
"authorURL":
"string",
-
"imageURL":
"string",
-
"license":
"string",
-
"licenseURL":
"string",
-
"dateCreated":
"string",
-
"dateAccessed":
"string"
}
]
}