New PAPI parameter– "delayValidations"

New PAPI parameter– delayValidations

Since the August release, PAPI’s “Activate or deactivate a property” and “Activate or deactivate an include” operations feature a new request body parameter, delayValidations.

Customers with large or complicated property or include rules can use that parameter to speed up the activation request.

Enabling this parameter delays time-consuming validations that ordinarily result in a direct error response so that any errors appear later once you open the activationLink or run “Get a property activation” or “Get an include activation”. In that case, the activation’s status is FAILED.

Let’s take a closer look at what PAPI does behind the scenes each time you activate a property or include. This will help us understand the benefit of delaying validations better.

Activating without delayValidations

When activating a property or include in a standard way, PAPI performs a few time-consuming validations before submitting the new configuration to Akamai’s Content Delivery Network (CDN).

  1. Potentially upgrades JSON rules to the latest software release.

  2. Checks JSON rules for errors.

  3. Checks warnings against the list of provided acknowledged warnings.

  4. Generates XML from JSON rules.

  5. Runs validations on XML.

  6. Submits the XML to the downstream system for activation.

  7. Returns the activationId provided by the downstream system.

Activating with delayValidations=true

With delayValidations=true, PAPI performs only a minimal validation of the request

before it returns an activationId. PAPI constructs its own activationIdinstead of forwarding the one obtained from the downstream system.

PAPI only performs the remaining validation steps after the request is complete. All validations are performed the same way as previously, but they no longer hold up the activation request. The original HTTP request will take less time because it finishes before the validations start.

As with any activation, you should poll the activationId by running the “Get a property activation” or “Get an include activation” operations until the status is either ACTIVE or FAILED.

For some failures, you’ll need to wait for the remaining validations to complete to learn the root cause.

For more details on the validation errors, check failureCause in the responses for “Get a property activation” or “Get an include activation”…

When should I use this option?

If you’re experiencing 500 errors due to timeouts when activating your properties or includes or they take significant time to activate, you should set delayValidations to true in your requests.

This is a breaking API change. Be prepared to always poll “Get a property activation” or “Get an include activation” to see blocking errors.

4 Likes