Skip to main content
The Exhibits API exposes the Exhibicion resource, which represents a marine exhibit at Parque Marino del Pacífico Sur. Each exhibit is composed of a core record plus four nested sub-resources: images, facts, descriptions, and buttons.
GET endpoints for listing and retrieving exhibits are publicly accessible without authentication. POST, PUT, and DELETE operations require an authenticated admin session.

The Exhibicion object

id
integer
Unique identifier for the exhibit.
value
string
Internal machine-readable key for the exhibit (unique, max 30 characters). Used as a slug-style identifier.
label
string
Short display label for the exhibit (unique, max 30 characters). Used in navigation and tab components.
title
string
Full human-readable title of the exhibit (unique, max 30 characters). Rendered as a heading on the exhibit page.
images
string[]
Array of absolute URLs pointing to the exhibit’s images. Each URL resolves to a file under the exhibitions/ media path.
facts
string[]
Array of plain-text fact strings associated with the exhibit. Displayed as bullet points or info cards.
descriptions
string[]
Array of paragraph-length description strings. Rendered as body copy on the exhibit detail view.
buttons
object[]
Array of call-to-action button objects. Each button has a label (display text) and a link (target URL or route).

List exhibits

No query parameters are currently supported. Returns all exhibits.
GET /api/exhibiciones/
Returns all exhibits with their nested images, facts, descriptions, and buttons. Example response
[
  {
    "id": 1,
    "value": "tortugas-marinas",
    "label": "Tortugas Marinas",
    "title": "Tortugas Marinas",
    "images": [
      "https://api.example.com/media/exhibitions/tortuga_01.jpg",
      "https://api.example.com/media/exhibitions/tortuga_02.jpg"
    ],
    "facts": [
      "Las tortugas marinas llevan más de 100 millones de años en los océanos.",
      "Costa Rica es uno de los principales sitios de anidación del mundo."
    ],
    "descriptions": [
      "Nuestra exhibición de tortugas marinas alberga especímenes rescatados de la costa pacífica."
    ],
    "buttons": [
      { "label": "Conocer más", "link": "/exhibiciones/tortugas-marinas" }
    ]
  }
]

Create an exhibit

Requires admin authentication.
POST /api/exhibiciones/create/
value
string
required
Internal key for the exhibit. Must be unique and no longer than 30 characters.
label
string
required
Short display label. Must be unique and no longer than 30 characters.
title
string
required
Full exhibit title. Must be unique and no longer than 30 characters.
Example request body
{
  "value": "tiburones",
  "label": "Tiburones",
  "title": "Tiburones"
}
Example response201 Created
{
  "id": 2,
  "value": "tiburones",
  "label": "Tiburones",
  "title": "Tiburones",
  "images": [],
  "facts": [],
  "descriptions": [],
  "buttons": []
}

Retrieve an exhibit

GET /api/exhibiciones/{id}/
id
integer
required
The numeric ID of the exhibit to retrieve.

Update an exhibit

Requires admin authentication.
PUT /api/exhibiciones/{id}/update/
id
integer
required
The numeric ID of the exhibit to update.
value
string
Updated internal key.
label
string
Updated display label.
title
string
Updated title.

Delete an exhibit

Requires admin authentication. Deleting an exhibit cascades to all associated images, facts, descriptions, and buttons.
DELETE /api/exhibiciones/{id}/delete/
id
integer
required
The numeric ID of the exhibit to delete.
Returns 204 No Content on success.

Sub-resources

Each exhibit has four independently managed sub-resources. All sub-resource endpoints follow the same pattern.

Images — ExhibicionImage

MethodEndpointDescription
GET/api/exhibiciones/imagenes/List all exhibit images
POST/api/exhibiciones/imagenes/create/Upload a new image (admin)
GET/api/exhibiciones/imagenes/{id}/Retrieve a single image record
PUT/api/exhibiciones/imagenes/{id}/update/Replace an image (admin)
DELETE/api/exhibiciones/imagenes/{id}/delete/Remove an image (admin)
id
integer
Image record ID.
exhibicion
integer
Foreign key to the parent Exhibicion.
image
string
Relative media path. The parent serializer exposes absolute URLs.
created_at
datetime
ISO 8601 timestamp of upload.
updated_at
datetime
ISO 8601 timestamp of last update.

Facts — ExhibicionFacts

MethodEndpointDescription
GET/api/exhibiciones/facts/List all facts
POST/api/exhibiciones/facts/create/Add a fact (admin)
GET/api/exhibiciones/facts/{id}/Retrieve a single fact
DELETE/api/exhibiciones/facts/{id}/delete/Remove a fact (admin)
id
integer
Fact record ID.
exhibicion
integer
Foreign key to the parent Exhibicion.
fact
string
Plain-text fact content.

Descriptions — ExhibicionDescription

MethodEndpointDescription
GET/api/exhibiciones/description/List all descriptions
POST/api/exhibiciones/description/create/Add a description (admin)
GET/api/exhibiciones/description/{id}/Retrieve a description
PUT/api/exhibiciones/description/{id}/update/Update a description (admin)
DELETE/api/exhibiciones/description/{id}/delete/Remove a description (admin)
id
integer
Description record ID.
exhibicion
integer
Foreign key to the parent Exhibicion.
description
string
Paragraph-length description text.

Buttons — ExhibicionButtons

MethodEndpointDescription
GET/api/exhibiciones/buttons/List all buttons
POST/api/exhibiciones/buttons/create/Add a button (admin)
GET/api/exhibiciones/buttons/{id}/Retrieve a button
PUT/api/exhibiciones/buttons/{id}/update/Update a button (admin)
DELETE/api/exhibiciones/buttons/{id}/delete/Remove a button (admin)
id
integer
Button record ID.
exhibicion
integer
Foreign key to the parent Exhibicion.
label
string
Button display text (unique, max 255 characters).
Target URL or internal route. Defaults to an empty string.

Build docs developers (and LLMs) love