V1::MediaController

MediasController

show

View a media

URL

GET /media/:id or /school_products/:school_product_id/media/:id or /enrollments/:enrollment_id/media/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the media

Objeto resposta

Media

The requested media

public

View a public media

URL

GET /media/public/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the media

Objeto resposta

Media

The requested media

index

View list of all media

URL

GET /media or /school_products/:school_product_id/media or /enrollments/:enrollment_id/media

Objeto resposta

Array<Media>

media List of all media

create

Create media

URL

POST /media

Parâmetros obrigatórios

Nome Tipo Descrição
media Hash

The media to create

media[title] String

Title of the media

media[type] String

Type of the media

media[host_key] String

Host's key of the media

media[library_resource_id] Integer

Identifier of the LibraryResource object

Parâmetros opcionais

Nome Tipo Descrição
media[text] String

Text of the object. Required if media[type] is Text or Html

media[video_id] Integer

Identifier of the Image object. Required if media[type] is VideoSlide

media[video_slide_syncs_attributes] Hash

Array of VideoSlideSync attributes. Required if media[type] is VideoSlide

media[video_slide_syncs_attributes][image_id] Integer

Identifier of the Image object. Required if media[type] is VideoSlide

media[video_slide_syncs_attributes][sync_at] Integer

Time that the image will be shown. Required if media[type] is VideoSlide

media[s3_file_url] String

Url of file at s3 Required if media[type] is ScormPackage

destroy

Destroy a media

URL

DELETE /media/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the media

update

Update an existing media

URL

PUT/PATCH /media/:id

Parâmetros obrigatórios

Nome Tipo Descrição
media Hash

The media to create

Parâmetros opcionais

Nome Tipo Descrição
media[title] String

Title of the media

media[type] String

Type of the media

media[host_key] String

Host's key of the media

media[library_resource_id] Integer

Identifier of the LibraryResource object

media[text] String

Text of the object. Required if media[type] is Text or Html

media[video_id] Integer

Identifier of the Image object. Required if media[type] is VideoSlide

media[video_slide_syncs_attributes] Hash

Array of VideoSlideSync attributes. Required if media[type] is VideoSlide

media[video_slide_syncs_attributes][image_id] Integer

Identifier of the Image object. Required if media[type] is VideoSlide

media[video_slide_syncs_attributes][sync_at] Integer

Time that the image will be shown. Required if media[type] is VideoSlide

Objeto resposta

media

The created media or a list of errors

reprocess

Reprocess an existing media

URL

PUT /media/:id

Objeto resposta

media

The media or a list of errors

preview

Preview a media - SCORM ONLY

URL

Preview /media/:id/preview

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the media

redirect_uri String

URI de redirection

launch_scorm

Return a uri to launch the scorm

URL

launch_scorm /media/:id/launch_scorm

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the media

enrollment_id Integer

Identifier the enrollment

redirect_uri String

URI de redirection