Download Cleanup Policy Run Report API

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: This REST API is called to download a CSV report on a cleanup policy run. Platform admins can download run reports for both global cleanup policies and project-specific cleanup policies. This API checks that the username is the project admin for the policyKey received and therefore project admins can download run reports for cleanup policies related to the projects they manage.

Security: Requires a platform admin. A project admin with permission can call this API on the project level.

Usage: GET http://{host:port}/artifactory/api/cleanup/policies/runs/downloadReport?policyKey={policyKey}&runId={runId}

Produces: application/octet-stream

Sample Query:

GET /api/cleanup/policies/runs/downloadReport?policyKey=example-policy&runId=1

Query Parameters:

Field

Type

Description

policyKey

string

The ID that identifies the policy. This ID was configured when creating the policy. You can find the policy ID by calling Get all Cleanup Policies API, searching the results for the appropriate description and then its corresponding ID.

This parameter is mandatory.

runId

integer

An ID that identifies the run. You can get this ID in the Retention Policies Monitoring screen, as explained in View Results of Policy Runs.View Results of Policy Runs

This parameter is mandatory.

Sample Response:

<binary content of the zip file>

Response Codes

Code

Description

200

The request was successful and the response body contains the binary data of the report.

400

One or both of the request parameters are invalid.

403

The user does not have permission to access the report.

404

No report is found for the given policyKey and/or runId.

500

Internal server error.