Get All Announcements (Admin)
Announcements
Get All Announcements (Admin)
Retrieve all announcements including inactive and draft announcements (Admin only)
GET
Get All Announcements (Admin)
Overview
This admin-only endpoint retrieves all announcements in the system, including both active (published) and inactive (draft) announcements. This is useful for managing the announcement lifecycle.Authentication
Requires JWT authentication token with Admin or Super Admin role.Authorization
Admin Access Required
Only users with Admin or Super Admin roles can access this endpoint. Regular employees can only see active announcements via the public endpoint.
Response
Returns an array of all announcement objects.Array of announcement objects
Unique announcement identifier
Announcement title
Announcement content/body
Publication date (YYYY-MM-DD HH:mm:ss)
Whether the announcement is active/published (true) or draft/hidden (false)
URL to associated media file (image, document, etc.)
Creation timestamp
Last update timestamp
Error Responses
Internal server error
Code Examples
cURL
JavaScript
Python
Example Response
Use Cases
Content Management
View all announcements (active and drafts) to manage the content lifecycle
Draft Review
Review unpublished announcements before making them active
Archive Management
Access inactive announcements for historical records or reactivation
Bulk Operations
Retrieve all announcements for bulk update or deletion operations
Related Endpoints
- GET /api/comunicados - Get only active announcements (public endpoint for all authenticated users)
- GET /api/comunicados/:id - Get specific announcement by ID
- POST /api/comunicados/admin - Create new announcement
- PUT /api/comunicados/admin/:id - Update announcement
- DELETE /api/comunicados/admin/:id - Delete announcement