> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.botbye.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.botbye.com/_mcp/server.

# find

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

### 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:

``` json
{
  "id": "",
  "limit": 0,
  "periodInSec": 0,
  "name": "",
  "action": "",
  "isActive": true,
  "condition": ""
}

 ```

- `id` (string): The unique identifier of the rule.
    
- `limit` (number): The limit of the rule.
    
- `periodInSec` (number): The period in seconds for the rule.
    
- `name` (string): The name of the rule.
    
- `action` (string): The action associated with the rule.
    
- `isActive` (boolean): Indicates whether the rule is active.
    
- `condition` (string): The condition associated with the rule.

Reference: https://api-docs.botbye.com/bot-bye-api/protection/custom-rules/find

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/{account_id}/projects/{project_id}/rules/{rule_id}:
    get:
      operationId: find
      summary: find
      description: >-
        ### 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:


        ``` json

        {
          "id": "",
          "limit": 0,
          "periodInSec": 0,
          "name": "",
          "action": "",
          "isActive": true,
          "condition": ""
        }

         ```

        - `id` (string): The unique identifier of the rule.
            
        - `limit` (number): The limit of the rule.
            
        - `periodInSec` (number): The period in seconds for the rule.
            
        - `name` (string): The name of the rule.
            
        - `action` (string): The action associated with the rule.
            
        - `isActive` (boolean): Indicates whether the rule is active.
            
        - `condition` (string): The condition associated with the rule.
      tags:
        - subpackage_customRules
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Custom rules_find_Response_200'
servers:
  - url: '{base_url}'
    description: '{base_url}'
components:
  schemas:
    Custom rules_find_Response_200:
      type: object
      properties:
        id:
          type: string
          format: uuid
        limit:
          type: integer
        periodInSec:
          type: integer
        name:
          type: string
        action:
          type: string
        isActive:
          type: boolean
        condition:
          type: string
          format: style
      required:
        - id
        - limit
        - periodInSec
        - name
        - action
        - isActive
        - condition
      title: Custom rules_find_Response_200

```

## Examples



**Response**

```json
{
  "id": "01919a18-c6dc-7036-bb4e-d6d53c3587b5",
  "limit": 888,
  "periodInSec": 5,
  "name": "Tasty Soft Cheese",
  "action": "block",
  "isActive": false,
  "condition": "{\"fieldName\":\"remote_addr\",\"predicate\":\"EQ\",\"value\":\"232.3.158.185\",\"type\":\"criteria\"}"
}
```

**SDK Code**

```python Custom rules_find_example
import requests

url = "https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id"

response = requests.get(url)

print(response.json())
```

```javascript Custom rules_find_example
const url = 'https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Custom rules_find_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Custom rules_find_example
require 'uri'
require 'net/http'

url = URI("https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Custom rules_find_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id")
  .asString();
```

```php Custom rules_find_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id');

echo $response->getBody();
```

```csharp Custom rules_find_example
using RestSharp;

var client = new RestClient("https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Custom rules_find_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://{base_url}/api/v1/account_id/projects/project_id/rules/rule_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```