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

clarify intent when no components found for REST API

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.12.1
    • Fix Version/s: 3.13.0
    • Component/s: REST
    • Labels:
    • Story Points:
      1

      Description

      The REST call to associate a tag with components may return a 200 status code indicating the operation was successful, but the response body may not contain any components the tag was associated with.

      {
        "status": 200,
        "message": "Association successful",
        "data":

      {     "components associated": []   }

      }

      One user of the REST API was confused by this. Their usage pattern was:

      1. create tag - 204
      2. associate tag with components - 200
      3. move components with tag - 404

      At step 2, the status code implies some components were associated with the tag, when in fact there were no components found matching the criteria submitted.

      The script moved to step 3 and failed curiously because there were no components fou d with the tag applied in step 2.

      So while the API seems to be acting as designed, there may be a slight disconnect between tagging and staging here.

      Expected

      Clarify why the associate tag API returns 200 status code even though no components VS the staging move API which returns 404 for no components.

      Add this type of caveat or clarity to our documentation.

        Attachments

          Activity

            People

            Assignee:
            KWright Kristofer Wright [X] (Inactive)
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch Peter Lynch
            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