SoraiDocs
GuidesAPI reference

sorai courses update-lesson

Change some of a lesson's fields, such as published.

Only the fields you pass change; the kind cannot change. Giving a new file_id, or switching to an external_link, deletes the lesson's old upload.

sorai courses update-lesson --product-id <uuid> --lesson-id <uuid> [flags]

Flags

  • --store <id|slug>: A store id or slug. Defaults to SORAI_STORE, the saved login's store, or the only store.
  • --product-id <uuid> (required): The product's id, from sorai products list.
  • --lesson-id <uuid> (required): The lesson's id, from sorai courses get.
  • --title <string>
  • --source <file|external_link>
  • --file-id <uuid|null>
  • --external-url <string>
  • --body <string>
  • --duration-seconds <int|null>
  • --preview
  • --published
  • --dry-run: Print the request it would send, and for an update the fields that would change, without changing anything.

Permissions

Needs a key with the catalog:read and catalog:write permissions.

This command changes data. It can overwrite, archive or delete what is stored. Run it with --dry-run first to see what it would do.

On this page