Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-1473

firm up behavior around empty lists vs 404s for nonexistent data

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 3.0.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      PuppetDB 2015-06-03, PuppetDB 2015-06-17

      Description

      The console UI team needs to be able to differentiate between "nonexistent node" and "no data for existing node" when they issue the query

      curl -X GET http://localhost:8080/v4/nodes/fakenode/facts
      

      Talking with, Russell Mull I think we reached the following proposal:

      Our shorthand endpoints follow the pattern
      /<endpoint>/<identifier>/<subselect>/...

      If the result of filtering <endpoint> to all values matching <identifier> is an empty list, then /<endpoint>/<identifier> and any children thereof should 404.

      If the result of filtering <endpoint> to all values matching <identifier> is nonempty, then all children should be lists, empty or not.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                wyatt Wyatt Alt
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: