migrates a given legacy CloudExpression to the new format.

Details and Options

  • In Wolfram Cloud release 1.60, the CloudExpression format was changed and cloud expressions created before then need to be migrated to the new format.
  • The value stored in the CloudExpression is not modified in the process.
  • The values of the options PartProtection and Permissions are preserved by the migration.
  • Named cloud expressions are migrated in place, meaning the process is transparent.
  • Anonymous cloud expressions are migrated to a new anonymous CloudExpression with a new UUID.
  • The migration process renames the legacy cloud expression by appending "_backup" to its name, but does not delete it.
  • The migration produces a backup file in $TemporaryDirectory containing the expression stored in the CloudExpression.
  • MigrateLegacyCloudExpression returns a Success object if it successfully migrates the CloudExpression, or a Failure object.
  • MigrateLegacyCloudExpression allows the following options:
  • "EnsureSameQ"Truewhether to ensure original and migrated values are SameQ
    "KeepBackups"Truewhether to keep backups produced during the migration
    "MigrateFailureObject"Falsewhether to perform the migration even if the expression is a failure object
    "UseDefaultOptionOnFailure"Truewhether to ignore and replace failure option values with their default settings
  • With "EnsureSameQ" set to False, the original expression is not compared to the migrated one using the function SameQ.
  • With "UseDefaultOptionOnFailure" set to True, options are reset to their default values if their values cannot be retrieved.
  • Setting "MigrateFailureObject" to True allows the migration of cloud expressions whose content is a single Failure object. This setting should not be used otherwise, as it prevents the function from detecting errors while retrieving the expression to migrate.


Basic Examples  (1)

The existing CloudExpression["API/form"] was created in the old format:

Reading its value results in a failure because it is in the old format:

Migrate it to the new format:

Retrieve the expression:

A backup file has been created in $TemporaryDirectory:

Wolfram Research (2021), MigrateLegacyCloudExpression, Wolfram Language function,


Wolfram Research (2021), MigrateLegacyCloudExpression, Wolfram Language function,


Wolfram Language. 2021. "MigrateLegacyCloudExpression." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2021). MigrateLegacyCloudExpression. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2022_migratelegacycloudexpression, author="Wolfram Research", title="{MigrateLegacyCloudExpression}", year="2021", howpublished="\url{}", note=[Accessed: 07-June-2023 ]}


@online{reference.wolfram_2022_migratelegacycloudexpression, organization={Wolfram Research}, title={MigrateLegacyCloudExpression}, year={2021}, url={}, note=[Accessed: 07-June-2023 ]}