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

# Search

> Invokes the c1.api.hooks.v1.HooksSearch.Search method.



## OpenAPI

````yaml https://spec.speakeasy.com/conductor-one/conductorone/my-source-with-code-samples post /api/v1/search/hooks
openapi: 3.1.0
info:
  description: The C1 API is a HTTP API for managing C1 resources.
  title: C1 API
  version: 0.1.0-alpha
servers:
  - description: The C1 API server for the current tenant.
    url: https://{tenantDomain}.conductor.one
    variables:
      tenantDomain:
        default: example
        description: The domain of the tenant to use for this request.
security:
  - bearerAuth: []
    oauth: []
paths:
  /api/v1/search/hooks:
    post:
      tags:
        - Hook
      summary: Search
      description: Invokes the c1.api.hooks.v1.HooksSearch.Search method.
      operationId: c1.api.hooks.v1.HooksSearch.Search
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/c1.api.hooks.v1.HooksSearchRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/c1.api.hooks.v1.HooksSearchResponse'
          description: Successful response
      x-codeSamples:
        - lang: go
          label: Search
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/conductorone/conductorone-sdk-go/pkg/models/shared\"\n\tconductoronesdkgo \"github.com/conductorone/conductorone-sdk-go\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := conductoronesdkgo.New(\n        conductoronesdkgo.WithSecurity(shared.Security{\n            BearerAuth: \"<YOUR_BEARER_TOKEN_HERE>\",\n            Oauth: \"<YOUR_OAUTH_HERE>\",\n        }),\n    )\n\n    res, err := s.HooksSearch.Search(ctx, nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.HooksSearchResponse != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: >-
            import { ConductoroneSDKTypescript } from
            "conductorone-sdk-typescript";


            const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
              security: {
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
                oauth: "<YOUR_OAUTH_HERE>",
              },
            });


            async function run() {
              const result = await conductoroneSDKTypescript.hooksSearch.search();

              console.log(result);
            }


            run();
