# Help Perforce — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access detailed documentation and reference materials for Perforce Helix Core commands, including command syntax, client configuration options, form fields, and system configurables. Search through the complete P4 command reference to find specific commands, view their parameters, and understand client submission and line ending options.

**Category:** Developer Tools | **Website:** [help.perforce.com/](https://help.perforce.com/) | **Docs:** [parse.bot/marketplace/c2ec7d39-4890-4306-b9a4-301307e00285/help-perforce-com-api](https://parse.bot/marketplace/c2ec7d39-4890-4306-b9a4-301307e00285/help-perforce-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_client_form_fields

Extracts all form field definitions from the p4 client spec documentation. Each field includes a type hint inferred from the description text.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_client_form_fields \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_client_line_end_options

Extracts all LineEnd field values from the p4 client documentation. These control how line endings are handled for files in the workspace.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_client_line_end_options \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_client_options_field

Returns all valid values for the Options field of a p4 client spec, including both affirmative and negated ([no]-prefixed) variants, along with their descriptions and defaults.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_client_options_field \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_client_page

Fetches the full p4 client command reference page including syntax, description, form fields, options, and examples. Returns comprehensive data about the client workspace specification.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_client_page \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_client_submit_options

Extracts all SubmitOptions field values from the p4 client documentation. These control what happens to unchanged files during a submit operation.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_client_submit_options \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_command_page

Fetches the documentation page for a specific p4 command. Returns syntax, description, options, usage notes, and examples. The command_name is normalized to a file path internally.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `command_name` | string | Yes | Command name such as 'p4 sync', 'p4 add', 'p4 client'. Can also be specified without the 'p4' prefix (e.g. 'sync'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_command_page \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command_name":"<string>"}'
```

### get_command_reference_index

Fetches the alphabetical command reference index page. Returns all p4 commands with their documentation URLs. The full index is returned in a single response with no pagination.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_command_reference_index \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_configurables_reference

Fetches the Configurables reference section of the P4 CLI documentation. Returns all server/client/proxy configurables with their defaults and descriptions.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/get_configurables_reference \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_documentation

Searches the P4 CLI documentation using the client-side search index. Performs a token-based match where all space-separated words in the query must appear in the title or abstract of a topic. Searches the first 3 index chunks; results may not cover all documentation pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword or phrase. All space-separated tokens must appear in a topics title or abstract to match. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-help-perforce-com-api-c2ec7d39/search_documentation \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
