---
title: "Search project file paths and content"
method: POST
path: "/v1/integration/projects/{projectId}/files/search"
tags: ["Unified Project Lifecycle APIs"]
---

# Search project file paths and content

`POST /v1/integration/projects/{projectId}/files/search`

## Request

- Base URL: `https://integration-adapter.connect.cloud.precisely.com`
- URL: `https://integration-adapter.connect.cloud.precisely.com/v1/integration/projects/{projectId}/files/search`
- Auth: HTTP bearer

Searches project file paths and content through the unified project API.

**Features:**
- Supports plain-text, case/word-sensitive, and regular-expression search.
- Restricts scanning with `filesToInclude` glob/exact/regex selectors.

**Use Cases:**
- VS Code extension implements project-wide "Find in Files".
- User locates every reference to a connection name before renaming it.

**Authorization:** Requires `replication-pipeline::view`.

## Path parameters

- `projectId` string, required

## Query parameters

- `projectType` 'REPLICATION' | 'MAINFRAME_REPLICATION' | 'ADVANCED_REPLICATION': Supported project types for unified project operations
- `pipelineId` string

## Request body

- ProjectFileSearchCriteriaRequest: Request payload for searching project file paths and content
  - `searchTerm` string, required: Text or regular expression to search for
  - `matchCase` boolean: When true, the search is case-sensitive
  - `matchWord` boolean: When true, only whole-word matches are returned
  - `regex` boolean: When true, searchTerm is treated as a regular expression
  - `filesToInclude` ProjectFileSearchSelectorRequest[]: Restricts scanning to files matching one of these selectors
    - `kind` 'EXACT' | 'GLOB' | 'REGEX': How the pattern is interpreted: EXACT | GLOB | REGEX
    - `pattern` string: The selector pattern
  - `view` 'CURRENT' | 'COMMITTED': File-tree view to search: CURRENT | COMMITTED
  - `revisionNumber` integer: Optional revision number to search when view is COMMITTED

## Response `200`

Project file search completed

- ProjectFileSearchResultResponse: Result of a project file path and content search
  - `files` ProjectFileSearchResultItem[]: Files containing at least one match
    - `fileId` string: Unique identifier of the file
    - `fileName` string: File name derived from the flattened path
    - `flattenedPath` string: Path of the file within the project's flattened file tree
    - `matches` ProjectFileSearchMatchResponse[]: Matches found within this file
      - `line` integer: One-based line number of the match
      - `startColumn` integer: Zero-based start column of the match
      - `endColumn` integer: Zero-based end column of the match
      - `searchContentResult` string: Matched text or capture result
  - `filesScanned` integer: Total number of files scanned
  - `matchCount` integer: Total number of matches found
  - `filesSkipped` integer: Number of files skipped, for example due to size limits
  - `warnings` ProjectFileSearchWarningResponse[]: Non-fatal warnings encountered while searching
    - `code` string: Machine-readable warning code
    - `message` string: Human-readable warning message
    - `fileId` string: File affected by the warning, when applicable
    - `flattenedPath` string: Path of the file affected by the warning, when applicable
  - `truncated` boolean: Whether results were truncated before completion

## Other responses

- `400`: Bad Request — the search expression is invalid (DI-ADAPTER-PRF-0007), or the resolved project type does not support files (DI-ADAPTER-PRF-0009)
- `401`: Unauthorized
- `403`: Forbidden — requires replication-pipeline::view
- `404`: Not Found — project does not exist (DI-ADAPTER-PRF-0001)
- `500`: Internal Server Error — search failed (DI-ADAPTER-PRF-0002)

---

[API](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service.md) · [All operations](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/llms.txt) · [OpenAPI document](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/revisions/2d2629f4987d?raw)
