Skip to main content

List Header Links

Retrieve a paginated list of header links on a course, lowest order first. The list is the unpublished links, or the live links when nothing is unpublished, and it has no preview_url. See Header Links.

Request​

GET /players/{id}/header-links

Path Parameters​

ParameterTypeRequiredDescription
idstringYesCourse UUID. See Identifiers.

Query Parameters​

ParameterTypeDefaultDescription
pageinteger1Page number. A missing, non-numeric, zero, or negative value is treated as 1 and does not return an error. A page past the end returns an empty data array and 200.
per_pageinteger25Items per page (min: 1, max: 100). Anything else is 422.

Example Request​

curl -X GET "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/header-links?page=1&per_page=25" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"

Response​

Success Response (200)​

{
"data": [
{
"id": "4b8e1c70-5d29-4a16-8f33-0c7a2e9d4b51",
"name": "Syllabus",
"link_url": "https://mysite.com/syllabus",
"type": "link",
"side": "left",
"order": 0
},
{
"id": "6d2f9a84-1e47-4c05-b918-3a5c7e0d2f64",
"name": "Community",
"link_url": "https://mysite.com/community",
"type": "button",
"side": "right",
"order": 1
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"per_page": 25,
"total": 2
}
}

Response Fields​

Each entry in data has the fields described in Header Link Object.

include=header_links on Get Course returns this same ordered collection in one array, without pagination.

Pagination Object​

See Pagination Object. total is the number of header links on the course.

Error Responses​

Not Found Error (404)​

See Identifiers.

{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
}
}

Validation Error (422 Unprocessable Entity)​

{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"per_page": ["per_page must not be greater than 100"]
}
}
}

Authentication, permission, and rate-limit errors are described in Authorization.