Semantics of plugin and theme response fields

Could I get some clarity on the behavior of some of the plugin and theme fields? The 200 responses for the endpoints /v2/sites/environments/{env_id}/themes and /v2/sites/environments/{env_id}/plugins include the fields:

  • status (type: string)
  • version (type: string)
  • update (type: string)
  • update_version (type: string or null)
  • update_status (type: string or null)

I’m assuming status, version, update, and update_version mirror the outputs and constraints of WP CLI’s list subcommand for plugin and theme. What are the constraints and intention behind the update_status field? I’ve seen null and “updated” in practice but I’m not entirely sure about the meaning of these.

Also, I intended on trying some tests around these fields and installed a plugin on one of our managed sites (via WP admin) with the intention of checking the value between various plugin update states but found that the API did not return the plugin in the list for that environment. If this is expected behavior, I’m guessing then that the data the responses are generated from are cached. If that’s the case how often is the cache invalidated and the data updated?

Hi @jacobshu ! :wave: Welcome back.

As far as I am aware, the “null” and “updated” responses are the only ones that will be returned by the update_status field. An updated status response should mean the plugin was recently updated. That being said, I’m asking for clarification from our API developers in case my information is incomplete.

As for the second question, I believe that it’s the same as our MyKinsta Plugins and themes page, which returns data that can be cached for up to 12 hours. However I will check that with my API team as well.