Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-11902

REST Asset Search & Download Resource

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.7.0
    • Component/s: REST
    • Labels:
      None

      Description

      Background
      This feature serves as a handy bridge between searching for things and downloading them. Having a download sub-resource means that clients can make simple HTTP calls for artifacts that may or may not exist, and download them without parsing any JSON.

      Acceptance

      • This sub-resource builds on NEXUS-14603 (asset search json api), but returns:
        • A 302 redirect to download the asset bytes
          • Rationale: This has the benefit of leaving a trail in build tools' logs that explains what specific artifact was suggested as the thing to download (e.g. in the case of a "latest" search), rather than simply returning bytes.
          • It's fine to reuse existing format-specific content-serving endpoints, if that's expedient (as with the asset download sub-resource)
        • If there are no search results, HTTP 404
        • If the search isn't sufficiently precise to pick a winning asset (i.e. there's no sort order and there's more than one search result), then we should return HTTP 400 (client error)
        • Request logs should make it easy to tell whether users were searching for content vs. trying to download content (e.g. because downloading is a sub-endpoint or uses a 'download' param or whatever)

      Questions/Notes

      • Partial fetch/HEAD support is of course desirable, but that will be handled by the format-specific content bytes endpoint

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mprescott Michael Prescott
              Last Updated By:
              Jeremy Bryan
              Team:
              Nexus - Core
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title