Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Operation Support #52

Open
jalcine opened this issue Dec 11, 2022 · 1 comment
Open

Batch Operation Support #52

jalcine opened this issue Dec 11, 2022 · 1 comment

Comments

@jalcine
Copy link

jalcine commented Dec 11, 2022

A note on the Micropub spec highlights the ability to make a set of operations in one go to a Micropub server but not having the ability to get defined results. I'm proposing that we allow for another action for batch operations (like action=batch) that can take in a list of actions under the key "actions" that would be a list of objects mirroring the conventional body for the request for an update. This way, the client can define the order and the Micropub server can indicate at what action a failure occurred (and even consider rolling back, if it supports that).

(Originally published at: https://jacky.wtf/2022/12/5eRK)

@jalcine
Copy link
Author

jalcine commented Dec 11, 2022

The body of the request could look something like:

{
  "action": "batch",
  "actions": [
    {
      "url": "https://jacky.example/post/100",
      "action": "replace",
      "properties": {
         "content": ["hello moon"]
      }
    },
    {
      "url": "https://jacky.example/post/100",
      "action": "delete",
      "properties": {
         "syndication": ["https://closed.service"]
      }
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant