Delete a story
DELETE
/api/stories/{story_id}
const url = 'http://127.0.0.1:8765/api/stories/example?revision=1&actor=operator';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'http://127.0.0.1:8765/api/stories/example?revision=1&actor=operator'Remove a story. Send Content-Type: application/json like every write (no body is read). The story is never listed, searched or sent to a model again.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”story_id
required
string
A story’s id (e.g. story:60_acme_ci_cut_time). Percent-encode it in the path.
Query Parameters
Section titled “Query Parameters”revision
required
integer
The revision of the story you read; when it changed since, the reply is 409.
actor
string
Who writes.
Responses
Section titled “Responses”Success.
Media typeapplication/json
object
schema_version
required
key
additional properties
any
Example
{ "deleted": "story:60_acme_ci_cut_time", "schema_version": "scout-stories-response:1"}Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).
Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Not_found, target_unavailable
Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{ "error": { "code": "not_found", "message": "..." }}Revision_conflict
Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{ "error": { "code": "revision_conflict", "message": "..." }}Unsupported_media_type: writes need Content-Type: application/json.
Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Unknown_key, invalid_value
Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{ "error": { "code": "unknown_key", "message": "..." }}