Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-2969

API - fetch (POST) snapshots for content_templates

      Goal: 

      To add the following API:

      POST /snapshots/for_date/ 

      Body

      {     repository_uuids: ['abcde'],    Date: “2023-01-01” }

      Response: 

       

       [
         {
            Repository_uuid: "abcde"   
            is_after: true,
            match: { SNAPHOT_JSON    }     
         }  
      ]
      

       

       

      For use to fetch the nearest snapshots in the below UI (there will be a table for those snapshots out of date range, range tbd).

      For example, if i request  August 1st, if there is a snapshot prior to or on August 1st 23:59 UTC, i would get that and is_after would be false.

      If the only available snapshot is after August 1st (for example August 3rd), i would get the earliest snapshot, and is_after would be true.

      If there are no snapshots,  match would be nil, is_after would be false

       

      Original Design Document

      Acceptance Criteria:

      • POST /snapshots/ 
      • Test coverage for route (Handler/Dao)

       

       

      The intended purpose of this is to be used by image builder to fetch a list of repositories (snapshots) to use when building an image based on repos and a date selected by the user, and to provide a warning if a repo has no snapshots on or before that date.

      It will also by used by the wizard for creating a content template

            rhn-engineering-adewar Andrew Dewar
            rhn-engineering-adewar Andrew Dewar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: