Use the locate batch flow jobs function in Sitecore CDP REST API

Abstract

Provides details on locating batch flow jobs in Sitecore CDP (Data model 2.1).

You can use the Audience Sync REST API to perform the locate batch flows job function to return a list of batch jobs for a flow. After you perform the  locate batch flows job function, you can use the ref included in the response to retrieve a specific batch job or retrieve the signed URLs.

To locate a batch flows job in Sitecore CDP, use the following:

GET: https://apiEndpoint/v2/batchFlowsJob

Attribute

Description

Type

flowRef

The Universal Unique Identifier (UUID) of the flow.

string

statuses

The status of the flow.

string

expand

Retrieves job status details.

boolean

$ curl -H 'Content-Type: application/json' -X GET 
https://{apiEndpoint}/v2/batchFlowsJob?flowRef=9d496538-6079-49ff-8911-9964f0333528&expand=true

The following is the 200 response for locating batch flows:

{
  "href": "https://{apiEndpoint}/v2/batchFlowsJob?offset=0&limit=1&expand=true&flowRef=9d496538-6079-49ff-8911-9964f0333528",
  "offset": 0,
  "limit": 1,
  "first": {
    "href": "https://{apiEndpoint}/v2/batchFlowsJob?offset=0&limit=1&expand=true&flowRef=9d496538-6079-49ff-8911-9964f0333528"
  },
  "next": {
    "href": "https://{apiEndpoint}/v2/batchFlowsJob?offset=1&limit=1&expand=true&flowRef=9d496538-6079-49ff-8911-9964f0333528"
  },
  "items": [
    {
      "ref": "ec5b12fc-f70b-4bcc-950e-338bbf41c66e",
      "clientKey": "pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
      "flowRef": "9d496538-6079-49ff-8911-9964f0333528",
      "segmentRef": "5225682b-55c2-404f-852a-e65cf6c05961",
      "datasetDate": 1475017200000,
      "oozieWorkflowId": "0000624-160826091123569-oozie-hado-W",
      "status": "SUCCESS",
      "s3GuestContextPath": "s3://boxever-data-derived-dev-eu-west-1/guest-contexts/2016/09/28/pqsPERS3lw12v5a9rrHPW1c4hET73GxQ/",
      "s3FlowExecutionPath": "s3://boxever-batch-flows-dev-eu-west-1/2016/09/28/pqsPERS3lw12v5a9rrHPW1c4hET73GxQ/9d496538-6079-49ff-8911-9964f0333528/ec5b12fc-f70b-4bcc-950e-338bbf41c66e/",
      "startTime": 1475055599015,
      "numberPartitions": 64,
      "createdAt": 1475055607784,
      "guestContextSize": 213414,
      "segmentSize": 153,
      "modifiedAt": 1475052110900,
      "s3JobStatus": {
        "code": "SUCCESS",
        "yarnApplicationId": "application_1470045793564_4838",
        "batchJobRunId": "ec5b12fc-f70b-4bcc-950e-338bbf41c66e",
        "processed": 2,
        "fired": 2,
        "firedWithOffers": 0,
        "failed": 0
      }
    }
  ]
}

You can expand the collection resource when using the  locate batch flows job function. The following pagination parameters are not supported using the  locate batch flows job function:

  • offset

  • limit