Fullstack Convention Center (1.1.0)

Welcome to the Fullstack Convention Center! Here, you can practice making requests to a RESTful API and handling the responses.

API Usage

The URL to access a resource in the API is structured as follows:

  • The base URL is https://fsa-crud-2aa9294fe819.herokuapp.com/api.
  • The next segment is your cohort code. e.g. /2109-CPU-RM-WEB-PT
  • The last segment is based on the resource you want to access. e.g. /recipes

For example, the URL for all recipes for the 2109 cohort would be:

https://fsa-crud-2aa9294fe819.herokuapp.com/api/2109-CPU-RM-WEB-PT/recipes

Response Schema

If a request is successful, the response will be structured as follows:

{
  "success": true,
  "data": /* whatever you requested */
}

If an error occurs, the response will be structured as follows:

{
  "success": false,
  "error": {
    "name": "ErrorName",
    "message": "This is an error message."
  }
}

Recipes

Manage the recipes used in the convention center kitchen.

Get all recipes

Responses

Response Schema: application/json
Array
id
number

ID of the recipe

name
string

Recipe name

imageUrl
string

Recipe's image URL

description
string

Recipe description

Response samples

Content type
application/json
[]

Create a new recipe

Request Body schema: application/json
required
name
required
string

Recipe name

imageUrl
required
string

Recipe's image URL

description
required
string

Recipe description

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Get a single recipe

path Parameters
id
required
number
Example: 1

ID of the recipe

Responses

Response Schema: application/json
id
number

ID of the recipe

name
string

Recipe name

imageUrl
string

Recipe's image URL

description
string

Recipe description

Response samples

Content type
application/json
{}

Update an existing recipe

path Parameters
id
required
number
Example: 1

ID of the recipe

Request Body schema: application/json
name
string

Recipe name

imageUrl
string

Recipe's image URL

description
string

Recipe description

Responses

Response Schema: application/json
id
number

ID of the recipe

name
string

Recipe name

imageUrl
string

Recipe's image URL

description
string

Recipe description

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Delete a recipe

path Parameters
id
required
number
Example: 1

ID of the recipe

Responses

Artists

The convention center often invites a variety of artists to perform. The main gallery showcases a permanent collection, and several rotating exhibits can be found throughout the building.

Get all artists

Responses

Response Schema: application/json
Array
id
number

ID of the artist

name
string

Artist name

imageUrl
string

Artist's image URL

description
string

Artist description

Response samples

Content type
application/json
[]

Invite a new artist

Request Body schema: application/json
required
name
required
string

Artist name

imageUrl
required
string

Artist's image URL

description
required
string

Artist description

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Get a single artist

path Parameters
id
required
number
Example: 1

ID of the artist

Responses

Response Schema: application/json
id
number

ID of the artist

name
string

Artist name

imageUrl
string

Artist's image URL

description
string

Artist description

Response samples

Content type
application/json
{}

Update an existing artist

path Parameters
id
required
number
Example: 1

ID of the artist

Request Body schema: application/json
name
string

Artist name

imageUrl
string

Artist's image URL

description
string

Artist description

Responses

Response Schema: application/json
id
number

ID of the artist

name
string

Artist name

imageUrl
string

Artist's image URL

description
string

Artist description

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Remove an artist

path Parameters
id
required
number
Example: 1

ID of the artist

Responses

Events

The convention center hosts a variety of events, from small meetings to large galas. Check here for the latest information on past and upcoming events.

Get all events

Responses

Response Schema: application/json
Array
id
integer

ID of the event

name
string

Event name

description
string

Event description

date
ISO date string

When the event is happening

location
string

Where the event is happening

Response samples

Content type
application/json
[
  • {
    }
]

Create a new event

Request Body schema: application/json
required
name
required
string

Event name

description
required
string

Event description

date
required
ISO date string

When the event is happening

location
required
string

Where the event is happening

Responses

Request samples

Content type
application/json
{
  • "name": "Fullstack Gala",
  • "description": "A night of celebration and networking",
  • "date": "2021-09-15T00:00:00.000Z",
  • "location": "Main Ballroom"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Fullstack Gala",
  • "description": "A night of celebration and networking",
  • "date": "2021-09-15T00:00:00.000Z",
  • "location": "Main Ballroom"
}

Get a single event

path Parameters
id
required
integer

ID of the event

Responses

Response Schema: application/json
id
integer

ID of the event

name
string

Event name

description
string

Event description

date
ISO date string

When the event is happening

location
string

Where the event is happening

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Fullstack Gala",
  • "description": "A night of celebration and networking",
  • "date": "2021-09-15T00:00:00.000Z",
  • "location": "Main Ballroom"
}

Update an event

path Parameters
id
required
integer

ID of the event

