View educational contents. Requires educational-contents.read permission.
Query parameters
| Name |
Type |
Required |
Description |
search |
string |
no |
Search by title |
active |
boolean |
no |
Filter by active status |
isFeatured |
boolean |
no |
Filter by featured status |
status |
string |
no |
Filter by status (draft/confirmed) One of: draft, confirmed. |
fields[] |
string[] |
no |
Select which fields to include in the response. When omitted, all fields are returned. When provided, only the specified fields are included. (e.g., ?fields[]=id&fields[]=title) One of: active, body, canonicalId, completionStrategy, confirmedAt, coverImagePath, createdAt, id, intervalDays, isCurrent, isFeatured, status, title, updatedAt, version, video. |
with[] |
string[] |
no |
Include related resources in the response. Pass multiple values as separate query parameters (e.g., ?with[]=createdBy&with[]=updatedBy). One of: confirmedBy, createdBy, safetyRequirements, updatedBy. |
orderBy |
string |
no |
Field to order by One of: id, title, active, status, version, createdAt, updatedAt. |
order |
string |
no |
Specifies in what direction the results should be ordered (ASC/DESC) One of: asc, desc. |
count |
integer |
no |
Specifies the number of results to show per page of paginated results (1-500) |
Responses
| Status |
Description |
| 200 |
A paginated response of educational contents |
Response 200 body
data object[] · required
links object · required
meta object · required
{
"data": [
{
"id": "019222d4-1d93-7d47-a3c4-b547e009a0f7",
"active": true,
"body": "Rich text content describing safety procedures...",
"canonicalId": "019222d4-1d93-7d47-a3c4-b547e009a0f7",
"completionStrategy": "every_time",
"confirmedAt": "string",
"confirmedBy": {
"id": "019222d9-d87d-7724-bba6-ba91503ea311",
"firstName": "John",
"lastName": "Doe"
},
"coverImagePath": "/storage/covers/image.jpg",
"createdAt": "2024-06-30T19:00:00Z",
"createdBy": {
"id": "019222d9-d87d-7724-bba6-ba91503ea311",
"firstName": "John",
"lastName": "Doe"
},
"intervalDays": 30,
"isCurrent": true,
"isFeatured": false,
"safetyRequirements": [
{
"id": "string",
"name": "string"
}
],
"status": "draft",
"title": "Introduction to Workplace Safety",
"updatedAt": "2024-06-30T19:00:00Z",
"updatedBy": {
"id": "019222d9-d87d-7724-bba6-ba91503ea311",
"firstName": "John",
"lastName": "Doe"
},
"version": 1,
"video": {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"provider": "youtube",
"minimumWatchPercentage": 90
}
}
],
"links": {
"first": "https://api.safesites.app/sites?page=1",
"last": "https://api.safesites.app/sites?page=10",
"prev": null,
"next": "https://api.safesites.app/sites?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 10,
"links": [
{
"url": "https://api.safesites.app/sites?page=2",
"label": "Next",
"active": true
}
],
"path": "https://api.safesites.app/sites",
"per_page": 100,
"to": 100,
"total": 1000,
"userId": "01930a9b-7b61-79a5-9ba2-78f0b4b2c196",
"requestId": "01930a9b-8d1f-766f-945c-ef6408134dbc"
}
}