Create or modify a policy

Run this operation to update an existing policy or create a new policy. Run the List policies operation to get the list of existing policies and their policy IDs. Confirm the policyId doesn't already exist.

Path Params
string
enum
required

Enum. Network environment to execute the API request on.

Allowed:
string
required

Unique identifier for a policy.

Query Params
string

Runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

Body Params

Specifies details for each policy, such as variations in image size and formats and the transformations to apply.

output
object

Dictates the output quality, either quality or perceptualQuality, and the formats created for each resized image. If unspecified, you get image formats that support all browsers at the default quality level of 85, including WEBP, JPEG2000, and JPEG-XR for specific browsers.

postBreakpointTransformations
array

Post-processing Transformations are applied to the image after image and quality settings have been applied.

postBreakpointTransformations
transformations
array

Set of image transformations to apply to the source image. If unspecified, no operations are performed.

transformations
breakpoints
object

The breakpoint widths (in pixels) to use to create derivative images or videos.

hosts
array of strings

Hosts that are allowed for image or video URLs within transformations or variables.

hosts
integer
3600 to 604800
Defaults to 3600

The amount of time in seconds that the policy takes to roll out. During the rollout an increasing proportion of images and videos will begin to use the new policy instead of the cached images and videos from the previous version. This value has no effect on the staging network.

variables
array of objects

Declares variables for use within the policy. Any variable declared here can be invoked throughout transformations as an Inline Variable object, so that you don't have to specify values separately. You can also pass in these variable names and values dynamically as query parameters in the image's request URL.

variables
Headers
string

Unique identifier for the Akamai Contract containing the policy sets. Required if you have access to more than one contract with Image & Video Manager.

string
required

Unique identifier for the Image & Video Manager policy set.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json