Cancel a background response
POST
/responses/{response_id}/cancel
const url = 'https://api.katara.com/v1/responses/example/cancel';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.katara.com/v1/responses/example/cancel \ --header 'Authorization: Bearer <token>'A background request runs to completion before it is answered, so no stored response is ever still running. A stored one is refused with response_not_cancellable, under the same rule as reading it.
Authorizations
Section titled “Authorizations”- bearerAuth
- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”response_id
required
string
The id of a stored response.
Responses
Section titled “Responses”The response has already finished (response_not_cancellable, param null).
Media typeapplication/json
object
error
required
object
type
string
code
required
Stable error code.
string
message
required
Explanation for the caller.
string
param
string | null
Examplegenerated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}The response is missing, expired, deleted or someone else’s (response_not_found).
Media typeapplication/json
object
error
required
object
type
string
code
required
Stable error code.
string
message
required
Explanation for the caller.
string
param
string | null
Examplegenerated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}