AI Experiences

AI Experiences API

API for creating, accessing and updating AI Experiences. AI Experiences are used to create interactive AI-powered learning scenarios within courses.

An AiExperience object looks like:

// An AI Experience for interactive learning
{
  // The ID of the AI experience
  "id": 234,
  // The title for the AI experience
  "title": "Customer Service Simulation",
  // The description of the AI experience
  "description": "Practice customer service skills in a simulated environment",
  // The AI facts for the experience
  "facts": "You are a customer service representative...",
  // The learning objectives for this experience
  "learning_objective": "Students will practice active listening and problem-solving",
  // The scenario description for the experience
  "scenario": "A customer is calling about a billing issue",
  // The current published state of the AI experience
  "workflow_state": "published",
  // The course this experience belongs to
  "course_id": 1578941
}

AiExperiencesController#index

GET /api/v1/courses/:course_id/ai_experiences

Scope: url:GET|/api/v1/courses/:course_id/ai_experiences

Retrieve the paginated list of AI experiences for a course

Request Parameters:

Parameter
Type
Description

workflow_state

string

Only return experiences with the specified workflow state. Allowed values: published, unpublished, deleted

Returns a list of AiExperience objects.

AiExperiencesController#show

GET /api/v1/courses/:course_id/ai_experiences/:id

Scope: url:GET|/api/v1/courses/:course_id/ai_experiences/:id

Retrieve an AI experience by ID

Returns an AiExperience object.

AiExperiencesController#new

GET /api/v1/courses/:course_id/ai_experiences/new

Scope: url:GET|/api/v1/courses/:course_id/ai_experiences/new

Display the form for creating a new AI experience

AiExperiencesController#edit

GET /api/v1/courses/:course_id/ai_experiences/:id/edit

Scope: url:GET|/api/v1/courses/:course_id/ai_experiences/:id/edit

Display the form for editing an existing AI experience

AiExperiencesController#create

POST /api/v1/courses/:course_id/ai_experiences

Scope: url:POST|/api/v1/courses/:course_id/ai_experiences

Create a new AI experience for the specified course

Request Parameters:

Parameter
Type
Description

title

Required string

The title of the AI experience.

description

string

The description of the AI experience.

facts

Required string

The AI facts for the experience.

learning_objective

string

The learning objectives for this experience.

scenario

string

The scenario description for the experience.

workflow_state

string

The initial state of the experience. Defaults to ‘unpublished’. Allowed values: published, unpublished

Returns an AiExperience object.

AiExperiencesController#update

PUT /api/v1/courses/:course_id/ai_experiences/:id

Scope: url:PUT|/api/v1/courses/:course_id/ai_experiences/:id

Update an existing AI experience

Request Parameters:

Parameter
Type
Description

title

string

The title of the AI experience.

description

string

The description of the AI experience.

facts

string

The AI facts for the experience.

learning_objective

string

The learning objectives for this experience.

scenario

string

The scenario description for the experience.

workflow_state

string

The state of the experience. Allowed values: published, unpublished

Returns an AiExperience object.

AiExperiencesController#destroy

DELETE /api/v1/courses/:course_id/ai_experiences/:id

Scope: url:DELETE|/api/v1/courses/:course_id/ai_experiences/:id

Delete an AI experience (soft delete - marks as deleted)

Returns an AiExperience object.


This documentation is generated directly from the Canvas LMS source code, available on Github.

Last updated

Was this helpful?