Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

/core resource #1500

Description

@pento

I'd like to propose a /core resource, which gives some information about the WordPress install, and a way to manage core and language pack updates.

Here's a brief outline of the endpoints:

GET /core

  • No parameters
  • Return
    • WordPress version
    • Default language

GET /core/updates

While the W.org API returns much more info about available downloads, I don't think it's necessary to include that here, as there's nothing the UA could do with it. If they did need that information for some unknown reason, it's easy enough for them to call the W.org API directly.

  • No parameters
  • Return
    • List of core updates available
      • Update version
      • major/minor flag
    • List of language pack updates available
      • language
      • core/plugin/theme flag

PUT /core/updates

  • Parameters
    • List of updates to install
      • type: core, language pack, DB
      • version (core only)
      • language (language pack only)
      • core/theme/plugin flag (language pack only)
  • Return
    • List of updates installed
      • For core updates, whether there needs to be a DB update
    • Errors for failed updates

As minor core updates and language packs are installed automatically, it's likely that the update will have occurred by the time /core/updates is called. The UA should be prepared to handle this.

This is a starting point for the discussion on this resource.

  • Are there other endpoints we'll need?
  • Are these the correct verbs? Do we need more information returned by these endpoints?
  • Given the likelihood of these endpoints causing maintenance mode, do we need to be reminding UAs how to handle that situation?

Activity

  1. danielbachhuber commented on Aug 24, 2015

    @danielbachhuber
    Member

    I'd like to propose a /core resource, which gives some information about the WordPress install, and a way to manage core and language pack updates.

    How do you see this in relationship to /site?

  2. pento commented on Aug 24, 2015

    @pento
    MemberAuthor

    WP.com /sites? I forgot about that. :-)

    I'm cool with making this a /sites compatible thing, with the addition of an endpoint to actually do the updates.

    I think WP.com has some private endpoints for doing updates (via Jetpack), but I don't know that we need to be compatible with that.

  3. pento commented on Aug 29, 2015

    @pento
    MemberAuthor

    Working on an implementation of this here: https://github.com/WP-API/WP-API/tree/1500-site-endpoint

  4. added this to the 2.0 milestone on Sep 18, 2015
  5. lukecarbis commented on Nov 7, 2015

    @lukecarbis

    @pento How's this going? Need a hand?

  6. pento commented on Nov 7, 2015

    @pento
    MemberAuthor

    Most of my current projects have had to take a back seat recently, unfortunately. a8c meetup, a handful of internal projects, and my WCUS talk took priority.

    Depending on WCUS and 4.4 priority, I may be able to may some progress later in the month, otherwise it probably won't be until mid-December.

    If you have opinions, then you're absolutely welcome to either ping me to chat more, or make a PR for the branch.

  7. modified the milestones: 2.0, 2.1 on Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions