In our system an article(title, description) can be created, updated an drafted.
- create - put
- update - post
- draft - ???
How to draft an article in REST?
In our system an article(title, description) can be created, updated an drafted.
How to draft an article in REST?
If your REST api uses for example JSON, you could just have a draft
flag on the article that can be true
or false
. Or a published
flag that is true
or false
.
As @Evert said, you can just use an attribute on the resource itself.
Or you could make the draft into a separate resource, which you can create, update and delete. When you promote the draft into an article, you could have the GET on that resource return an HTTP 301 Moved permanently
.
It kind of depends on what workflow you want to support.