Skip to main content

OpenAPI Specification (1.0.0)

License: MIT

A RESTful API about dinosaurs built using Express, MongoDB and Mongoose.

general

Retrieve general information about the API or dinosaurs such as all clades, diets, locomotions, and names within the API.

Retrieve the main API endpoint

This endpoint returns the API version, available endpoints, rate limit, and a disclaimer.

Responses

Response samples

Content type
application/json
{
  • "apiVersion": "string",
  • "apiEndpoints": [
    ],
  • "rateLimit": "string",
  • "disclaimer": "string"
}

Retrieve all dinosaur clades

This endpoint retrieves all dinosaur clades.

Responses

Response samples

Content type
application/json
{
  • "uniqueClades": 0,
  • "data": [
    ]
}

Retrieve all dinosaur diets

This endpoint retrieves all dinosaur diets.

Responses

Response samples

Content type
application/json
{
  • "uniqueDiets": 0,
  • "data": [
    ]
}

Retrieve all dinosaur locomotions

This endpoint retrieves all dinosaur locomotions.

Responses

Response samples

Content type
application/json
{
  • "uniqueLocomotions": 0,
  • "data": [
    ]
}

Retrieve all dinosaur names

This endpoint retrieves all dinosaur names.

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

dinosaur

Retrieve dinosaur information.

Retrieve all dinosaurs

This endpoint retrieves all dinosaurs.

path Parameters
page
required
integer <int32>

Page number for pagination

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

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

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

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

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

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

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}

image

Retrieve dinosaur image information.

Retrieve all dinosaur images

This endpoint retrieves all dinosaur images.

path Parameters
page
required
integer <int32>

Page number for pagination

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "count": 0,
  • "data": [
    ]
}