> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get rule test fields

> Return the fields available for testing one saved rule.

Returns the test fields Fini derives from one saved rule. Use this to build a rule test form or validate which fields are required before running an evaluation.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `read` scope.
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  Rule ID.
</ParamField>

## Response

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public' \
    --header 'Authorization: Bearer fini_your_api_key'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public', {
    method: 'GET',
    headers: {
      Authorization: 'Bearer fini_your_api_key'
    }
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/test-fields/public",
      headers={"Authorization": "Bearer fini_your_api_key"},
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "contextFields": [
      {
        "path": "message.text",
        "dataType": "string"
      },
      {
        "path": "user.email",
        "dataType": "string"
      }
    ],
    "operatorTypes": [
      "==",
      "!=",
      "contains"
    ],
    "quantifierTypes": [
      "ANY",
      "ALL",
      "NONE"
    ]
  }
  ```
</ResponseExample>

Returns an array of test field definitions.
