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:
-
Enable Image and Video Manager on a property in Property Manager.
-
Get the
Luna-Tokenheader 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. -
Determine which image transformations you want to include in the policy.
-
Run the List policies operation to get a list of all current policies.
-
Review the list of policy IDs (
policyId) returned. -
Create a Policy object.
-
Run the Create or modify a policy operation, making sure to provide a new, unique
policyIdvalue. Otherwise you may overwrite an existing policy. -
Before going live with a policy, activate the policy on the staging network. To activate a policy, add
-stagingto the hostname used for the request. For example, to activate a custom policy with an ID ofmobile-policyon staging, you'd use this URL:https://akab-xxxxx-xxxxxxxxxx.imaging-staging.akamaiapis.net/imaging/v2/policies/mobile-policyTo activate the default policy on staging, use this hostname:
https://akab-xxxxx-xxxxxxxxxx.imaging-staging.akamaiapis.net/imaging/v2/policies/.auto -
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.
