Front-End Optimization API Use Cases

At this time, there is only one resource available: Purge.

Action Operation API Endpoint
Purge FEO Transformation Bundle POST /feo/v1/purge

Purge FEO Transformation Bundle

How FEO Purge Works: The FEO API will delete all transformation bundles for an assetName. The network checks the status of transformation bundles about every five minutes. If it finds that a transformation bundle has been deleted, the FEO analyzer performs a new analysis and generates a new configuration bundle. If resources have been added or modified, the FEO transformer re-optimizes them.

Usage Scenario: The product catalog on your website updates weekly. You run a purge on the parent product’s configuration (with the CCU API or the CCU REST API) to remove any stale origin content. When the CCU PURGE finishes, you then run an FEO purge to remove the transformation bundles each of your properties (specified by assetName).

Use the Property Manager API (PAPI) to get the list of properties for your contractId and groupId.

NOTE: The propertyName returned by PAPI is used as the assetName value by FEO.

GET /papi/v0/properties?groupId=grp_51529&contractId=ctr_3-LPONXD

{
  "properties": {
    "items": [
      {
        "accountId": "act_Z-8-SA8DFS",
        "contractId": "ctr_3-LPONXD",
        "groupId": "grp_51529",
        "latestVersion": 3,
        "productionVersion": 3,
        "propertyId": "prp_256737",
        "propertyName": "www.site.example.com",
        "stagingVersion": null
      },
      {
        "accountId": "act_Z-8-SA8DFS",
        "contractId": "ctr_3-LPONXD",
        "groupId": "grp_51529",
        "latestVersion": 2,
        "productionVersion": null,
        "propertyId": "prp_581213",
        "propertyName": "jsmith_testing",
        "stagingVersion": null
      },
      {
        "accountId": "act_Z-8-SA8DFS",
        "contractId": "ctr_3-LPONXD",
        "groupId": "grp_51529",
        "latestVersion": 4,
        "productionVersion": 4,
        "propertyId": "prp_52887",
        "propertyName": "www.random.example.com_pm",
        "stagingVersion": null
      }
    ]
  }
}

For each propertyName in the catalog that you wish to purge, use the FEO PURGE API to delete the transformation bundle using the /feo/v1/purge resource:

Request:

POST /feo/v1/purge/
Content-Type: application/json

{
  "assetName": "www.site.example.com",
  "network": "S",
  "comments": "Spring catalog updates on main site"
}

Response:

{
  "assetId": "10346607",
  "errorCode": "400"
}

NOTE: Numeric codes that represent the status of FEO bundle purge requests resemble HTTP error codes, but specify their own system of both success and error responses. See errorCode Values.

You can only have one FEO PURGE request active on a property at a time. Making subsequent requests with the same assetName will return "errorCode": "401" until the initial request is completed.

NOTE: At this time, the FEO API does not provide an indication of when the request has finished.

Request:

POST /feo/v1/purge/
Content-Type: application/json

{
  "assetName": "www.site.example.com",
  "network": "S",
  "comments": "Spring catalog updates on main site"
}

Response:

{
  "assetId": "10346607",
  "errorCode": "401",
  "errorMessage": "Change pending"
}

Last modified: 11/22/2016