Course Steps

Schema #

The schema defines all the fields that exist within a course step 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

type
string

The course step type.

Context: view, edit

One of: all, h, l, t, r

Retrieve a Course Step #

Definition & Example Request #

GET /ldlms/v1/sfwd-courses/<id>/steps

Query this endpoint to retrieve a specific course step record.

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

Sample Response #

{
    "h": {
        "sfwd-lessons": {
            "667": {
                "sfwd-topic": {
                    "1490": {
                        "sfwd-quiz": []
                    },
                    "1493": {
                        "sfwd-quiz": []
                    },
                    "1496": {
                        "sfwd-quiz": []
                    },
                    "1499": {
                        "sfwd-quiz": []
                    },
                    "1501": {
                        "sfwd-quiz": []
                    },
                    "1503": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            },
            "668": {
                "sfwd-topic": {
                    "1505": {
                        "sfwd-quiz": []
                    },
                    "1507": {
                        "sfwd-quiz": []
                    },
                    "1516": {
                        "sfwd-quiz": []
                    },
                    "1518": {
                        "sfwd-quiz": []
                    },
                    "1519": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            },
            "669": {
                "sfwd-topic": {
                    "1245": {
                        "sfwd-quiz": []
                    },
                    "1299": {
                        "sfwd-quiz": []
                    },
                    "1308": {
                        "sfwd-quiz": []
                    },
                    "1309": {
                        "sfwd-quiz": []
                    },
                    "1310": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            },
            "670": {
                "sfwd-topic": {
                    "1314": {
                        "sfwd-quiz": []
                    },
                    "1315": {
                        "sfwd-quiz": []
                    },
                    "1316": {
                        "sfwd-quiz": []
                    },
                    "1317": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            },
            "671": {
                "sfwd-topic": {
                    "1365": {
                        "sfwd-quiz": []
                    },
                    "1368": {
                        "sfwd-quiz": []
                    },
                    "1369": {
                        "sfwd-quiz": []
                    },
                    "1370": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            },
            "672": {
                "sfwd-topic": {
                    "1371": {
                        "sfwd-quiz": []
                    },
                    "1372": {
                        "sfwd-quiz": []
                    },
                    "1373": {
                        "sfwd-quiz": []
                    },
                    "1374": {
                        "sfwd-quiz": []
                    },
                    "1375": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            },
            "673": {
                "sfwd-topic": {
                    "1382": {
                        "sfwd-quiz": []
                    },
                    "1384": {
                        "sfwd-quiz": []
                    },
                    "1416": {
                        "sfwd-quiz": []
                    },
                    "1418": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            },
            "674": {
                "sfwd-topic": {
                    "1430": {
                        "sfwd-quiz": []
                    },
                    "1432": {
                        "sfwd-quiz": []
                    },
                    "1434": {
                        "sfwd-quiz": []
                    },
                    "1435": {
                        "sfwd-quiz": []
                    },
                    "1436": {
                        "sfwd-quiz": []
                    }
                },
                "sfwd-quiz": []
            }
        },
        "sfwd-quiz": []
    },
    "t": {
        "sfwd-lessons": [
            667,
            668,
            669,
            670,
            671,
            672,
            673,
            674
        ],
        "sfwd-topic": [
            1490,
            1493,
            1496,
            1499,
            1501,
            1503,
            1505,
            1507,
            1516,
            1518,
            1519,
            1245,
            1299,
            1308,
            1309,
            1310,
            1314,
            1315,
            1316,
            1317,
            1370,
            1369,
            1368,
            1365,
            1375,
            1374,
            1373,
            1372,
            1371,
            1382,
            1384,
            1416,
            1418,
            1430,
            1432,
            1434,
            1435,
            1436
        ],
        "sfwd-quiz": []
    },
    "r": {
        "sfwd-lessons:667": [],
        "sfwd-topic:1490": [
            "sfwd-lessons:667"
        ],
        "sfwd-topic:1493": [
            "sfwd-lessons:667"
        ],
        "sfwd-topic:1496": [
            "sfwd-lessons:667"
        ],
        "sfwd-topic:1499": [
            "sfwd-lessons:667"
        ],
        "sfwd-topic:1501": [
            "sfwd-lessons:667"
        ],
        "sfwd-topic:1503": [
            "sfwd-lessons:667"
        ],
        "sfwd-lessons:668": [],
        "sfwd-topic:1505": [
            "sfwd-lessons:668"
        ],
        "sfwd-topic:1507": [
            "sfwd-lessons:668"
        ],
        "sfwd-topic:1516": [
            "sfwd-lessons:668"
        ],
        "sfwd-topic:1518": [
            "sfwd-lessons:668"
        ],
        "sfwd-topic:1519": [
            "sfwd-lessons:668"
        ],
        "sfwd-lessons:669": [],
        "sfwd-topic:1245": [
            "sfwd-lessons:669"
        ],
        "sfwd-topic:1299": [
            "sfwd-lessons:669"
        ],
        "sfwd-topic:1308": [
            "sfwd-lessons:669"
        ],
        "sfwd-topic:1309": [
            "sfwd-lessons:669"
        ],
        "sfwd-topic:1310": [
            "sfwd-lessons:669"
        ],
        "sfwd-lessons:670": [],
        "sfwd-topic:1314": [
            "sfwd-lessons:670"
        ],
        "sfwd-topic:1315": [
            "sfwd-lessons:670"
        ],
        "sfwd-topic:1316": [
            "sfwd-lessons:670"
        ],
        "sfwd-topic:1317": [
            "sfwd-lessons:670"
        ],
        "sfwd-lessons:671": [],
        "sfwd-topic:1370": [
            "sfwd-lessons:671"
        ],
        "sfwd-topic:1369": [
            "sfwd-lessons:671"
        ],
        "sfwd-topic:1368": [
            "sfwd-lessons:671"
        ],
        "sfwd-topic:1365": [
            "sfwd-lessons:671"
        ],
        "sfwd-lessons:672": [],
        "sfwd-topic:1375": [
            "sfwd-lessons:672"
        ],
        "sfwd-topic:1374": [
            "sfwd-lessons:672"
        ],
        "sfwd-topic:1373": [
            "sfwd-lessons:672"
        ],
        "sfwd-topic:1372": [
            "sfwd-lessons:672"
        ],
        "sfwd-topic:1371": [
            "sfwd-lessons:672"
        ],
        "sfwd-lessons:673": [],
        "sfwd-topic:1382": [
            "sfwd-lessons:673"
        ],
        "sfwd-topic:1384": [
            "sfwd-lessons:673"
        ],
        "sfwd-topic:1416": [
            "sfwd-lessons:673"
        ],
        "sfwd-topic:1418": [
            "sfwd-lessons:673"
        ],
        "sfwd-lessons:674": [],
        "sfwd-topic:1430": [
            "sfwd-lessons:674"
        ],
        "sfwd-topic:1432": [
            "sfwd-lessons:674"
        ],
        "sfwd-topic:1434": [
            "sfwd-lessons:674"
        ],
        "sfwd-topic:1435": [
            "sfwd-lessons:674"
        ],
        "sfwd-topic:1436": [
            "sfwd-lessons:674"
        ]
    },
    "l": [
        "sfwd-lessons:667",
        "sfwd-topic:1490",
        "sfwd-topic:1493",
        "sfwd-topic:1496",
        "sfwd-topic:1499",
        "sfwd-topic:1501",
        "sfwd-topic:1503",
        "sfwd-lessons:668",
        "sfwd-topic:1505",
        "sfwd-topic:1507",
        "sfwd-topic:1516",
        "sfwd-topic:1518",
        "sfwd-topic:1519",
        "sfwd-lessons:669",
        "sfwd-topic:1245",
        "sfwd-topic:1299",
        "sfwd-topic:1308",
        "sfwd-topic:1309",
        "sfwd-topic:1310",
        "sfwd-lessons:670",
        "sfwd-topic:1314",
        "sfwd-topic:1315",
        "sfwd-topic:1316",
        "sfwd-topic:1317",
        "sfwd-lessons:671",
        "sfwd-topic:1370",
        "sfwd-topic:1369",
        "sfwd-topic:1368",
        "sfwd-topic:1365",
        "sfwd-lessons:672",
        "sfwd-topic:1375",
        "sfwd-topic:1374",
        "sfwd-topic:1373",
        "sfwd-topic:1372",
        "sfwd-topic:1371",
        "sfwd-lessons:673",
        "sfwd-topic:1382",
        "sfwd-topic:1384",
        "sfwd-topic:1416",
        "sfwd-topic:1418",
        "sfwd-lessons:674",
        "sfwd-topic:1430",
        "sfwd-topic:1432",
        "sfwd-topic:1434",
        "sfwd-topic:1435",
        "sfwd-topic:1436"
    ]
}

Arguments #

id

Course ID to enroll user into.

Required: 1

context

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

Default: view

One of: view, embed, edit

type

Filter returned results by step type.

Default: all

One of: all, h, l, t, r

Update a Course Step #

Arguments #

id

Course ID to enroll user into.

Required: 1

context

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

Default: view

One of: view, embed, edit

type

Filter returned results by step type.

Default: all

One of: all, h, l, t, r

Definition #

POST /ldlms/v1/sfwd-courses/<id>/steps

Example Request #

$ curl -X POST https://example.com/wp-json/ldlms/v1/sfwd-courses/<id>/steps -d '"t":{"sfwd-lessons":[1,2,3],"sfwd-topic":[9,10,11],"sfwd-quiz":[]}'