- List - List Courses
Retrieve a list of course type learning objects.
These are collections of content type learning objects that are grouped together for a specific learning purpose.
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
LmsListCoursesRequest req = new LmsListCoursesRequest() {
XAccountId = "<id>",
Fields = "id,remote_id,external_reference,content_ids,remote_content_ids,title,description,languages,cover_url,url,active,duration,categories,skills,updated_at,created_at,content,provider,localizations,authors,unified_custom_fields",
Filter = new LmsListCoursesFilter() {
UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
},
Prefer = "heartbeat",
};
LmsListCoursesResponse? res = await sdk.Courses.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
LmsListCoursesRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| StackOneHQ.Client.Models.Errors.BadRequestResponseException | 400 | application/json |
| StackOneHQ.Client.Models.Errors.UnauthorizedResponseException | 401 | application/json |
| StackOneHQ.Client.Models.Errors.ForbiddenResponseException | 403 | application/json |
| StackOneHQ.Client.Models.Errors.NotFoundResponseException | 404 | application/json |
| StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException | 408 | application/json |
| StackOneHQ.Client.Models.Errors.ConflictResponseException | 409 | application/json |
| StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException | 412 | application/json |
| StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException | 422 | application/json |
| StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException | 429 | application/json |
| StackOneHQ.Client.Models.Errors.InternalServerErrorResponse | 500 | application/json |
| StackOneHQ.Client.Models.Errors.NotImplementedResponseException | 501 | application/json |
| StackOneHQ.Client.Models.Errors.BadGatewayResponseException | 502 | application/json |
| StackOneHQ.Client.Models.Errors.APIException | 4XX, 5XX | */* |