Restore default protection
const url = 'https://api.nsin.ir/domains/example.com/rules/waf/shield/restore';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.nsin.ir/domains/example.com/rules/waf/shield/restore \ --header 'Authorization: Bearer <token>'Re-creates the default NSIN Shield rule after it was deleted, and
clears the “dismissed” mark so the platform keeps it provisioned.
Takes no body. Requires rules.edit and a plan that includes default
protection.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”Shield status after the restore.
State of the domain’s default NSIN Shield rule.
object
The domain’s current plan includes default protection.
A managed shield rule exists for this domain (it may be disabled).
The rule was deleted by the owner and will not be re-created unless restored.
Present, enabled, and shipped to the edge.
The mode a restored rule is created with.
Example
{ "action_mode": "enforce", "default_action_mode": "enforce"}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The domain’s plan does not include default protection.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}No such domain, or your role on it does not permit this operation. The
rules endpoints deliberately answer 404 rather than 403 for an
insufficient role, so they never confirm that a domain exists to someone
who cannot use it.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "not found"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}