Skip to content
v1.2.1

Redocly Museum API

Imaginary, but delightful Museum API for interacting with museum services and information. Built with love by Redocly.

Contact

Servers

https://redocly.com/_mock/docs/openapi/museum-api

Operations

Operational information about the museum.


ID: getMuseumHours

Get museum hours

GET
/museum-hours

Get upcoming museum operating hours.

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Parameters

Query Parameters

startDate

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

Typestring
Example2023-02-23
formatdate
page

Page number to retrieve.

Typeinteger
Example2
default1
limit

Number of days per page.

Typeinteger
Example15
default10
maximum30

Responses

Success.
application/json
JSON
[
{
"date": "2023-10-29",
"timeOpen": "09:00",
"timeClose": "18:00"
}
]

Samples

Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/museum-hours?startDate=2023-02-23&page=2&limit=15
}

headers {
  Content-Type: application/json
}
Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/museum-hours?startDate=2023-02-23&page=2&limit=15
}

headers {
  Content-Type: application/json
}
cURL
curl -X GET \
'https://redocly.com/_mock/docs/openapi/museum-api/museum-hours?startDate=2023-02-23&page=2&limit=15' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/museum-hours?startDate=2023-02-23&page=2&limit=15', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/museum-hours';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'startDate' => '2023-02-23',
    'page' => '2',
    'limit' => '15',
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/museum-hours'
params = {
    'startDate': '2023-02-23',
    'page': 2,
    'limit': 15
}
headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, params=params, headers=headers)
print(response.json())

Events


ID: listSpecialEvents

List special events

GET
/special-events

Return a list of upcoming special events at the museum.

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Parameters

Query Parameters

startDate

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

Typestring
Example2023-02-23
formatdate
endDate

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

Typestring
Example2023-04-18
formatdate
page

Page number to retrieve.

Typeinteger
Example2
default1
limit

Number of days per page.

Typeinteger
Example15
default10
maximum30

Responses

Success.
application/json
JSON
[
{
"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
}
]

Samples

Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events?startDate=2023-02-23&endDate=2023-04-18&page=2&limit=15
}

headers {
  Content-Type: application/json
}
Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events?startDate=2023-02-23&endDate=2023-04-18&page=2&limit=15
}

headers {
  Content-Type: application/json
}
cURL
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' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/special-events?startDate=2023-02-23&endDate=2023-04-18&page=2&limit=15', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'startDate' => '2023-02-23',
    'endDate' => '2023-04-18',
    'page' => '2',
    'limit' => '15',
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events'
params = {
    'startDate': '2023-02-23',
    'endDate': '2023-04-18',
    'page': 2,
    'limit': 15
}
headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, params=params, headers=headers)
print(response.json())

ID: createSpecialEvent

Create special events

POST
/special-events

Creates a new special event for the museum.

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Request Body

JSON
{
"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
}

Responses

Created.
application/json
JSON
{
"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
}

Samples

Bruno
post {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events
}

headers {
  Content-Type: application/json
}
Bruno
post {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events
}

headers {
  Content-Type: application/json
}
cURL
curl -X POST \
'https://redocly.com/_mock/docs/openapi/museum-api/special-events' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/special-events', {method:'POST',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events';
$method = 'POST';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events'

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())

ID: getSpecialEvent

Get special event

GET
/special-events/{eventId}

Get details about a special event.

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Parameters

Path Parameters

eventId*

Identifier for a special event.

Typestring
Required
Exampledad4bce8-f5cb-4078-a211-995864315e39
formatuuid

Responses

Success.
application/json
JSON
{
"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
}

Samples

Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39
}

headers {
  Content-Type: application/json
}
Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39
}

headers {
  Content-Type: application/json
}
cURL
curl -X GET \
'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39'

headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)
print(response.json())

ID: deleteSpecialEvent

Delete special event

DELETE
/special-events/{eventId}

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

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Parameters

Path Parameters

eventId*

Identifier for a special event.

Typestring
Required
Exampledad4bce8-f5cb-4078-a211-995864315e39
formatuuid

Responses

Success - no content.

Samples

Bruno
delete {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39
}

