Skip to main content
GET
/
activities
Get Activities
curl --request GET \
  --url https://api.example.com/activities \
  --header 'Authorization: <authorization>'
{
  "activities": [
    {
      "id": 123,
      "name": "<string>",
      "place": "<string>",
      "horaInicio": "<string>",
      "horaFin": "<string>",
      "diaSemana": "<string>",
      "icon": "<string>",
      "idMonitor": 123,
      "monitor": "<string>",
      "proyectos": [
        {
          "id": 123,
          "nombre": "<string>"
        }
      ]
    }
  ],
  "statusCode": 123,
  "message": "<string>"
}
Retrieves all activities with their associated monitors and projects.

Authentication

Authorization
string
required
Bearer token for authentication
Required Roles: monitor, admin

Response

activities
array
required
Array of activity objects
id
number
Unique identifier for the activity
name
string
Name of the activity
place
string
Location where the activity takes place
horaInicio
string
Start time in HH:MM format
horaFin
string
End time in HH:MM format
diaSemana
string
Day of the week
icon
string
Icon identifier for the activity
idMonitor
number
ID of the assigned monitor
monitor
string
Name of the assigned monitor
proyectos
array
Array of associated projects
id
number
Project ID
nombre
string
Project name

Example Request

curl -X GET https://api.sociapp.com/activities \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "activities": [
    {
      "id": 1,
      "name": "Fútbol",
      "place": "Campo deportivo",
      "horaInicio": "16:00",
      "horaFin": "18:00",
      "diaSemana": "Lunes",
      "icon": "soccer",
      "idMonitor": 5,
      "monitor": "Juan Pérez",
      "proyectos": [
        {
          "id": 1,
          "nombre": "Deportes de equipo"
        }
      ]
    },
    {
      "id": 2,
      "name": "Pintura",
      "place": "Sala de arte",
      "horaInicio": "10:00",
      "horaFin": "12:00",
      "diaSemana": "Miércoles",
      "icon": "paint",
      "idMonitor": 8,
      "monitor": "María García",
      "proyectos": [
        {
          "id": 2,
          "nombre": "Arte y creatividad"
        },
        {
          "id": 3,
          "nombre": "Expresión artística"
        }
      ]
    }
  ]
}

Error Responses

statusCode
number
HTTP status code
message
string
Error message

401 Unauthorized

{
  "statusCode": 401,
  "message": "Unauthorized"
}

403 Forbidden

{
  "statusCode": 403,
  "message": "Forbidden resource"
}

500 Internal Server Error

{
  "statusCode": 500,
  "message": "Failed to fetch activities data"
}

Build docs developers (and LLMs) love