Bulk Update Completion Criteria
Bulk-creates or updates completion criteria for one or more courses in a single request
Bulk-creates or updates completion criteria for one or more courses in a single request.
POST
https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk/updateExample request
curl -X POST "https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk/update" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"criteria": []
}'Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
criteria | UpdateCourseCompletionCriteria[] | Yes | body | Array of completion criteria objects to create or update, each scoped to a specific course. |
Example response
{
"data": {
"APIBulkUpdateCompletionCriteria": {
"createdCount": 0,
"updatedCount": 0,
"errors": [
{
"courseId": "00000000-0000-0000-0000-000000000000",
"type": "coursePercentViewed",
"error": "string",
"record": "string"
}
],
"warnings": [
"string"
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
createdCount | integer | Number of completion criteria records created during this operation. |
updatedCount | integer | Number of completion criteria records updated during this operation. |
errors | BulkCompletionCriteriaError[] | Array of errors encountered while processing individual criteria records. |
errors.courseId | uuid | ID of the course associated with the failed criteria record. |
errors.type | CourseCompletionCriteriaType | Completion criteria type that failed to be created or updated (e.g., coursePercentViewed). |
errors.error | string | Human-readable message describing why the criteria record failed. |
errors.record | string | Serialized representation of the criteria record that caused the error. |
warnings | string[] | Non-fatal warnings generated during the bulk update, such as skipped or deprecated fields. |