Skip to content

iOS/iPad VPP auto-updates: DB and API updates #35454

@sgress454

Description

@sgress454

Related user story

#33391

Task

This task is to implement the API and database changes needed to store software auto-update configuration.

DB changes (proposed)

  • New table software_update_schedules
    • title_id -> int
    • team_id -> int
    • enabled -> boolean
    • start_time -> string / datetime / however we usually store "time of day"
    • end_time -> string / datetime / however we usually store "time of day"
  • New column/table for hosts timezone (which can be obtained from DeviceInformation.TimeZone).

NOTE: Please consult with #g-software on new DB tables/columns!

API changes

#37469

  • PATCH /api/v1/fleet/software/titles/:title_id/app_store_app
    • Accept auto_update_enabled (boolean) field.
    • Accept auto_update_window_start (string) field.
    • Accept auto_update_window_end (string) field.
    • Upsert to software_update_schedules.
    • (There's a separate task for generating the activity.)
    • API should check minimum window duration of 60 minutes (return bad request if so).
  • GET /api/v1/fleet/software/titles/:title_id
    • For iOS/iPadOS VPP apps only, return app_store_app.auto_update_enabled and app_store_app.auto_update_window_start and app_store_app.auto_update_window_end.

Condition of satisfaction

  • A PATCH request to /api/v1/fleet/software/titles/:title_id/app_store_app should successfully add a new row to software_update_schedules if no auto-update has been configured for the title before
  • A PATCH request to /api/v1/fleet/software/titles/:title_id/app_store_app should update an existing row in software_update_schedules if an auto-update has been configured for the title before
  • A GET request to GET /api/v1/fleet/software/titles/:title_id for an iOS/iPadOS VPP title should return auto-update config in the app_store_app object
  • A GET request to GET /api/v1/fleet/software/titles/:title_id for any other kind of software title should not return auto-update config at all.

Metadata

Metadata

Assignees

Labels

#g-orchestrationOrchestration product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.~sub-taskA technical sub-task that is part of a story. (Not QA'd. Not estimated.)

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions