Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/giangartun/Tis-GOAT-Frontend/llms.txt

Use this file to discover all available pages before exploring further.

All admin endpoints require a Bearer token belonging to a user with tipo_usuario === 'admin'. Regular user tokens will receive HTTP 403 Forbidden. Keep admin credentials secure and never expose them in client-side code or public repositories.
All endpoints on this page are restricted to admin users. Requests made with a standard user token will be rejected with 403. Additionally, the backup restore endpoint is destructive — it overwrites existing data and cannot be undone.

TypeScript interfaces

The following interfaces describe the objects returned by the user management and audit log endpoints. They are reproduced here directly from the source for reference.
export interface UsuarioAdmin {
  id_usuario: string;
  nombre: string;
  email: string;
  foto: string | null;
  rol: string;
  estado: 'activo' | 'suspendido';
  fecha_registro: string;
  fecha_ult_acceso: string;
}

export interface BitacoraItem {
  id_registro: string;
  id_usuario: string;
  nombre: string;
  email: string;
  foto: string | null;
  rol: string;
  estado_actual: string;
  tipo_accion: string;
  contexto: Record<string, any> | null;
  fecha_accion: string;
}

User Management

List users

GET /api/admin/usuarios
Authorization: Bearer <token>
Returns a paginated list of all registered users with aggregate counts by status. Query parameters
Filter by name or email. Performs a partial, case-insensitive match.
estado
string
Filter by account status. Accepted values: activo, suspendido, todos (default).
page
number
Page number for pagination. Defaults to 1.
per_page
number
Number of results per page. Defaults to the server-configured value.
Example curl
curl "https://api.goatportfolio.com/api/admin/usuarios?estado=activo&page=1&per_page=20" \
  -H "Authorization: Bearer <admin-token>"
Success response — 200 OK
total_usuarios
number
Total number of registered users across all pages and statuses.
total_activos
number
Number of users with estado === 'activo'.
total_suspendidos
number
Number of users with estado === 'suspendido'.
current_page
number
The current page number.
last_page
number
The last available page number.
total
number
Total results matching the current filter.
data_usuarios
UsuarioAdmin[]
Array of user objects for the current page. See the UsuarioAdmin interface.
{
  "total_usuarios": 142,
  "total_activos": 138,
  "total_suspendidos": 4,
  "current_page": 1,
  "last_page": 8,
  "total": 138,
  "data_usuarios": [
    {
      "id_usuario": "7",
      "nombre": "Jane Doe",
      "email": "jane@example.com",
      "foto": "https://cdn.goatportfolio.com/fotos/jane.jpg",
      "rol": "usuario",
      "estado": "activo",
      "fecha_registro": "2024-01-15T08:00:00.000000Z",
      "fecha_ult_acceso": "2024-06-10T17:32:00.000000Z"
    }
  ]
}

Suspend a user

POST /api/admin/usuarios/:id/suspender
Authorization: Bearer <token>
Suspends the specified user account, preventing them from logging in.
id
string
required
The id_usuario of the account to suspend.
Success response — 200 OK
message
string
Confirmation message.
{ "message": "Usuario suspendido correctamente." }

Reactivate a user

POST /api/admin/usuarios/:id/reactivar
Authorization: Bearer <token>
Reactivates a previously suspended user account.
id
string
required
The id_usuario of the account to reactivate.
Success response — 200 OK
message
string
Confirmation message.
{ "message": "Usuario reactivado correctamente." }

Audit Log

List audit log entries

GET /api/admin/bitacora
Authorization: Bearer <token>
Returns a paginated audit log of all recorded actions in the system. Query parameters
tipo
string
Filter by action type. Accepted values:
ValueDescription
todosAll action types (default)
suspenderAccount suspension events
reactivarAccount reactivation events
modificacionesProfile or data modification events
creacionNew resource creation events
loginLogin events
logoutLogout events
fecha_desde
string
Filter entries on or after this date. ISO date format YYYY-MM-DD.
fecha_hasta
string
Filter entries on or before this date. ISO date format YYYY-MM-DD.
id_usuario
string
Filter entries attributed to a specific user ID.
page
number
Page number for pagination. Defaults to 1.
Example curl
curl "https://api.goatportfolio.com/api/admin/bitacora?tipo=login&fecha_desde=2024-06-01&fecha_hasta=2024-06-30" \
  -H "Authorization: Bearer <admin-token>"
Success response — 200 OK
total
number
Total entries matching the current filter.
current_page
number
The current page number.
last_page
number
The last available page number.
data
BitacoraItem[]
Array of audit log entries. See the BitacoraItem interface.The contexto field contains a free-form JSON object with additional metadata about the action (e.g. changed fields for modification events), or null if no extra context was recorded.
{
  "total": 310,
  "current_page": 1,
  "last_page": 16,
  "data": [
    {
      "id_registro": "88",
      "id_usuario": "7",
      "nombre": "Jane Doe",
      "email": "jane@example.com",
      "foto": null,
      "rol": "usuario",
      "estado_actual": "activo",
      "tipo_accion": "login",
      "contexto": null,
      "fecha_accion": "2024-06-10T17:32:00.000000Z"
    }
  ]
}

Technology Catalog

The technology catalog is the list of skills and tools that users can select when adding technical skills to their portfolio.

List technologies

GET /api/admin/tecnologias
Authorization: Bearer <token>
Success response — 200 OK
total
number
Total number of technologies in the catalog.
tecnologias
Tecnologia[]
Array of technology objects.
{
  "total": 87,
  "tecnologias": [
    { "id_tecnologia": "1", "nombre": "React", "categoria": "Desarrollo Web Frontend" },
    { "id_tecnologia": "2", "nombre": "Docker", "categoria": "DevOps / Infraestructura" }
  ]
}

Create a technology

POST /api/admin/tecnologias
Content-Type: application/json
Authorization: Bearer <token>
nombre
string
required
Technology name.
categoria
string
required
Category the technology belongs to.
Example request body
{ "nombre": "Astro", "categoria": "Desarrollo Web Frontend" }
Success response — 200 OK
message
string
Confirmation message.
tecnologia
object
The newly created technology object.
{
  "message": "Tecnología creada correctamente.",
  "tecnologia": { "id_tecnologia": "88", "nombre": "Astro", "categoria": "Desarrollo Web Frontend" }
}

Update a technology

PUT /api/admin/tecnologias/:id
Content-Type: application/json
Authorization: Bearer <token>
id
string
required
The id_tecnologia of the technology to update.
nombre
string
Updated technology name.
categoria
string
Updated category.
Success response — 200 OK
message
string
Confirmation message.
tecnologia
object
The updated technology object.

Delete a technology

DELETE /api/admin/tecnologias/:id
Authorization: Bearer <token>
id
string
required
The id_tecnologia to delete.
Success response — 200 OK
message
string
Confirmation message.
{ "message": "Tecnología eliminada correctamente." }

Grade Catalog

The grade catalog stores academic degree levels that users can reference in their profiles (e.g. “Licenciatura”, “Maestría”).

List grades

GET /api/admin/grados
Authorization: Bearer <token>
Success response — 200 OK
total
number
Total number of grade entries.
grados
Grado[]
Array of grade objects.
{
  "total": 5,
  "grados": [
    { "id_grado": "1", "nombre_grado": "Licenciatura" },
    { "id_grado": "2", "nombre_grado": "Maestría" },
    { "id_grado": "3", "nombre_grado": "Doctorado" }
  ]
}

Create a grade

POST /api/admin/grados
Content-Type: application/json
Authorization: Bearer <token>
nombre_grado
string
required
Name of the academic grade level.
Example request body
{ "nombre_grado": "Especialidad" }
Success response — 200 OK
message
string
Confirmation message.
grado
object
The newly created grade object.
{
  "message": "Grado creado correctamente.",
  "grado": { "id_grado": "6", "nombre_grado": "Especialidad" }
}

Update a grade

PUT /api/admin/grados/:id
Content-Type: application/json
Authorization: Bearer <token>
id
string
required
The id_grado to update.
nombre_grado
string
required
Updated grade name.
Success response — 200 OK
message
string
Confirmation message.
grado
object
The updated grade object.

Delete a grade

DELETE /api/admin/grados/:id
Authorization: Bearer <token>
id
string
required
The id_grado to delete.
Success response — 200 OK
{ "message": "Grado eliminado correctamente." }

Announcements

Announcements appear on the platform homepage or dashboard. They support an optional image and redirect URL.

List announcements

GET /api/admin/anuncios
Authorization: Bearer <token>
Success response — 200 OK
total
number
Total number of announcements.
anuncios
Anuncio[]
Array of announcement objects.
{
  "total": 3,
  "anuncios": [
    {
      "id_anuncio": "1",
      "titulo": "Nueva funcionalidad: exportar PDF",
      "descripcion": "Ahora puedes exportar tu portafolio como PDF desde el menú de configuración.",
      "foto_url": "https://cdn.goatportfolio.com/anuncios/pdf-export.png",
      "url_redireccion": "https://goatportfolio.com/blog/exportar-pdf",
      "creado_en": "2024-05-20T10:00:00.000000Z"
    }
  ]
}

Create an announcement

POST /api/admin/anuncios
Content-Type: multipart/form-data
Authorization: Bearer <token>
titulo
string
required
Announcement title.
descripcion
string
Optional body text describing the announcement.
url_redireccion
string
required
The URL users are directed to when they click the announcement.
foto
file
Optional image file to display alongside the announcement.
Example curl
curl -X POST https://api.goatportfolio.com/api/admin/anuncios \
  -H "Authorization: Bearer <admin-token>" \
  -F "titulo=Nueva funcionalidad: exportar PDF" \
  -F "descripcion=Ahora puedes exportar tu portafolio como PDF." \
  -F "url_redireccion=https://goatportfolio.com/blog/exportar-pdf" \
  -F "foto=@/path/to/banner.png"
Success response — 200 OK
message
string
Confirmation message.
anuncio
object
The newly created announcement object.
{
  "message": "Anuncio creado correctamente.",
  "anuncio": {
    "id_anuncio": "4",
    "titulo": "Nueva funcionalidad: exportar PDF",
    "descripcion": "Ahora puedes exportar tu portafolio como PDF.",
    "foto_url": "https://cdn.goatportfolio.com/anuncios/banner.png",
    "url_redireccion": "https://goatportfolio.com/blog/exportar-pdf",
    "creado_en": "2024-06-12T09:00:00.000000Z"
  }
}

Update an announcement

POST /api/admin/anuncios/:id
Content-Type: multipart/form-data
Authorization: Bearer <token>
This endpoint uses POST rather than PUT or PATCH because it accepts multipart/form-data for optional image replacement.
id
string
required
The id_anuncio to update.
titulo
string
Updated title.
descripcion
string
Updated description.
url_redireccion
string
Updated redirect URL.
foto
file
Replacement image file.
Success response — 200 OK
message
string
Confirmation message.
anuncio
object
The updated announcement object.

Delete an announcement

DELETE /api/admin/anuncios/:id
Authorization: Bearer <token>
id
string
required
The id_anuncio to delete.
Success response — 200 OK
{ "message": "Anuncio eliminado correctamente." }

Backup

Download a backup

GET /api/admin/backup
Authorization: Bearer <token>
Generates and downloads a full JSON snapshot of the platform’s data. The response is a binary blob with Content-Type: application/json. The client should save the file as backup_YYYY-MM-DD.json where the date is the current date at download time. Example curl
curl https://api.goatportfolio.com/api/admin/backup \
  -H "Authorization: Bearer <admin-token>" \
  -o "backup_$(date +%F).json"
Success response — 200 OK Response body is a raw JSON blob — not a JSON envelope. The file contains a complete snapshot of platform data suitable for import via the restore endpoint.

Restore from backup

POST /api/admin/backup/importar
Content-Type: multipart/form-data
Authorization: Bearer <token>
Restoring a backup overwrites existing platform data. This operation is irreversible. Take a fresh backup of the current state before importing an older snapshot. Only proceed if you fully understand the consequences.
archivo
file
required
The backup JSON file to import. Must be a file previously generated by GET /api/admin/backup.
Example curl
curl -X POST https://api.goatportfolio.com/api/admin/backup/importar \
  -H "Authorization: Bearer <admin-token>" \
  -F "archivo=@backup_2024-06-01.json"
Success response — 200 OK
message
string
Confirmation message indicating the restore completed.
importado_en
string
ISO 8601 timestamp of when the import was processed.
{
  "message": "Backup importado correctamente.",
  "importado_en": "2024-06-12T11:45:00.000000Z"
}

Build docs developers (and LLMs) love