V1::MediaController
MediasController
show
View a media
URL
GET /media/:id or /school_products/:school_product_id/media/:id or /enrollments/:enrollment_id/media/:idParâ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/:idParâ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/mediaObjeto resposta
| Array<Media> | media List of all media |
create
Create media
URL
POST /mediaParâ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 | |
| 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/:idParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| id | Integer | Identifier the media |
update
Update an existing media
URL
PUT/PATCH /media/:idParâ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 | |
| 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/:idObjeto resposta
| media | The media or a list of errors |
preview
Preview a media - SCORM ONLY
URL
Preview /media/:id/previewParâ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_scormParâmetros obrigatórios
| Nome | Tipo | Descrição |
|---|---|---|
| id | Integer | Identifier the media |
| enrollment_id | Integer | Identifier the enrollment |
| redirect_uri | String | URI de redirection |