========================
Artifact download report
========================

Download an artifact report if you need to know which of your users are downloading packages, what those packages are, what CVEs are associated with those packages, and when it was downloaded.

To download an artifact report:

#. Log in to Package Security Manager. 
#. Select |info-circle| **System** from the left-hand navigation.
#. Click **Artifact Report Download**. 

   .. thumbnail:: ../img/as_artifact_download_report.png
       :align: center

#. Enter a date range for your artifact report.

   .. note:: 

       The maximum range is one year. 

#. Select a format for your report output. Available outputs are ``.csv`` and ``.json``.
#. If necessary, specify a channel for your report. 
#. If necessary, specify a user for your report. 

   .. note:: 
       
       Leave these fields empty to download a report for all channels and all users. 

#. Click **Download**. 

You will receive a file that you can import into your preferred data editor to view.

Obtaining additional metrics
============================

To include information about environment, hostname, and host username in your artifact report, your end users must install the ``anaconda-ident`` package in their base conda environment, then configure it to provide this information. Please reach out to your Technical Account Manager (TAM) or Anaconda support group for assistance with installing and configuring the ``anaconda-ident`` package. For more information on how ``anaconda-ident`` works, see the package's `public Readme on GitHub <https://github.com/anaconda/anaconda-ident/blob/main/README.md>`_.

.. note:: 

    This additional information is currently only available for reporting on conda packages.

Downloading the report using the CLI
====================================

If you want to download your artifact report using the CLI, see :ref:`Package Security Manager CLI <cli_artifact_download>`.

Downloading the report using the API
====================================

You can also use the API to perform the artifact report download. 

.. code-block:: none
    
    GET api/reports/artifact_download

.. |info-circle| raw:: html

      <svg class="inline" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 512 512"><path d="M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448zm0 480A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM208 352c-8.8 0-16 7.2-16 16s7.2 16 16 16h96c8.8 0 16-7.2 16-16s-7.2-16-16-16H272V240c0-8.8-7.2-16-16-16H216c-8.8 0-16 7.2-16 16s7.2 16 16 16h24v96H208zm48-168a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"/></svg>
