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

# Get Rulepack

> Get a rulepack by its UUID.



## OpenAPI

````yaml https://use.hoop.dev/api/openapiv3.json get /rulepacks/{id}
openapi: 3.0.3
info:
  contact:
    email: help@hoop.dev
    name: Help
    url: https://help.hoop.dev
  description: >-
    Hoop.dev is an access gateway for databases and servers with an API for
    packet manipulation
  license:
    name: MIT
    url: https://opensource.org/license/mit
  termsOfService: https://hoop.dev/docs/legal/tos
  title: Hoop Api
  version: 1.115.0
servers:
  - url: https://use.hoop.dev/api
security: []
tags:
  - description: >
      Hoop implements Oauth2 and OIDC protocol to authenticate users in the
      system. To obtain a valid access token users need to authenticate in their
      own identity provider which is generated as a JSON response to the
      endpoint `http(s)://use.hoop.dev/api/login`. The identity provider them
      redirects the user to the callback endpoint containing the access token.


      The recommended approach of obtaining an access token is by visiting the
      Webapp main's page or using the **Hoop command line**. Example:


      ```sh

      hoop config create --api-url https://use.hoop.dev

      # save the token after authenticating at $HOME/.hoop/config.toml

      hoop login

      # show token information

      hoop config view --raw

      ```


      With an access token you could use any HTTP client to interact with the
      documented endpoints.

      The token must be sent through the `Authorization` header.


      Example:


      ```sh

      # obtain the current configuration of the server

      curl https://use.hoop.dev/api/serverinfo -H "Authorization: Bearer
      $ACCESS_TOKEN"

      ```
    name: Authentication
  - description: >
      Users are active and assigned to the default organization when they
      signup. A user could be set to an inactive state preventing it from
      accessing the platform, however it’s recommended to manage the state of
      users in the identity provider.


      - The `sub` claim is used as the main identifier of the user in the
      platform.

      - The profile of the user is derived from the id_token claims `email` and
      `name`.


      When a user authenticates for the first time, it performs an automatic
      signup that persist the profile claims along with it’s unique identifier.

      ​

      ### Groups


      Groups allows defining who may access or interact with certain resources.


      - For connection resources it’s possible to define which groups has access
      to a specific connection, this is enforced when the Access Control feature
      is enabled.

      - For review resources, it’s possible to define which groups are allowed
      to approve an execution, this is enforced when the Review feature is
      enabled.


      > This resource could be managed manually via Webapp or propagated by the
      identity provider via ID Token. In this mode, groups are sync when a user
      performs a login.


      ### Roles


      - The `admin` group is a special role that grants full access to all
      resources


      This role should be granted to users that are responsible for managing the
      Gateway. All other users are regular, meaning that they can access their
      own resources and interact with connections.
    name: User Management
  - name: Machine Identities
  - description: Routes used to manage and obtain information about the runtime server.
    name: Server Management
  - description: Features available in the gateway. See also **Plugin** resources.
    name: Features
  - description: >-
      Proxy manager endpoints controls how clients connect via gRPC in the
      gateway. These endpoints are meant to be used when a client is initialized
      via `hoop proxy-manager`.
    name: Proxy Manager
  - name: Connections
  - name: Agents
  - name: Runbooks
  - name: Guard Rails
  - name: Reviews
  - name: Sessions
  - name: Organization Management
  - name: Reports
  - description: >
      Security audit log API. Only users in the **admin** group can access these
      endpoints.


      Audit log entries record security-relevant events (who performed an
      action, when, on which resource, and whether it succeeded). Use the list
      endpoint with filters to query by actor, resource type, action, outcome,
      or date range. Results are paginated and ordered by `created_at`
      descending.
    name: Audit Logs
paths:
  /rulepacks/{id}:
    get:
      tags:
        - Rulepacks
      summary: Get Rulepack
      description: Get a rulepack by its UUID.
      parameters:
        - description: Rulepack ID
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.Rulepack'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.HTTPError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.HTTPError'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.HTTPError'
          description: Internal Server Error