components:
  schemas:
    c1.api.hooks.v1.HooksSearchRequest:
      description: The HooksSearchRequest message.
      properties:
        pageSize:
          description: The pageSize field.
          format: int32
          readOnly: false
          type: integer
        pageToken:
          description: The pageToken field.
          readOnly: false
          type: string
        query:
          description: The query field.
          readOnly: false
          type: string
        refs:
          description: The refs field.
          items:
            $ref: '#/components/schemas/c1.api.hooks.v1.HookRef'
          nullable: true
          readOnly: false
          type: array
      title: Hooks Search Request
      type: object
      x-speakeasy-name-override: HooksSearchRequest
    c1.api.hooks.v1.HooksSearchResponse:
      description: The HooksSearchResponse message.
      properties:
        list:
          description: The list field.
          items:
            $ref: '#/components/schemas/c1.api.hooks.v1.Hook'
          nullable: true
          readOnly: false
          type: array
        nextPageToken:
          description: The nextPageToken field.
          readOnly: false
          type: string
      title: Hooks Search Response
      type: object
      x-speakeasy-name-override: HooksSearchResponse
    c1.api.hooks.v1.HookRef:
      description: The HookRef message.
      properties:
        id:
          description: The id field.
          readOnly: false
          type: string
      title: Hook Ref
      type: object
      x-speakeasy-name-override: HookRef
    c1.api.hooks.v1.Hook:
      description: >
        Hook represents a customer-configured interception point for tool calls.


        This message contains a oneof named hook_type. Only a single field of
        the following list may be set at a time:
          - function
          - builtinPattern
      properties:
        builtinPattern:
          $ref: '#/components/schemas/c1.api.hooks.v1.BuiltInPattern'
        createdAt:
          format: date-time
          readOnly: true
          type: string
        description:
          description: The description field.
          readOnly: false
          type: string
        displayName:
          description: The displayName field.
          readOnly: false
          type: string
        enabled:
          description: The enabled field.
          readOnly: false
          type: boolean
        event:
          description: The event field.
          enum:
            - HOOK_EVENT_TYPE_UNSPECIFIED
            - HOOK_EVENT_TYPE_PRE_TOOL_USE
            - HOOK_EVENT_TYPE_POST_TOOL_USE
          readOnly: false
          type: string
          x-speakeasy-unknown-values: allow
        filter:
          $ref: '#/components/schemas/c1.api.hooks.v1.HookFilter'
        function:
          $ref: '#/components/schemas/c1.api.hooks.v1.HookFunctionRef'
        id:
          description: The id field.
          readOnly: false
          type: string
        priority:
          description: The priority field.
          format: int32
          readOnly: false
          type: integer
        updatedAt:
          format: date-time
          readOnly: true
          type: string
      title: Hook
      type: object
      x-speakeasy-name-override: Hook
    c1.api.hooks.v1.BuiltInPattern:
      description: >
        BuiltInPattern references a ConductorOne-maintained DLP pattern.
         The specific pattern and its configuration are encoded as a oneof.

        This message contains a oneof named config. Only a single field of the
        following list may be set at a time:
          - piiRedaction
          - creditCardBlocking
          - queryScopeLimit
          - writeAuthorization
          - sensitiveFileGuard
      nullable: true
      properties:
        creditCardBlocking:
          $ref: '#/components/schemas/c1.api.hooks.v1.CreditCardBlockingConfig'
        piiRedaction:
          $ref: '#/components/schemas/c1.api.hooks.v1.PIIRedactionConfig'
        queryScopeLimit:
          $ref: '#/components/schemas/c1.api.hooks.v1.QueryScopeLimitConfig'
        sensitiveFileGuard:
          $ref: '#/components/schemas/c1.api.hooks.v1.SensitiveFileGuardConfig'
        writeAuthorization:
          $ref: '#/components/schemas/c1.api.hooks.v1.WriteAuthorizationConfig'
      title: Built In Pattern
      type: object
      x-speakeasy-name-override: BuiltInPattern
    c1.api.hooks.v1.HookFilter:
      description: HookFilter determines which tool calls a hook applies to.
      properties:
        celExpression:
          description: |-
            CEL expression evaluated against tool call context.
             Available variable: ctx.tool_name (string).
             Must evaluate to bool. Empty matches all tools.
          readOnly: false
          type: string
      title: Hook Filter
      type: object
      x-speakeasy-name-override: HookFilter
    c1.api.hooks.v1.HookFunctionRef:
      description: HookFunctionRef identifies a customer-authored function to invoke.
      nullable: true
      properties:
        commitId:
          description: >-
            If empty, the function's published commit is used at invocation
            time.
          readOnly: false
          type: string
        functionId:
          description: The functionId field.
          readOnly: false
          type: string
      title: Hook Function Ref
      type: object
      x-speakeasy-name-override: HookFunctionRef
    c1.api.hooks.v1.CreditCardBlockingConfig:
      description: |-
        CreditCardBlockingConfig denies any tool call whose output contains a
         Luhn-valid credit card number. No configuration fields today; the
         presence of the oneof arm is the whole configuration.
      nullable: true
      title: Credit Card Blocking Config
      type: object
      x-speakeasy-name-override: CreditCardBlockingConfig
    c1.api.hooks.v1.PIIRedactionConfig:
      description: >-
        PIIRedactionConfig configures post-tool-use redaction of sensitive
        fields.
      nullable: true
      properties:
        redactFields:
          description: The redactFields field.
          items:
            type: string
          nullable: true
          readOnly: false
          type: array
        replacement:
          description: The replacement field.
          readOnly: false
          type: string
      title: Pii Redaction Config
      type: object
      x-speakeasy-name-override: PIIRedactionConfig
    c1.api.hooks.v1.QueryScopeLimitConfig:
      description: >-
        QueryScopeLimitConfig caps numeric fields (e.g. limit, page_size) in
        tool
         input so callers cannot request unbounded data.
      nullable: true
      properties:
        fields:
          description: The fields field.
          items:
            type: string
          nullable: true
          readOnly: false
          type: array
        maxLimit:
          description: The maxLimit field.
          format: int32
          readOnly: false
          type: integer
      title: Query Scope Limit Config
      type: object
      x-speakeasy-name-override: QueryScopeLimitConfig
    c1.api.hooks.v1.SensitiveFileGuardConfig:
      description: |-
        SensitiveFileGuardConfig blocks tool calls that reference sensitive file
         paths or directories.
      nullable: true
      properties:
        blockedDirectories:
          description: The blockedDirectories field.
          items:
            type: string
          nullable: true
          readOnly: false
          type: array
        blockedPatterns:
          description: The blockedPatterns field.
          items:
            type: string
          nullable: true
          readOnly: false
          type: array
      title: Sensitive File Guard Config
      type: object
      x-speakeasy-name-override: SensitiveFileGuardConfig
    c1.api.hooks.v1.WriteAuthorizationConfig:
      description: >-
        WriteAuthorizationConfig blocks tool calls whose ToolClassification is
        in
         blocked_classifications, optionally permitting them within business hours.
      nullable: true
      properties:
        blockedClassifications:
          description: |-
            Tool classifications to block. Must have at least one entry; a hook
             with no blocked classifications would be a silent misconfiguration.
          items:
            enum:
              - TOOL_CLASSIFICATION_UNSPECIFIED
              - TOOL_CLASSIFICATION_READ
              - TOOL_CLASSIFICATION_WRITE
              - TOOL_CLASSIFICATION_DESTRUCTIVE
              - TOOL_CLASSIFICATION_SENSITIVE
              - TOOL_CLASSIFICATION_DANGEROUS
            type: string
            x-speakeasy-unknown-values: allow
          nullable: true
          readOnly: false
          type: array
        businessHours:
          $ref: '#/components/schemas/c1.api.hooks.v1.BusinessHours'
      title: Write Authorization Config
      type: object
      x-speakeasy-name-override: WriteAuthorizationConfig
    c1.api.hooks.v1.BusinessHours:
      description: BusinessHours defines a weekly time window in a specific timezone.
      properties:
        days:
          description: 0=Sun, 1=Mon, ..., 6=Sat.
          items:
            format: int32
            type: integer
          nullable: true
          readOnly: false
          type: array
        end:
          description: '"HH:MM" in 24-hour format.'
          readOnly: false
          type: string
        start:
          description: '"HH:MM" in 24-hour format.'
          readOnly: false
          type: string
        timezone:
          description: The timezone field.
          readOnly: false
          type: string
      title: Business Hours
      type: object
      x-speakeasy-name-override: BusinessHours
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http
    oauth:
      description: >-
        This API uses OAuth2 with the Client Credential flow.

        Client Credentials must be sent in the BODY, not the headers.

        For an example of how to implement this, refer to the
        [c1TokenSource.Token()](https://github.com/ConductorOne/conductorone-sdk-go/blob/3375fe7c0126d17e7ec4e711693dee7b791023aa/token_source.go#L101-L187)
        function.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /auth/v1/token
      type: oauth2

````