Retrieving and updating the list of segmentation schedules

Posted by

Once your AEP stack is implemented, you’ll likely want to see the status and timing of your scheduled segmentation jobs.

The API call itself differs from the segment recalculation but he security and setup is identical:

The API call in the retrieval should get set to GET with as the service. A limit parameter may be added to limit the number of responses returned by the API call: You may also add additional filters like “state=active” to show only those schedules that are currently active.

To retrieve the schedule job specific to batch segmentation, add “?type=batch_segmentation” to your query. This should result in a single entry as segmentation should only run once per calendar day.

Let’s dissect the response body. If you don’t have a “pretty viewer” you feel free to copy and paste the results into a JSON viewer such as JSON Hero.

In the example below, we have the id and the schedule. These are the two items needed for us to understand when the schedule will run, and how to modify it.

    "_page": {
        "totalCount": 1,
        "pageSize": 1
    "children": [
            "id": "ed24db97-92j4-1e16-9nny-a1e43bd56673",
            "imsOrgId": "01OF1EDDAFF93W26QA4W2FD6@AdodeOrg",
            "sandbox": {
                "sandboxId": "9fb528b0-14aa-8675309-b528-jEnnYd85374",
                "sandboxName": "somewhere-outthere",
                "type": "production",
                "default": false
            "name": "Batch Segmentation",
            "state": "active",
            "type": "batch_segmentation",
            "schedule": "0 45 19 * * ?",
            "properties": {
                "segments": [
            "createEpoch": 1669326213,
            "updateEpoch": 1611361746
    "_links": {
        "next": {}

Using Freeformatter we can see that the default batch segment runs at At 19:45:00pm every day and the next execution would occur on Sat Feb 04 19:45:00 UTC 2023 (given current moment is Fri Feb 03 08:04:00 UTC 2023).

Given the ease of calling API’s and parsing JSON with most development platforms, a command-line or GUI could be developed to interact with and display schedules.

Patching or updating the batch segmentation schedule is as easy as updating the method type, URL, and then payload.

To update the schedule, we need the schedule ID, and the appropriate cron schedule.

In this example, we’ll update the above batch to run a minute later. Replacing the “0 45 19 * * ?” schedule simply with “0 46 19 * * ?”.

  • Authorization and headers remain the same as previous examples.
  • Update the method to “PATCH” which indicates an update to an existing record.
  • Replace the service call adding the id from the previous query:
  • In the Body of the message, add the details required for the schedule node including the new expression:
        "value":"0 46 19 * * ?"

If called successfully, you’ll receive a 204 from the server with a successful processing but no content response.

Re-running the schedule list function should show the updated value in the response.

Additional resources

EST to UTC to Montreal, Canada – Savvy Time

Free Online Cron Expression Generator and Describer –

Segmentation API Endpoint documentation:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s