Java API Exercise - Core Criteria (0.2.3)

Download OpenAPI specification:Download

Core API for the Requests and Responses Exercise

students

Create a new student

Add a new student to the list

Request Body schema: application/json
firstName
required
string
lastName
required
string

Responses

Request samples

Content type
application/json
{
  • "firstName": "Nathan",
  • "lastName": "King"
}

Response samples

Content type
application/json
{
  • "firstName": "Nathan",
  • "lastName": "King"
}

Get all students

Get all students from the list

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a student

Get a single student by their first name

path Parameters
firstName
required
string

First name of the student

Responses

Response samples

Content type
application/json
{
  • "firstName": "Nathan",
  • "lastName": "King"
}

Update a student

Update a student's details using the firstName provided. Just update the first student found in the list with the provided first name.

path Parameters
firstName
required
string

The first name of the student to update

Request Body schema: application/json
firstName
required
string
lastName
required
string

Responses

Request samples

Content type
application/json
{
  • "firstName": "Nathan",
  • "lastName": "King"
}

Response samples

Content type
application/json
{
  • "firstName": "Nathan",
  • "lastName": "King"
}

Delete a student

Remove a student from the list and send that student back to the client

path Parameters
firstName
required
string

The first name of the student to update

Responses

Response samples

Content type
application/json
{
  • "firstName": "Nathan",
  • "lastName": "King"
}

languages

Create a language

Add a new language to the list

Request Body schema: application/json
name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "Java"
}

Response samples

Content type
application/json
{
  • "name": "Java"
}

Get all languages

Get all languages from the list

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a language

Get a single language by name

path Parameters
name
required
string

Name of language

Responses

Response samples

Content type
application/json
{
  • "name": "Java"
}

Update a language

Update a language's name. Just update the first language found in the list with the provided name.

path Parameters
name
required
string

The name of the language to update

Request Body schema: application/json
name
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "Java"
}

Response samples

Content type
application/json
{
  • "name": "Java"
}

Delete a language

Remove a language from the list and send that language back to the client

path Parameters
name
required
string

The name of the language to update

Responses

Response samples

Content type
application/json
{
  • "name": "Java"
}