How to delete adherence bulk results

I can see how the adherence results is provided via an s3 link, however I am curious what happens to the results file once it is read. Do I need to issue an API call to delete it from the s3 bucket? If so, I have not seen an API call in the explorer which can be used as such. Additionally how can we see files in s3 which might have been missed programmatically to process? It is my understanding that the only place where we can know of the id for the results is via the initial call to the generation API.

Thanks for reaching out. There is no need to clean up old result files.

The following data retention policies are in effect on the results you asked about:

  1. The link you are provided is only valid for 60 minutes from the time it was created
  2. You can generate a new s3 url to download the data until the job is deleted by simply fetching the job again via GET /api/v2/workforcemanagement/adherence/historical/bulk/jobs/{jobId}
    • Jobs are retained for 24 hours from the time they complete. After this time the result is permanently inaccessible and if you need it again the historical adherence query will need to be re-run
  3. The actual result file is completely deleted automatically by S3 after 14 days per the bucket policy.

Is there a way to have the results of this API call return aggregated by the day rather than running per MUnit per day?

body={"startDate": "2024-06-28T00:00:00","endDate":"2024-06-28T23:59:59"}
post_workforcemanagement_managementunit_historicaladherencequery(MUnit, body=body)

Hi there, based on your second post it seems that you are not using the bulk API which allows multiple MUs, but rather the individual MU route. We had made an assumption that you were using the bulk API based on the title. The API for getting a job from the MU route is instead here: GET /api/v2/workforcemanagement/adherence/historical/jobs/{jobId}

Now for the question from your second post. If I understand you correctly, you are wanting to query multiple days at once, but still have the data at a daily granularity. This is possible with all of the historical adherence APIs. They support a date range of up to 32 days, and the results include values aggregated by day for each user. These individual days are accessed from the dayMetrics field included with each user's results. This field is a list that contains the adherence values for each day in the range of the request for the user. Below is a modified example of your body to show how you could ask for an entire week of data.

body={"startDate": "2024-06-23T00:00:00Z","endDate":"2024-06-30T00:00:00Z"}

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.