Fumadocs

Events

Special events hosted by the Museum

Demo Only
GET
/special-events

List special events

Return a list of upcoming special events at the museum.

Authorization

Authorization
Required
Basic <token>

In: header

Query Parameters

startDatestring

The starting date to retrieve future operating hours from. Defaults to today's date.

Example: "2023-02-23"Format: "date"

endDatestring

The end of a date range to retrieve special events for. Defaults to 7 days after startDate.

Example: "2023-04-18"Format: "date"

pageinteger

The page number to retrieve.

Example: 2Default: 1

limitinteger

The number of days per page.

Example: 15Default: 10Maximum: 30
Status codeDescription
200Success
400Bad request
404Not found
/special-events

curl -X GET "https://redocly.com/_mock/docs/openapi/museum-api/special-events?startDate=2023-02-23&endDate=2023-04-18&page=2&limit=15"

A list of upcoming special events

[
  {
    "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
    "name": "Pirate Coding Workshop",
    "location": "Computer Room",
    "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
    "dates": [
      "2023-10-29"
    ],
    "price": 25
  }
]

POST
/special-events

Create special events

Creates a new special event for the museum.

Authorization

Authorization
Required
Basic <token>

In: header

Request Body

name
Required
string

Name of the special event

Example: "Pirate Coding Workshop"

location
Required
string

Location where the special event is held

Example: "Computer Room"

eventDescription
Required
string

Description of the special event

Example: "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang)."

dates
Required
array<string>

List of planned dates for the special event

price
Required
number

Price of a ticket for the special event

Example: 25Format: "float"

metaobject

Status codeDescription
200Success
400Bad request
404Not found
/special-events

curl -X POST "https://redocly.com/_mock/docs/openapi/museum-api/special-events" \
  -d '{
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29"
  ],
  "price": 25,
  "meta": {}
}'

Information about a special event.

{
  "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29"
  ],
  "price": 25
}

GET
/special-events/{eventId}

Get special event

Get details about a special event.

Authorization

Authorization
Required
Basic <token>

In: header

Path Parameters

eventId
Required
string

An identifier for a special event.

Example: "dad4bce8-f5cb-4078-a211-995864315e39"Format: "uuid"
Status codeDescription
200Success
400Bad request
404Not found
/special-events/{eventId}

curl -X GET "https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39"

Information about a special event.

{
  "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29"
  ],
  "price": 25
}

PATCH
/special-events/{eventId}

Update special event

Update the details of a special event

Authorization

Authorization
Required
Basic <token>

In: header

Request Body

namestring

Name of the special event

Example: "Pirate Coding Workshop"

locationstring

Location where the special event is held

Example: "Computer Room"

eventDescriptionstring

Description of the special event

Example: "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang)."

datesarray<string>

List of planned dates for the special event

pricenumber

Price of a ticket for the special event

Example: 25Format: "float"

Path Parameters

eventId
Required
string

An identifier for a special event.

Example: "dad4bce8-f5cb-4078-a211-995864315e39"Format: "uuid"
Status codeDescription
200Success
400Bad request
404Not found
/special-events/{eventId}

curl -X PATCH "https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39" \
  -d '{
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29"
  ],
  "price": 25
}'

Information about a special event.

{
  "eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
  "name": "Pirate Coding Workshop",
  "location": "Computer Room",
  "eventDescription": "Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).",
  "dates": [
    "2023-10-29"
  ],
  "price": 25
}

DELETE
/special-events/{eventId}

Delete special event

Delete a special event from the collection. Allows museum to cancel planned events.

Authorization

Authorization
Required
Basic <token>

In: header

Path Parameters

eventId
Required
string

An identifier for a special event.

Example: "dad4bce8-f5cb-4078-a211-995864315e39"Format: "uuid"
Status codeDescription
204Success - no content
400Bad request
401Unauthorized
404Not found
/special-events/{eventId}

curl -X DELETE "https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39"

Last updated on