components:
  schemas:
    openapi.Rulepack:
      properties:
        connection_names:
          description: >-
            Names of connections this rulepack has been applied to. Populated
            from the

            rulepack attribute's connection junctions; empty when no connections
            are tagged.
          items:
            type: string
          type: array
        created_at:
          description: The time the resource was created
          example: '2024-07-25T15:56:35.317601Z'
          readOnly: true
          type: string
        data_masking_rules:
          description: Data masking rules attached to this rulepack
          items:
            $ref: '#/components/schemas/openapi.DataMaskingRule'
          type: array
        description:
          description: Optional description
          example: Standard PCI controls for production DBs
          type: string
        display_name:
          description: Human-readable display name for the rulepack
          example: PCI Database Access
          type: string
        guardrail_rules:
          description: Guardrail rules attached to this rulepack
          items:
            $ref: '#/components/schemas/openapi.GuardRailRuleResponse'
          type: array
        id:
          description: The resource identifier
          example: 15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7
          format: uuid
          readOnly: true
          type: string
        is_managed:
          description: True for Hoop-managed rulepacks (read-only for users)
          example: false
          readOnly: true
          type: boolean
        org_id:
          description: Organization ID that owns this rulepack
          example: 37EEBC20-D8DF-416B-8AC2-01B6EB456318
          format: uuid
          readOnly: true
          type: string
        tags:
          description: Tags for grouping and filtering rulepacks
          example:
            - pci
            - production
          items:
            type: string
          type: array
        updated_at:
          description: The time the resource was last updated
          example: '2024-07-25T15:56:35.317601Z'
          readOnly: true
          type: string
        version:
          description: Optional version string
          example: 1.0.0
          type: string
      type: object
    openapi.HTTPError:
      properties:
        message:
          example: the error description
          type: string
      type: object
    openapi.DataMaskingRule:
      properties:
        attributes:
          description: Attributes associated with this data masking rule
          example:
            - production
            - pii
          items:
            type: string
          type: array
        connection_ids:
          description: The connections that this rule applies to
          example:
            - 15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7
            - 15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D8
          items:
            type: string
          type: array
        custom_entity_types:
          description: The custom entity types that this rule applies to
          items:
            $ref: '#/components/schemas/openapi.CustomEntityTypesEntry'
          type: array
        description:
          description: The description of the data masking rule
          example: Mask email addresses in the data
          type: string
        id:
          description: The unique identifier of the data masking rule
          example: 15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7
          format: uuid
          type: string
        name:
          description: >-
            The unique name of the data masking rule, it's immutable after
            creation
          example: mask-email
          type: string
        score_threshold:
          description: The minimal detection score threshold for the entities to be masked.
          example: 0.6
          type: number
        supported_entity_types:
          description: The registered entity types that this rule applies to
          items:
            $ref: '#/components/schemas/openapi.SupportedEntityTypesEntry'
          type: array
        updated_at:
          description: The timestamp when the rule was updated
          example: '2023-08-15T14:30:45Z'
          readOnly: true
          type: string
      required:
        - name
      type: object
    openapi.GuardRailRuleResponse:
      properties:
        attributes:
          description: Attributes associated with this guardrail rule
          example:
            - production
            - pii
          items:
            type: string
          type: array
        connection_ids:
          description: List of connection IDs that this guardrail applies to
          example:
            - 15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7
            - 15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D8
          items:
            type: string
          type: array
        created_at:
          description: The time the resource was created
          example: '2024-07-25T15:56:35.317601Z'
          readOnly: true
          type: string
        description:
          description: The rule description
          example: description about this rule
          type: string
        id:
          description: The resource identifier
          example: 15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7
          format: uuid
          readOnly: true
          type: string
        input:
          additionalProperties: {}
          description: "The input rule. Each rule entry accepts an optional \"message\" field that\nis shown to the user when that specific rule is hit.\n\n\t\t{\n\t\t\t\"name\": \"deny-select\",\n\t\t\t\"description\": \"<optional-description>\",\n\t\t\t\"input\": {\n\t\t\t\t\"rules\": [\n\t\t\t\t\t{\"type\": \"deny_words_list\", \"words\": [\"SELECT\"], \"pattern_regex\": \"\", \"name\": \"<optional-name>\", \"message\": \"<optional-message>\"}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"output\": {\n\t\t\t\t\"rules\": [\n\t\t\t\t\t{\"type\": \"pattern_match\", \"words\": [], \"pattern_regex\": \"[A-Z0-9]+\", \"message\": \"<optional-message>\"}\n\t\t\t\t]\n\t\t\t}\n\t\t}"
          type: object
        name:
          description: Unique name for the rule
          example: my-strict-rule
          type: string
        output:
          additionalProperties: {}
          description: "The output rule. Each rule entry accepts an optional \"message\" field that\nis shown to the user when that specific rule is hit.\n\n\t\t{\n\t\t\t\"name\": \"deny-select\",\n\t\t\t\"description\": \"<optional-description>\",\n\t\t\t\"input\": {\n\t\t\t\t\"rules\": [\n\t\t\t\t\t{\"type\": \"deny_words_list\", \"words\": [\"SELECT\"], \"pattern_regex\": \"\", \"name\": \"<optional-name>\", \"message\": \"<optional-message>\"}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"output\": {\n\t\t\t\t\"rules\": [\n\t\t\t\t\t{\"type\": \"pattern_match\", \"words\": [], \"pattern_regex\": \"[A-Z0-9]+\", \"message\": \"<optional-message>\"}\n\t\t\t\t]\n\t\t\t}\n\t\t}"
          type: object
        updated_at:
          description: The time the resource was updated
          example: '2024-07-25T15:56:35.317601Z'
          readOnly: true
          type: string
      type: object
    openapi.CustomEntityTypesEntry:
      properties:
        deny_list:
          description: |-
            List of words to be returned as PII if found.
            Either this or the regex is required
          example:
            - Mr
            - Mr.
            - Mister
          items:
            type: string
          type: array
        name:
          description: The name of the custom entity type as uppercase
          example: ZIP_CODE
          type: string
        regex:
          description: |-
            The regex pattern to match (python) the custom entity type.
            Either this or the deny_list is required
          example: \b\d{5}(?:-\d{4})?\b
          type: string
        score:
          description: >-
            Detection confidence of this pattern (0.01 if very noisy, 0.6-1.0 if
            very specific)
          example: 0.01
          type: number
      required:
        - name
        - score
      type: object
    openapi.SupportedEntityTypesEntry:
      properties:
        entity_types:
          description: The registered entity types in the redact provider
          example:
            - EMAIL_ADDRESS
            - PERSON
            - PHONE_NUMBER
            - IP_ADDRESS
          items:
            type: string
          type: array
        name:
          description: >-
            An identifier for this structure, it's used as an identifier of a
            collection of entities.
          example: PII
          type: string
      type: object

````