Skip to navigation

find

View as Markdown

GET /api/v1/{account_id}/projects/{project_id}/rules/{rule_id}

This endpoint retrieves the details of a specific rule within a project.

Request

No request body parameters are required for this endpoint.

  • base_url (string): The base URL of the API.

  • account_id (string): The unique identifier of the account.

  • project_id (string): The unique identifier of the project.

  • rule_id (string): The unique identifier of the rule.

Response

The response for this request is a JSON object with the following schema:

{
"id": "",
"name": "",
"action": "",
"isActive": true,
"condition": "",
"rulePhase": "PRE_RULE"
}
  • id (string): The unique identifier of the rule.
  • name (string): The name of the rule.
  • action (string): The action the rule applies to a matching request.
  • isActive (boolean): Indicates whether the rule is active.
  • condition (string): The rule’s condition, as a JSON document inside a string.
  • rulePhase (string): PRE_RULE or POST_RULE — whether the rule is evaluated before or after the bot checks.

Accepted permissions Project → Project → Custom rules

Token scope Project View

Authentication

X-Api-Keystring

Personal access token. Create it in your BotBye account under Profile → Personal Access Tokens, tick the scopes the endpoints you call require (see each endpoint’s Token scope), and send the token in the X-Api-Key request header. A token works only for the account it was created in.

Path parameters

account_idstringRequired
project_idstringRequired
rule_idstringRequired

Response headers

Content-Lengthinteger
ConnectionstringOptional

Response

success
idstringformat: "uuid"
namestring
actionstring
isActiveboolean
conditionstringformat: "style"
rulePhaseenum
Allowed values: