Move assets

An asset in Orange Logic is any kind of file or container. An image, a video, a document, a project, and a virtual folder are all assets. You can use DataTable calls to move assets and change your container structure by creating and moving assets.

Move asset calls include a sub-call that locates a parent asset in the database. Calls that add or remove assets from a folder include two sub-calls: One to locate a parent asset and another to locate child assets in the database. Sub-calls are enclosed in square brackets.

For example, consider the following call: /Documents.Image.Default:Update?CoreField.Identifier=DM5555&CoreField.Parent-folder:=[/API/DataTable/V2.2/Documents.Folder.Default:Read?CoreField.Unique-Identifier=DMSTO122]

In this call, the sub-call is: /API/DataTable/V2.2/Documents.Folder.Default:Read?CoreField.Unique-Identifier=DMSTO122

The sub-call is reading the Documents DataTable to find an asset that has the unique identifier DMSTO122.
Here’s another example. Consider the following call:
/Documents-links:ParentChildLink?ParentRecord=[DataTable/V2.2/Documents.Virtual-Folder.Default:Read?CoreField.Unique-Identifier=DMSTO122]&ChildRecords=[DataTable/v2.2/Documents.Image.Default:Read?CoreField.Unique-Identifier=123456789]

In this call, the sub-calls are:

  • DataTable/V2.2/Documents.Virtual-Folder.Default:Read?CoreField.Unique-Identifier=DMSTO122
  • DataTable/v2.2/Documents.Image.Default:Read?CoreField.Unique-Identifier=123456789

The sub-calls are reading the Documents DataTable to find one asset that has the unique identifier DMSTO122 and another asset that has the unique identifier 123456789.

You can use this structure to identify assets based on other criteria, such as different asset types or subtypes, or different identifiers such as CoreField.Identifier or a legacy identifier.

💡

Tip

To move a large number of assets, use iAPI to batch apply the API call to all records in a CSV file.