forked from kurrent-io/KurrentDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Http HardDelete
Dan Leech edited this page Dec 16, 2014
·
4 revisions
This wiki is no longer maintained and should not be used. Read the Event Store docs at docs.geteventstore.com.
The latest version of the page you are currently viewing is available here.
The ES-HardDelete header controls the way to delete a stream. By default the Event Store will soft delete a stream allowing that stream to later be reused. If you set the ES-HardDelete header the stream will be permanently deleted.
ouro@ouroboros$ curl -v -X DELETE http://127.0.0.1:2113/streams/foo2 -H "ES-HardDelete:true"
HTTP/1.1 204 Stream deleted
Content-Length: 0
Content-Type: text/plain; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Access-Control-Allow-Methods: POST, DELETE, GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-Requested-With, X-PINGOTHER, Authorization
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Location
Date: Thu, 13 Mar 2014 20:56:55 GMTThis changes the general behaviour from returning a 404 and being recreatable to having the stream now return 410 GONE forever.
ouro@ouroboros$ curl -i http://127.0.0.1:2113/streams/foo2
HTTP/1.1 410 Deleted
Content-Length: 0
Content-Type: text/plain; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Access-Control-Allow-Methods: POST, DELETE, GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, X-Requested-With, X-PINGOTHER, Autho
rization
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Location
Date: Thu, 13 Mar 2014 20:57:01 GMT