Delete multiple pages
| Method | Description |
|---|---|
| course.pageDeleteBatch | Delete multiple learning pages in one call. |
Deletes up to 50 learning pages in a single call, all from the same course - every entry's {CourseId} must be identical, or the whole call is rejected before anything is deleted. Each entry in pages is shaped exactly like a single course.pageDelete request (just {PageId} and {CourseId}).
Partial success: every entry is deleted independently - one missing or invalid entry does not block the others. The response lists a per-entry result in the same order (and of the same length) as the request's pages array. Useful for clearing all existing pages before re-generating a full replacement set: list page ids first with course.pageList, then delete them all in one call.
Request parameters
{
"pages": [
{
"id": {PageId},
"course_id": {CourseId}
},
...
]
}
Response parameters
{
"results": [
// example entry for a page that was deleted successfully
{
"index": {ResultIndex},
"completed": true
},
// example entry for a page that could not be deleted
{
"index": {ResultIndex},
"completed": false,
"error": "{ResultError}"
}
// ... one entry per requested page, in the same order as the request's "pages" array ...
],
"deleted_count": {DeletedCount},
"failed_count": {FailedCount}
}
Parameters meaning
| Variable | Type | Appearance | Description |
|---|---|---|---|
| pages | Array | Mandatory | One entry per page to delete. Must be non-empty and contain no more than 50 entries, or the whole call is rejected before any page is deleted. |
| {PageId} | Integer | Mandatory | Page id. |
| {CourseId} | Integer | Mandatory | Course id. |
| response | |||
| results | Array | Mandatory | One entry per requested page, in the same order as the request's pages array. |
| {ResultIndex} | Integer | Mandatory | 0-based position of this entry within the request's pages array. |
| {Completed} | Boolean | Mandatory | Whether this specific page was deleted. When false, {ResultError} is present instead. |
| {ResultError} | String | Optional | Present only when {Completed} is false. The error for this specific entry - the same message course.pageDelete itself would have returned for this entry alone (e.g. the page or course was not found). |
| {DeletedCount} | Integer | Mandatory | Number of entries successfully deleted. |
| {FailedCount} | Integer | Mandatory | Number of entries that were not deleted. |