headers {
  Content-Type: application/json
}
Bruno
delete {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39
}

headers {
  Content-Type: application/json
}
cURL
curl -X DELETE \
'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39', {method:'DELETE',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39';
$method = 'DELETE';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39'

headers = {
    'Content-Type': 'application/json'
}

response = requests.delete(url, headers=headers)
print(response.json())

ID: updateSpecialEvent

Update special event

PATCH
/special-events/{eventId}

Update the details of a special event.

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Parameters

Path Parameters

eventId*

Identifier for a special event.

Typestring
Required
Exampledad4bce8-f5cb-4078-a211-995864315e39
formatuuid

Request Body

JSON
{
"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
}

Responses

Success.
application/json
JSON
{
"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
}

Samples

Bruno
patch {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39
}

headers {
  Content-Type: application/json
}
Bruno
patch {
  url: https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39
}

headers {
  Content-Type: application/json
}
cURL
curl -X PATCH \
'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39', {method:'PATCH',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39';
$method = 'PATCH';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/special-events/dad4bce8-f5cb-4078-a211-995864315e39'

headers = {
    'Content-Type': 'application/json'
}

response = requests.patch(url, headers=headers)
print(response.json())

Tickets

Museum tickets for general entrance or special events.


ID: buyMuseumTickets

Buy museum tickets

POST
/tickets

Purchase museum tickets for general entry or special events.

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Request Body

JSON
{
"email": "museum-lover@example.com",
"ticketId": "a54a57ca-36f8-421b-a6b4-2e8f26858a4c",
"ticketDate": "2023-10-29",
"ticketType": "string",
"eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54"
}

Responses

Created.
application/json
JSON
{
"ticketId": "a54a57ca-36f8-421b-a6b4-2e8f26858a4c",
"ticketDate": "2023-10-29",
"ticketType": "string",
"eventId": "3be6453c-03eb-4357-ae5a-984a0e574a54",
"message": "Museum general entry ticket purchased",
"confirmationCode": "ticket-event-a98c8f-7eb12"
}

Samples

Bruno
post {
  url: https://redocly.com/_mock/docs/openapi/museum-api/tickets
}

headers {
  Content-Type: application/json
}
Bruno
post {
  url: https://redocly.com/_mock/docs/openapi/museum-api/tickets
}

headers {
  Content-Type: application/json
}
cURL
curl -X POST \
'https://redocly.com/_mock/docs/openapi/museum-api/tickets' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/tickets', {method:'POST',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/tickets';
$method = 'POST';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/tickets'

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())

ID: getTicketCode

Get ticket QR code

GET
/tickets/{ticketId}/qr

Return an image of your ticket with scannable QR code. Used for event entry.

Authorizations

MuseumPlaceholderAuth
TypeHTTP (basic)

Parameters

Path Parameters

ticketId*

Identifier for a ticket to a museum event. Used to generate ticket image.

Typestring
Required
Examplea54a57ca-36f8-421b-a6b4-2e8f26858a4c
formatuuid

Responses

Scannable event ticket in image format.
image/png
Schema
string

Samples

Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/tickets/a54a57ca-36f8-421b-a6b4-2e8f26858a4c/qr
}

headers {
  Content-Type: application/json
}
Bruno
get {
  url: https://redocly.com/_mock/docs/openapi/museum-api/tickets/a54a57ca-36f8-421b-a6b4-2e8f26858a4c/qr
}

headers {
  Content-Type: application/json
}
cURL
curl -X GET \
'https://redocly.com/_mock/docs/openapi/museum-api/tickets/a54a57ca-36f8-421b-a6b4-2e8f26858a4c/qr' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://redocly.com/_mock/docs/openapi/museum-api/tickets/a54a57ca-36f8-421b-a6b4-2e8f26858a4c/qr', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://redocly.com/_mock/docs/openapi/museum-api/tickets/a54a57ca-36f8-421b-a6b4-2e8f26858a4c/qr';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://redocly.com/_mock/docs/openapi/museum-api/tickets/a54a57ca-36f8-421b-a6b4-2e8f26858a4c/qr'

headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)
print(response.json())

Powered by VitePress OpenAPI