Delete a rule
const url = 'https://api.shoofai.com/v1/apps/demo-store/rules/example';const options = {method: 'DELETE', headers: {'x-shoof-api-key': '<x-shoof-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.shoofai.com/v1/apps/demo-store/rules/example \ --header 'x-shoof-api-key: <x-shoof-api-key>'Deletes one rule by its id.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The app’s id, shown in the dashboard (for example ali-sport-goods). demo-store is the public demo app.
Example
demo-storeThe rule’s id, from listing or adding it.
Responses
Section titled “Responses”Deleted.
object
Example generated
{ "deleted": true}The record doesn’t exist (not_found).
object
object
A stable, machine-readable code.
A human-readable explanation.
More about the error, such as the validation problems.
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Too many requests in this window (rate_limited). Wait Retry-After seconds, then retry.
object
object
A stable, machine-readable code.
A human-readable explanation.
More about the error, such as the validation problems.
Example
{ "error": { "code": "rate_limited", "message": "Rate limit exceeded" }}Headers
Section titled “Headers”Seconds to wait before retrying. Sent with every 429.
What’s left in the window (IETF draft-ietf-httpapi-ratelimit-headers): the bucket’s name,
r the requests left and t the seconds until the window resets. Sent on every response.
Example
"search";r=597;t=43The bucket’s quota q per window of w seconds. Sent on every response.
Example
"search";q=600;w=60The requests allowed per window (the older form of RateLimit-Policy).
The requests left in the window.
Seconds until the window resets.