Search code examples
artifactoryartifactjfrog-cli

API to get artifacts created in last 24 Hrs


I know JFrog provides APIs to fetch the artifacts info like latest build etc. Can some one help by telling if JFrog provides an API to fetch the artifacts created/promoted in last 24 hr / last month etc.

Would like to pull all the artifacts updated in last one month for audit purpose.


Solution

  • You can achieve this functionality using AQL (Artifactory Query Language) and JFrog CLI.

    1. Build an AQL query using RelativeTimeOperators ({"$last" : "30d"} for example).
    2. Create a file spec with the "aql" field.
    3. Use the download command of the CLI and provide the file spec you created with the --spec flag to download the files.

    If you'd like to just get a list of artifacts, you can use the search command.