The Image and Video Manager API allows you to create, list, and modify policies, and organize images.

Follow this basic workflow to create a custom policy:

  1. Enable Image and Video Manager on a property in Property Manager.

  2. Get the Luna-Token header generated once Image and Video Manager is enabled on a property. This header, or API key, is needed for all API calls and may look something like this: default-022335.

  3. Determine which image transformations you want to include in the policy.

  4. Run the List policies operation to get a list of all current policies.

  5. Review the list of policy IDs (policyId) returned.

  6. Create a Policy object.

  7. Run the Create or modify a policy operation, making sure to provide a new, unique policyId value. Otherwise you may overwrite an existing policy.

  8. Before going live with a policy, activate the policy on the staging network. To activate a policy, add -staging to the hostname used for the request. For example, to activate a custom policy with an ID of mobile-policy on staging, you'd use this URL:

    https://akab-xxxxx-xxxxxxxxxx.imaging-staging.akamaiapis.net/imaging/v2/policies/mobile-policy
    

    To activate the default policy on staging, use this hostname:

    https://akab-xxxxx-xxxxxxxxxx.imaging-staging.akamaiapis.net/imaging/v2/policies/.auto
    
  9. Test the policy on the staging network, then activate the policy using the regular hostname. For example:

    https://akab-xxxxx-xxxxxxxxxx.imaging.akamaiapis.net/imaging/v2/policies/mobile-policy.