Group Courses

Schema #

The schema defines all the fields that exist within a group course record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.

id
integer

Unique identifier for the object.

Read only

Context: view, edit, embed

course_ids
array

The Course IDs

Context: view, edit

List Group Courses #

Query this endpoint to retrieve a collection of group courses. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /ldlms/v1/groups/<id>/courses

Example Request #

$ curl https://example.com/wp-json/ldlms/v1/groups/<id>/courses

Arguments #

id

Group ID to enroll into.

Required: 1

context

Scope under which the request is made; determines fields present in response.

Default: view

One of: view, embed, edit

fields

Returned values.

Default: ids

One of: ids, objects

exclude

Ensure result set excludes specific IDs.

include

Limit result set to specific IDs.

offset

Offset the result set by a specific number of items.

order

Order sort attribute ascending or descending.

Default: asc

One of: asc, desc

orderby

Sort collection by object attribute.

Default: title

One of: author, date, id, include, modified, parent, relevance, slug, include_slugs, title, menu_order

per_page

Maximum number of items to be returned in result set.

Default: 10

page

Current page of the collection.

Default: 1

search

Limit results to those matching a string.

Update a Group Course #

Arguments #

id

Group ID to enroll into.

Required: 1

course_ids

Course IDs to enroll into Group.

Required: 1

Definition #

POST /ldlms/v1/groups/<id>/courses

Example Request #

$ curl -X POST https://example.com/wp-json/ldlms/v1/groups/<id>/courses -d '{"course_ids":[ 1,2 ]}'

Delete a Group Course #

Arguments #

id

Group ID to enroll into.

Required: 1

course_ids

Course IDs to remove from Group.

Required: 1

Definition #

DELETE /ldlms/v1/groups/<id>/courses

Example Request #

$ curl -X DELETE https://example.com/wp-json/ldlms/v1/groups/<id>/courses