Request Body schema: application/json
required
name
string

Event name

description
string

Event description

date
ISO date string

When the event is happening

location
string

Where the event is happening

Responses

Response Schema: application/json
id
integer

ID of the event

name
string

Event name

description
string

Event description

date
ISO date string

When the event is happening

location
string

Where the event is happening

Request samples

Content type
application/json
{
  • "name": "Fullstack Gala",
  • "description": "A night of celebration and networking",
  • "date": "2021-09-15T00:00:00.000Z",
  • "location": "Main Ballroom"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Fullstack Gala",
  • "description": "A night of celebration and networking",
  • "date": "2021-09-15T00:00:00.000Z",
  • "location": "Main Ballroom"
}

Delete an event

path Parameters
id
required
integer

ID of the event

Responses

Guests

Information about guests who have visited the convention center.

Get all guests

Responses

Response Schema: application/json
Array
id
integer

ID of the guest

name
string

Guest name

email
string

Guest email

phone
string

Guest phone number

bio
string

A short biography

job
string

Guest job title

Response samples

Content type
application/json
[
  • {
    }
]

Invite a new guest

Request Body schema: application/json
required
name
required
string

Guest name

email
required
string

Guest email

phone
required
string

Guest phone number

bio
required
string

A short biography

job
required
string

Guest job title

Responses

Request samples

Content type
application/json
{
  • "name": "Penny Nickel",
  • "email": "penny@quarter.com",
  • "phone": "123-456-7890",
  • "bio": "oatmeal advocate",
  • "job": "Global Accounts Engineer"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Penny Nickel",
  • "email": "penny@quarter.com",
  • "phone": "123-456-7890",
  • "bio": "oatmeal advocate",
  • "job": "Global Accounts Engineer"
}

Get a single guest

path Parameters
id
required
integer

ID of the guest

Responses

Response Schema: application/json
id
integer

ID of the guest

name
string

Guest name

email
string

Guest email

phone
string

Guest phone number

bio
string

A short biography

job
string

Guest job title

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Penny Nickel",
  • "email": "penny@quarter.com",
  • "phone": "123-456-7890",
  • "bio": "oatmeal advocate",
  • "job": "Global Accounts Engineer"
}

Update a guest

path Parameters
id
required
integer

ID of the guest

Request Body schema: application/json
required
name
string

Guest name

email
string

Guest email

phone
string

Guest phone number

bio
string

A short biography

job
string

Guest job title

Responses

Response Schema: application/json
id
integer

ID of the guest

name
string

Guest name

email
string

Guest email

phone
string

Guest phone number

bio
string

A short biography

job
string

Guest job title

Request samples

Content type
application/json
{
  • "name": "Penny Nickel",
  • "email": "penny@quarter.com",
  • "phone": "123-456-7890",
  • "bio": "oatmeal advocate",
  • "job": "Global Accounts Engineer"
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "name": "Penny Nickel",
  • "email": "penny@quarter.com",
  • "phone": "123-456-7890",
  • "bio": "oatmeal advocate",
  • "job": "Global Accounts Engineer"
}

Remove a guest

path Parameters
id
required
integer

ID of the guest

Responses

RSVPs

RSVPs for events at the convention center.

Get all RSVPs

Responses

Response Schema: application/json
Array
id
integer

ID of the RSVP

guestId
integer

ID of the guest who is attending the event

eventId
integer

ID of the event that the guest is attending

Response samples

Content type
application/json
[
  • {
    }
]

RSVP to an event

Request Body schema: application/json
required
guestId
required
integer

ID of the guest who is attending the event

eventId
required
integer

ID of the event that the guest is attending

Responses

Request samples

Content type
application/json
{
  • "guestId": 1,
  • "eventId": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "guestId": 1,
  • "eventId": 1
}

Get a single RSVP

path Parameters
id
required
integer

ID of the RSVP

Responses

Response Schema: application/json
id
integer

ID of the RSVP

guestId
integer

ID of the guest who is attending the event

eventId
integer

ID of the event that the guest is attending

Response samples

Content type
application/json
{
  • "id": 1,
  • "guestId": 1,
  • "eventId": 1
}

Update an RSVP

path Parameters
id
required
integer

ID of the RSVP

Request Body schema: application/json
required
guestId
integer

ID of the guest who is attending the event

eventId
integer

ID of the event that the guest is attending

Responses

Response Schema: application/json
id
integer

ID of the RSVP

guestId
integer

ID of the guest who is attending the event

eventId
integer

ID of the event that the guest is attending

Request samples

Content type
application/json
{
  • "guestId": 1,
  • "eventId": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "guestId": 1,
  • "eventId": 1
}

Cancel an RSVP

path Parameters
id
required
integer

ID of the RSVP

Responses