Get Archive Policy Status

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

Description: Returns the status of an archive policy based on the specified duration and policy key.

Note

This Cold Storage feature is available only for Artifactory Enterprise and Enterprise+ users.

Usage:GET /api/retention/archive/executions

Since: Artifactory 7.27.3

Security: Requires an admin user

Usage: GET /api/retention/archive/executions?from=<number>&to=<number>&searchStr=<searchByPolicyKey>

Produces: application/json

URL Parameters:

Parameters

Type

Description

Required/Optional

from

string

The date range (in epoch format) for the archive status.

Optional

to

string

searchStr

string

Get the status for a specific policy.

Optional

Sample Request:

GET /api/retention/archive/executions

Sample Response:

Note

In the API response, the last execution is displayed on top.

[{
        "state”: "COMPLETE",
        "completedNumberOfArtifacts": 1,
        "failedNumberOfArtifacts": 0,
        "totalNumberOfArtifacts": 1,
        "progressPercentaqe": 100,
        "startTime": 16Z3Ï80000018,
        "finishTime": 16Z37800004Z5,
        "totalByteSize": 9811,
        "successByteSize": 9811,
        "failureByteSize": 0,
},
{
        "state": "COMPLETE",
        "completedNumberOfArtifacts": 10,
        "failedNumberOfArtifacts": 0,
        "totalNumberOfArtifacts": 10,
        "progressPercentage": 100,
        "startTime": 16Z37672381Z9,
        "finishTime": 1623767Z38985,
        "totalByteSize": 884964,
        "successByteSize": 884964,
        "failureByteSize": 0,
},…]

The response displays the following information:

Property

Description

policyKey

Unique policy key that identifies the policy.

lastRunStatus

Shows the status of the last policy run. It can be one of the following:

  • PENDING: The policy has never been executed.

  • IN_PROGRESS: The policy execution is in progress.

  • IN_PROGRESS_WITH_ERRORS: The policy execution is in progress but encountered one or more errors.

  • COMPLETE: The policy executed successfully without any errors.

  • COMPLETE_WITH_ERRORS: The policy executed, but encountered one or more errors.

  • FAILED: The policy execution failed.

totalNumberOfArtifacts

Total number of artifacts to be archived.

Note

This number is not calculated at the beginning of the archive process. However, based on the number of artifacts being archived, this number increments as the archive process progresses.

completedNumberOfArtifacts

Total number of artifacts that were archived.

failedNumberOfArtifacts

Total number of artifacts that could not be archived.

progressPercentage

The progress of the policy (in percentage).

startTime

Time when the policy started executing. Value is in Unix epoch time in milliseconds.

finishTime

Time when the policy finished executing. Value is in Unix epoch time in milliseconds.

totalByteSize

The total size of the artifacts included in the policy.

successByteSize

The size of the artifacts that were archived.

failureByteSize

The size of the artifacts that couldn't be archived.

Status:

200: Success