API Skill Assessment Docs (0.1.0)

Download OpenAPI specification:Download

Documentation for the requested API routes

Employees

Relating to employee records

GET all employees.

Retrieves all available employee records

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CREATE new employee record

Creates a new employee record

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
string

Employee name

email
string

Employee email

position
string

Employee job title

Responses

Request samples

Content type
application/json
{
  • "name": "John Doe",
  • "email": "john@email.com",
  • "position": "Sanitation Engineer"
}

Response samples

Content type
application/json
{
  • "message": "Successfully created new employee."
}

GET a single employee

Get an employee by unique post ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
number

ID of the employee

Responses

Response samples

Content type
application/json
{
  • "message": "Success!"
}

UPDATE an employee record

Update an employee record by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
number

ID of the employee

Request Body schema: application/json
required
name
string

Employee name

email
string

Employee email

position
string

Employee job title

Responses

Request samples

Content type
application/json
{
  • "name": "John Doe",
  • "email": "john@email.com",
  • "position": "Sanitation Engineer"
}

Response samples

Content type
application/json
{
  • "message": "Success!"
}

DELETE an employee record

Delete an employee record by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
number

ID of the employee

Responses

Weather

OpenWeather API

Retrieve current weather conditions for a specific city

Retrieve current weather conditions for a specific city

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
city
string

Name of city

Responses

Request samples

Content type
application/json
{
  • "city": "Grand Rapids"
}

Response samples

Content type
application/json
{
  • "current": 34,
  • "humidity": 80,
  • "description": "Clouds, with a high of 36℉ and a low of 33℉. Humidity at 80% with winds around 8mph"
}

Stripe

Stripe integration

Retrieve recent charges

Retrieve recent charges, can request amount of days (default 30)

Authorizations:
ApiKeyAuth
query Parameters
numDays
integer
Example: numDays=30

Number of days to retrieve charges for (default is 30).

Responses

Response samples

Content type
application/json
{
  • "totalCharges": 1,
  • "totalAmount": 12.34,
  • "listOfCharges": [
    ]
}