Script Management API
Number of APIs: 3
The Script Management API is a companion to the Script Management dashboard on Akamai Control Center. The dashboard gathers metrics and analysis that show you which scripts on your site are causing large-set impacts on its performance.
You can review this information on the dashboard before creating policies to decide if you want to block or defer certain scripts.
Use this API to:
- Create new policies to specify which scripts should be automatically blocked or deferred. Also optionally enable single-point-of-failure (SPOF) protection, which moves a call for a script to the background if it's impacting page load.
- View existing policies to analyze how scripts are affecting your site or app.
- Retrieve a policy to reuse its specifics for another property hostname in your Ion property.
Authentication
Create an authentication credential that contains the client token and client secret required to authenticate Akamai API requests.
Note: Only Akamai customers can create credentials. If you aren't an Akamai customer and wish to become one, you can sign up for our services.
- Navigate to the Identity and Access Management section of Akamai Control Center and click Create API Client.
Note: If you don't have access to the Identity and Access Management tool, contact your local Akamai Control Center admin or your Akamai account team for assistance.
- Click Quick and then Download in the Credentials section.
Note: If you need to refine access levels or permissions, see Create a client with custom permissions.
- Open the downloaded file with a text editor and add
[default]
as a header above all text.
[default]
client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=
host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net
access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij
client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj
- Fork the [Akamai Authentication] environment, populate the variables, and [set it for your workspace]
Dependencies
Make sure you have the following services configured before using this API:
- Script Management enabled in your Ion property. See the Add and manage Script management guide for details.
- Workflows. You can use workflows to perform various tasks by stringing together operations from this API. See the Manage your Script Management policies guide for details on how to access these workflows.
propertyId
. It's required for all the operations in this API. To get it, run the List properties operation via the Property Manager API. Also, you need to include thePAPI-Use-Prefixes
header set tofalse
to remove theprp_
prefix from the response, as it's not used in the Script Management API operations.
Integration methods
You can use this API collection in these integration methods: - API
-
Insights - Get insights GET https://{{host}}/script-management/v1/properties/:propertyId/hostnames/:hostname/network/:network/insights
-
Policies - Create a policy POST https://{{host}}/script-management/v1/properties/:propertyId/hostnames/:hostname/network/:network/policies
-
Policies - Get a policy GET https://{{host}}/script-management/v1/properties/:propertyId/hostnames/:hostname/network/:network/policies