Media API : Media Controller

The Media Controller in EnterWorks is used to manage digital assets such as images, audio files, video files, PDF documents, Microsoft Office documents, and other types of files. These files are stored in the Digital Asset Manager (DAM) and are associated with other records in the EnterWorks repositories.

The Media APIs are designed to manage these various digital assets on the server and run on-demand reports on the available files. The Media APIs can be used to upload files to the server or download specific digital asset files. You can also run reports on the types of media available or initiate jobs to delete orphaned images or regenerate variants of existing images.

For more detailed information, see the Media API Endpoints section below or the EnterWorks Swagger pages.

Media API Endpoints

Note: Some of the operations listed below have been deprecated and are no longer recommended to use due to changes in the API. Replacement operations are listed below the definition for all deprecated items.

POST /api/deleteOrphanedImages:

  • Starts a job that will delete any orphaned images.

  • Orphaned images are files that do not have a record or have a record that is not linked to an existing asset file.

GET /api/files/download:

  • Retrieves the specified file (name).

  • Can be used to filter results to return a specified file type, such as .gif, .jpg, or .png.

  • Indicate if you want to download the media as an attachment or as an inline file.

POST /api/files/upload:

  • Select a file from your computer or network and uploads it to the server.

POST /api/imageReport:

  • Initiates an image report job that creates a list of available image files.

  • Can run the job on a list of specified images by including a string of Item IDs separated by a colon (:).

GET /api/images:

  • Retrieves the specified file (name).

  • Can also be used to filter results to return a specified file type, such as .gif, .jpg, or .png.

POST /api/regenerateVariants:

  • Starts a variant regeneration job to recreate variants associated with an existing media file.

  • You can also choose to recreate variants for a specific set of items only by including multiple Item IDs in your request.

  • If you send IDs for multiple variants, each ID must be listed as a string and separated by a colon (:).

POST /deletedOrphanedImages:

  • Starts a delete orphaned images job.

    Deprecated. Use /api/deleteOrphanedImages instead.

GET /files/download:

  • Downloads a specific file or files of a specified type.

    Deprecated. Use /api/files/download instead.

POST /files/upload:

  • Select a file from your computer or network and uploads it to the server.

    Deprecated. Use /api/files/upload instead.

POST /imageReport:

  • Kicks off an image report job.

    Deprecated. Use /api/imageReport instead.

GET /images:

  • Retrieves a specific image by file name or a list of all image files of a specified type.

    Deprecated. Use /api/images instead.

POST /regenerateVariants:

  • Starts a variant regeneration job.

    Deprecated. Use /api/regenerateVariants instead.