Skip to content

Amazon CloudFront API

by amazonaws.com

API keyHTTPSCloud Platforms
Open documentation ↗

Overview

<fullname>Amazon CloudFront</fullname> <p>This is the <i>Amazon CloudFront API Reference</i>. This guide is for developers who need detailed information about CloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the <i>Amazon CloudFront Developer Guide</i>.</p>

Amazon CloudFront is a cloud platforms API from amazonaws.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 106 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Base URL
https://cloudfront.amazonaws.com
Version
2020-05-31
Endpoints
106
Spec updated
2021-01-15

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://cloudfront.amazonaws.com/2020-05-31/cache-policy" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://cloudfront.amazonaws.com/2020-05-31/cache-policy", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://cloudfront.amazonaws.com/2020-05-31/cache-policy",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
PUT/2020-05-31/distribution/{TargetDistributionId}/associate-alias#Alias<p>Associates an alias (also known as a CNAME or an alternate domain name) with a CloudFront distribution.</p> <p>With this operation you can move an alias that
POST/2020-05-31/distribution/{PrimaryDistributionId}/copy<p>Creates a staging distribution using the configuration of the provided primary distribution. A staging distribution is a copy of an existing distribution (ca
GET/2020-05-31/cache-policy<p>Gets a list of cache policies.</p> <p>You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or only the custo
POST/2020-05-31/cache-policy<p>Creates a cache policy.</p> <p>After you create a cache policy, you can attach it to one or more cache behaviors. When it's attached to a cache behavior, the
GET/2020-05-31/origin-access-identity/cloudfrontLists origin access identities.
POST/2020-05-31/origin-access-identity/cloudfrontCreates a new origin access identity. If you're using Amazon S3 for your origin, you can use an origin access identity to require users to access your content u
GET/2020-05-31/continuous-deployment-policy<p>Gets a list of the continuous deployment policies in your Amazon Web Services account.</p> <p>You can optionally specify the maximum number of items to recei
POST/2020-05-31/continuous-deployment-policy<p>Creates a continuous deployment policy that distributes traffic for a custom domain name to two different CloudFront distributions.</p> <p>To use a continuou
GET/2020-05-31/distributionList CloudFront distributions.
POST/2020-05-31/distributionCreates a CloudFront distribution.
POST/2020-05-31/distribution#WithTagsCreate a new distribution with tags.
GET/2020-05-31/field-level-encryptionList all field-level encryption configurations that have been created in CloudFront for this account.
POST/2020-05-31/field-level-encryptionCreate a new field-level encryption configuration.
GET/2020-05-31/field-level-encryption-profileRequest a list of field-level encryption profiles that have been created in CloudFront for this account.
POST/2020-05-31/field-level-encryption-profileCreate a field-level encryption profile.
GET/2020-05-31/function<p>Gets a list of all CloudFront functions in your Amazon Web Services account.</p> <p>You can optionally apply a filter to return only the functions that are i
POST/2020-05-31/function<p>Creates a CloudFront function.</p> <p>To create a function, you provide the function code and some configuration information about the function. The response
GET/2020-05-31/distribution/{DistributionId}/invalidationLists invalidation batches.
POST/2020-05-31/distribution/{DistributionId}/invalidationCreate a new invalidation.
GET/2020-05-31/key-group<p>Gets a list of key groups.</p> <p>You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list
POST/2020-05-31/key-group<p>Creates a key group that you can use with <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">CloudFront signed
GET/2020-05-31/distributions/{DistributionId}/monitoring-subscription/Gets information about whether additional CloudWatch metrics are enabled for the specified CloudFront distribution.
POST/2020-05-31/distributions/{DistributionId}/monitoring-subscription/<p>Enables additional CloudWatch metrics for the specified CloudFront distribution. The additional metrics incur an additional cost.</p> <p>For more information
DELETE/2020-05-31/distributions/{DistributionId}/monitoring-subscription/Disables additional CloudWatch metrics for the specified CloudFront distribution.
GET/2020-05-31/origin-access-control<p>Gets the list of CloudFront origin access controls in this Amazon Web Services account.</p> <p>You can optionally specify the maximum number of items to rece
POST/2020-05-31/origin-access-control<p>Creates a new origin access control in CloudFront. After you create an origin access control, you can add it to an origin in a CloudFront distribution so tha
GET/2020-05-31/origin-request-policy<p>Gets a list of origin request policies.</p> <p>You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or only
POST/2020-05-31/origin-request-policy<p>Creates an origin request policy.</p> <p>After you create an origin request policy, you can attach it to one or more cache behaviors. When it's attached to a
GET/2020-05-31/public-keyList all public keys that have been added to CloudFront for this account.
POST/2020-05-31/public-keyUploads a public key to CloudFront that you can use with <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html">signed
GET/2020-05-31/realtime-log-config<p>Gets a list of real-time log configurations.</p> <p>You can optionally specify the maximum number of items to receive in the response. If the total number of
POST/2020-05-31/realtime-log-config<p>Creates a real-time log configuration.</p> <p>After you create a real-time log configuration, you can attach it to one or more cache behaviors to send real-t
GET/2020-05-31/response-headers-policy<p>Gets a list of response headers policies.</p> <p>You can optionally apply a filter to get only the managed policies created by Amazon Web Services, or only t
POST/2020-05-31/response-headers-policy<p>Creates a response headers policy.</p> <p>A response headers policy contains information about a set of HTTP headers. To create a response headers policy, yo
GET/2020-05-31/streaming-distributionList streaming distributions.
POST/2020-05-31/streaming-distributionThis API is deprecated. Amazon CloudFront is deprecating real-time messaging protocol (RTMP) distributions on December 31, 2020. For more information, <a href="
POST/2020-05-31/streaming-distribution#WithTagsThis API is deprecated. Amazon CloudFront is deprecating real-time messaging protocol (RTMP) distributions on December 31, 2020. For more information, <a href="
GET/2020-05-31/cache-policy/{Id}<p>Gets a cache policy, including the following metadata:</p> <ul> <li> <p>The policy's identifier.</p> </li> <li> <p>The date and time when the policy was last
PUT/2020-05-31/cache-policy/{Id}<p>Updates a cache policy configuration.</p> <p>When you update a cache policy configuration, all the fields are updated with the values provided in the request
DELETE/2020-05-31/cache-policy/{Id}<p>Deletes a cache policy.</p> <p>You cannot delete a cache policy if it's attached to a cache behavior. First update your distributions to remove the cache pol
GET/2020-05-31/origin-access-identity/cloudfront/{Id}Get the information about an origin access identity.
DELETE/2020-05-31/origin-access-identity/cloudfront/{Id}Delete an origin access identity.
GET/2020-05-31/continuous-deployment-policy/{Id}Gets a continuous deployment policy, including metadata (the policy's identifier and the date and time when the policy was last modified).
PUT/2020-05-31/continuous-deployment-policy/{Id}<p>Updates a continuous deployment policy. You can update a continuous deployment policy to enable or disable it, to change the percentage of traffic that it se
DELETE/2020-05-31/continuous-deployment-policy/{Id}<p>Deletes a continuous deployment policy.</p> <p>You cannot delete a continuous deployment policy that's attached to a primary distribution. First update your
GET/2020-05-31/distribution/{Id}Get the information about a distribution.
DELETE/2020-05-31/distribution/{Id}Delete a distribution.
GET/2020-05-31/field-level-encryption/{Id}Get the field-level encryption configuration information.
DELETE/2020-05-31/field-level-encryption/{Id}Remove a field-level encryption configuration.
GET/2020-05-31/field-level-encryption-profile/{Id}Get the field-level encryption profile information.
DELETE/2020-05-31/field-level-encryption-profile/{Id}Remove a field-level encryption profile.
PUT/2020-05-31/function/{Name}#If-Match<p>Updates a CloudFront function.</p> <p>You can update a function's code or the comment that describes the function. You cannot update a function's name.</p> <
DELETE/2020-05-31/function/{Name}#If-Match<p>Deletes a CloudFront function.</p> <p>You cannot delete a function if it's associated with a cache behavior. First, update your distributions to remove the f
GET/2020-05-31/key-group/{Id}<p>Gets a key group, including the date and time when the key group was last modified.</p> <p>To get a key group, you must provide the key group's identifier. I
PUT/2020-05-31/key-group/{Id}<p>Updates a key group.</p> <p>When you update a key group, all the fields are updated with the values provided in the request. You cannot update some fields in
DELETE/2020-05-31/key-group/{Id}<p>Deletes a key group.</p> <p>You cannot delete a key group that is referenced in a cache behavior. First update your distributions to remove the key group fro
GET/2020-05-31/origin-access-control/{Id}Gets a CloudFront origin access control, including its unique identifier.
DELETE/2020-05-31/origin-access-control/{Id}<p>Deletes a CloudFront origin access control.</p> <p>You cannot delete an origin access control if it's in use. First, update all distributions to remove the o
GET/2020-05-31/origin-request-policy/{Id}<p>Gets an origin request policy, including the following metadata:</p> <ul> <li> <p>The policy's identifier.</p> </li> <li> <p>The date and time when the polic
PUT/2020-05-31/origin-request-policy/{Id}<p>Updates an origin request policy configuration.</p> <p>When you update an origin request policy configuration, all the fields are updated with the values pro
DELETE/2020-05-31/origin-request-policy/{Id}<p>Deletes an origin request policy.</p> <p>You cannot delete an origin request policy if it's attached to any cache behaviors. First update your distributions
GET/2020-05-31/public-key/{Id}Gets a public key.
DELETE/2020-05-31/public-key/{Id}Remove a public key you previously added to CloudFront.
POST/2020-05-31/delete-realtime-log-config/<p>Deletes a real-time log configuration.</p> <p>You cannot delete a real-time log configuration if it's attached to a cache behavior. First update your distrib
GET/2020-05-31/response-headers-policy/{Id}<p>Gets a response headers policy, including metadata (the policy's identifier and the date and time when the policy was last modified).</p> <p>To get a respons
PUT/2020-05-31/response-headers-policy/{Id}<p>Updates a response headers policy.</p> <p>When you update a response headers policy, the entire policy is replaced. You cannot update some policy fields inde
DELETE/2020-05-31/response-headers-policy/{Id}<p>Deletes a response headers policy.</p> <p>You cannot delete a response headers policy if it's attached to a cache behavior. First update your distributions t
GET/2020-05-31/streaming-distribution/{Id}Gets information about a specified RTMP distribution, including the distribution configuration.
DELETE/2020-05-31/streaming-distribution/{Id}<p>Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the following steps.</p> <p> <b>To delete an RTMP distribut
GET/2020-05-31/function/{Name}/describe<p>Gets configuration information and metadata about a CloudFront function, but not the function's code. To get a function's code, use <code>GetFunction</code>.
GET/2020-05-31/cache-policy/{Id}/config<p>Gets a cache policy configuration.</p> <p>To get a cache policy configuration, you must provide the policy's identifier. If the cache policy is attached to a
GET/2020-05-31/origin-access-identity/cloudfront/{Id}/configGet the configuration information about an origin access identity.
PUT/2020-05-31/origin-access-identity/cloudfront/{Id}/configUpdate an origin access identity.
GET/2020-05-31/continuous-deployment-policy/{Id}/configGets configuration information about a continuous deployment policy.
GET/2020-05-31/distribution/{Id}/configGet the configuration information about a distribution.
PUT/2020-05-31/distribution/{Id}/config<p>Updates the configuration for a CloudFront distribution.</p> <p>The update process includes getting the current distribution configuration, updating it to ma
GET/2020-05-31/field-level-encryption/{Id}/configGet the field-level encryption configuration information.
PUT/2020-05-31/field-level-encryption/{Id}/configUpdate a field-level encryption configuration.
GET/2020-05-31/field-level-encryption-profile/{Id}/configGet the field-level encryption profile configuration information.
PUT/2020-05-31/field-level-encryption-profile/{Id}/configUpdate a field-level encryption profile.
GET/2020-05-31/function/{Name}<p>Gets the code of a CloudFront function. To get configuration information and metadata about a function, use <code>DescribeFunction</code>.</p> <p>To get a fu
GET/2020-05-31/distribution/{DistributionId}/invalidation/{Id}Get the information about an invalidation.
GET/2020-05-31/key-group/{Id}/config<p>Gets a key group configuration.</p> <p>To get a key group configuration, you must provide the key group's identifier. If the key group is referenced in a dis
GET/2020-05-31/origin-access-control/{Id}/configGets a CloudFront origin access control configuration.
PUT/2020-05-31/origin-access-control/{Id}/configUpdates a CloudFront origin access control.
GET/2020-05-31/origin-request-policy/{Id}/config<p>Gets an origin request policy configuration.</p> <p>To get an origin request policy configuration, you must provide the policy's identifier. If the origin re
GET/2020-05-31/public-key/{Id}/configGets a public key configuration.
PUT/2020-05-31/public-key/{Id}/configUpdate public key information. Note that the only value you can change is the comment.
POST/2020-05-31/get-realtime-log-config/<p>Gets a real-time log configuration.</p> <p>To get a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN).
GET/2020-05-31/response-headers-policy/{Id}/config<p>Gets a response headers policy configuration.</p> <p>To get a response headers policy configuration, you must provide the policy's identifier. If the respons
GET/2020-05-31/streaming-distribution/{Id}/configGet the configuration information about a streaming distribution.
PUT/2020-05-31/streaming-distribution/{Id}/configUpdate a streaming distribution.
GET/2020-05-31/conflicting-alias#DistributionId&Alias<p>Gets a list of aliases (also called CNAMEs or alternate domain names) that conflict or overlap with the provided alias, and the associated CloudFront distrib
GET/2020-05-31/distributionsByCachePolicyId/{CachePolicyId}<p>Gets a list of distribution IDs for distributions that have a cache behavior that's associated with the specified cache policy.</p> <p>You can optionally spe
GET/2020-05-31/distributionsByKeyGroupId/{KeyGroupId}<p>Gets a list of distribution IDs for distributions that have a cache behavior that references the specified key group.</p> <p>You can optionally specify the m
GET/2020-05-31/distributionsByOriginRequestPolicyId/{OriginRequestPolicyId}<p>Gets a list of distribution IDs for distributions that have a cache behavior that's associated with the specified origin request policy.</p> <p>You can optio
POST/2020-05-31/distributionsByRealtimeLogConfig/<p>Gets a list of distributions that have a cache behavior that's associated with the specified real-time log configuration.</p> <p>You can specify the real-tim
GET/2020-05-31/distributionsByResponseHeadersPolicyId/{ResponseHeadersPolicyId}<p>Gets a list of distribution IDs for distributions that have a cache behavior that's associated with the specified response headers policy.</p> <p>You can opt
GET/2020-05-31/distributionsByWebACLId/{WebACLId}List the distributions that are associated with a specified WAF web ACL.
GET/2020-05-31/tagging#ResourceList tags for a CloudFront resource.

Showing the first 100 of 106 endpoints; the full list is in the documentation.

Questions

Does the Amazon CloudFront API need an API key?

Yes. The Amazon CloudFront API uses API key authentication; the documentation explains how to get credentials.

Does the Amazon CloudFront API support HTTPS?

Yes, the Amazon CloudFront API is served over HTTPS.

How many endpoints does the Amazon CloudFront API have?

Its OpenAPI description lists 106 endpoints in version 2020-05-31. The first 100 are shown on this page.

What are alternatives to the Amazon CloudFront API?

Other Cloud Platforms APIs include Remote Settings PROD, Linode API, DigitalOcean API, Vercel API, Platform API.

Compare alternatives →

Remote Settings PROD

Cloud Platforms

Firefox is a free web browser backed by Mozilla, a non-profit dedicated to internet health and privacy.

No auth19 endpoints

Linode API

Cloud Platforms

## Introduction The Linode API provides the ability to programmatically manage the full range of Linode products and services. This reference is designed to assist application developers and system administrators. Each endpoint includes descriptions, request syntax, and examples using standard HTTP requests. Response data is returned in JSON format. This document was generated from our OpenAPI Specification. See the <a target="_top" href="https://www.openapis.org">OpenAPI website</a> for more information. <a target="_top" href="/docs/api/openapi.yaml">Download the Linode OpenAPI Specification</a>. ## Changelog <a target="_top" href="/docs/products/tools/api/release-notes/">View our Changelog</a> to see release notes on all changes made to our API. ## Access and Authentication Some endpoints are publicly accessible without requiring authentication. All endpoints affecting your Account, however, require either a Personal Access Token or OAuth authentication (when using third-party applications). ### Personal Access Token The easiest way to access the API is with a Personal Access Token (PAT) generated from the <a target="_top" href="https://cloud.linode.com/profile/tokens">Linode Cloud Manager</a> or the [Create Personal Access Token](/docs/api/profile/#personal-access-token-create) endpoint. All scopes for the OAuth security model ([defined below](/docs/api/profile/#oauth)) apply to this security model as well. #### Authentication | Security Scheme Type: | HTTP | |-----------------------|------| | **HTTP Authorization Scheme** | bearer | ### OAuth If you only need to access the Linode API for personal use, we recommend that you create a [personal access token](/docs/api/#personal-access-token). If you're designing an application that can authenticate with an arbitrary Linode user, then you should use the OAuth 2.0 workflows presented in this section. For a more detailed example of an OAuth 2.0 implementation, see our guide on [How to Create an OAuth App with the Linode Python API Library](/docs/products/tools/api/guides/create-an-oauth-app-with-the-python-api-library/#oauth-2-authentication-exchange). Before you implement OAuth in your application, you first need to create an OAuth client. You can do this [with the Linode API](/docs/api/account/#oauth-client-create) or [via the Cloud Manager](https://cloud.linode.com/profile/clients): - When creating the client, you'll supply a `label` and a `redirect_uri` (referred to as the Callback URL in the Cloud Manager). - The response from this endpoint will give you a `client_id` and a `secret`. - Clients can be public or private, and are private by default. You can choose to make the client public when it is created. - A private client is used with applications which can securely store the client secret (that is, the secret returned to you when you first created the client). For example, an application running on a secured server that only the developer has access to would use a private OAuth client. This is also called a confidential client in some OAuth documentation. - A public client is used with applications where the client secret is not guaranteed to be secure. For example, a native app running on a user's computer may not be able to keep the client secret safe, as a user could potentially inspect the source of the application. So, native apps or apps that run in a user's browser should use a public client. - Public and private clients follow different workflows, as described below. #### OAuth Workflow The OAuth workflow is a series of exchanges between your third-party app and Linode. The workflow is used to authenticate a user before an application can start making API calls on the user's behalf. Notes: - With respect to the diagram in [section 1.2 of RFC 6749](https://tools.ietf.org/html/rfc6749#section-1.2), login.linode.com (referred to in this section as the *login server*) is the Resource Owner and the Authorization Server; api.linode.com (referred to here as the *api se

Bearer token350 endpoints

DigitalOcean API

Cloud Platforms

# Introduction The DigitalOcean API allows you to manage Droplets and resources within the DigitalOcean cloud in a simple, programmatic way using conventional HTTP requests. All of the functionality that you are familiar with in the DigitalOcean control panel is also available through the API, allowing you to script the complex actions that your situation requires. The API documentation will start with a general overview about the design and technology that has been implemented, followed by reference information about specific endpoints. ## Requests Any tool that is fluent in HTTP can communicate with the API simply by requesting the correct URI. Requests should be made using the HTTPS protocol so that traffic is encrypted. The interface responds to different methods depending on the action required. |Method|Usage| |--- |--- | |GET|For simple retrieval of information about your account, Droplets, or environment, you should use the GET method. The information you request will be returned to you as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.| |DELETE|To destroy a resource and remove it from your account and environment, the DELETE method should be used. This will remove the specified object if it is found. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource's availability prior to issuing a delete command, the final state will be the same regardless of its existence.| |PUT|To update the information about a resource in your account, the PUT method is available. Like the DELETE Method, the PUT method is idempotent. It sets the state of the target using the provided values, regardless of their current values. Requests using the PUT method do not need to check the current attributes of the object.| |PATCH|Some resources support partial modification. In these cases, the PATCH method is available. Unlike PUT which generally requires a complete representation of a resource, a PATCH request is is a set of instructions on how to modify a resource updating only specific attributes.| |POST|To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object. When you wish to create a new object, send a POST request to the target endpoint.| |HEAD|Finally, to retrieve metadata information, you should use the HEAD method to get the headers. This returns only the header of what would be returned with an associated GET request. Response headers contain some useful information about your API access and the results that are available for your request. For instance, the headers contain your current rate-limit value and the amount of time available until the limit resets. It also contains metrics about the total number of objects found, pagination information, and the total content length.| ## HTTP Statuses Along with the HTTP methods that the API responds to, it will also return standard HTTP statuses, including error codes. In the event of a problem, the status will contain the error code, while the body of the response will usually contain additional information about the problem that was encountered. In general, if the status returned is in the 200 range, it indicates that the request was fulfilled successfully and that no error was encountered. Return codes in the 400 range typically indicate that there was an issue with the request that was sent. Among other things, this could mean that you did not authenticate correctly, that you are requesting an action that you do not have authorization for, that the object you are requesting does not exist, or that your request is malformed. If you receive a status in the 500 range, this generally indicates a server-side problem. This means that we are having

Bearer token290 endpoints

Vercel API

Cloud Platforms

Vercel combines the best developer experience with an obsessive focus on end-user performance. Our platform enables frontend teams to do their best work.

Bearer token112 endpoints

Platform API

Cloud Platforms

The [REST API specification](https://www.ably.io/documentation/rest-api) for Ably.

HTTP Basic22 endpoints

Azure Data Lake Storage

Cloud Platforms

Azure Data Lake Storage provides storage for Hadoop and other big data workloads.

No auth10 endpoints

Listed from APIs.guru (CC0).