Skip to content

Delete a rule

DELETE
/v1/apps/{appId}/rules/{ruleId}
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.

appId
required
string

The app’s id, shown in the dashboard (for example ali-sport-goods). demo-store is the public demo app.

Example

demo-store
ruleId
required
string

The rule’s id, from listing or adding it.

Deleted.

Media typeapplication/json
object
deleted
boolean

Example generated

{
"deleted": true
}

The record doesn’t exist (not_found).

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable code.

string
message
required

A human-readable explanation.

string
details

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.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable code.

string
message
required

A human-readable explanation.

string
details

More about the error, such as the validation problems.

Example

{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}
Retry-After
integer

Seconds to wait before retrying. Sent with every 429.

RateLimit
string

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=43
RateLimit-Policy
string

The bucket’s quota q per window of w seconds. Sent on every response.

Example
"search";q=600;w=60
RateLimit-Limit
integer

The requests allowed per window (the older form of RateLimit-Policy).

RateLimit-Remaining
integer

The requests left in the window.

RateLimit-Reset
integer

Seconds until the window resets.