So, for services, I’m in a bit of a quandary. We’re wanting to expose start, stop, etc., of services (daemons) that are apps in snaps. That is, we’re letting clients the , where there’s a clear hierarchical path to those nouns (they’re an app inside a snap, after all). So one naive way of doing this would be to expose /snaps/<snap>/<app>, POSTing something like {"action": "stop"} to it to get what we want. This matches what you do when managing a single snap, e.g. you POST to /snaps/<snap> with {"action": "install"}, etc.
However, we’ve learned that we also want to support operating on multiple snaps at a time (more common for remove than for install, but still), so we’ve added POSTing directly to /snaps/ with {"action": "x", "snaps": ["foo","bar", ...]}.
Further, the way the user would specify starting/stopping services lends itself well to supporting doing it for multiple, that is: there’s no real reason not to support snap (status|logs|start|stop|enable|disable) [snap[.app]] .... But POSTing snap.app at /snaps seems to me to be bending things rather far (and making status and logs be a POST just feels strange).
Which means I’m leaning heavily towards having a /services endpoint. What do you think?