List the courses of an App
GET
/apps/{appId}/courses
const url = 'https://api.passion.io/v1/apps/example/courses';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.passion.io/v1/apps/example/coursesParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”appId
required
The id of the App, as Studio shows it.
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
courses
required
Array<object>
object
id
required
The id of the course. Offers name a course by the same id.
string
name
required
string
state
required
A course is published when at least one offer gives access to it.
string
lessons
required
integer
offerIds
required
The offers that give access to the course.
Array<string>
Example
{ "courses": [ { "state": "published" } ]}