---
title: "Command Line API"
manual: "Interest"
version: "4.1"
source: "Implementing/Cli/Index.rst"
rendered: "2026-09-18T11:09:59+00:00"
---

# Command Line API {#implementing-cli}

-   [Authentication](#authentication)
-   [Common options](#common-options)
-   [Available commands/endpoints](#available-commands-endpoints)

## Authentication {#implementing-cli-authentication}

Operations performed using the CLI endpoints are all authenticated using the
default `_cli_` backend user.

## Common options {#implementing-cli-commonoptions}

Some commands share CLI options. These are explained here.

-   **-b | --batch**

    -   *Name:* `--batch`
    -   *Shortcut:* `-b`
    -   *Type:* boolean

    Enables batch operations. The `REMOTE_ID` argument will be ignored, but has
    to be set to some string to avoid errors.

    With this option enabled, the data JSON string's first level is an array of
    record data with the key set to the record's remote ID.

    ```bash
    typo3 interest:create pages ignoredRemoteId --batch --data='{"newPage1":{"title":"Test Name","pid":"siteRootPage"},"newPage2":{...}}'
    ```

-   **-d | --data**

    -   *Name:* `--data`
    -   *Shortcut:* `-d`
    -   *Type:* JSON string

    Record data as a JSON string. This string can also be piped in.

    ```bash
    # These commands have identical results.

    typo3 interest:create ... --data='{"title":"Test Name","pid":"siteRootPage"}'

    echo -n '{"title":"Test Name","pid":"siteRootPage"}' | typo3 interest:create ...
    ```

-   **--disableReferenceIndex**

    -   *Name:* `--disableReferenceIndex`
    -   *Shortcut:* *none*
    -   *Type:* Boolean

    Disable updating the reference index during the request. This has a positive
    performance impact. You can (and should) reindex the reference index manually
    afterwards.

    ```bash
    typo3 interest:create ... --disableReferenceIndex
    ```

-   **-m | --metaData**

    -   *Name:* `--metaData`
    -   *Shortcut:* `-m`
    -   *Type:* JSON string

    Meta data for the operation.

    ```bash
    # These commands have identical results.

    typo3 interest:create ... --metaData='{"context":"NewZealand"}'
    ```

## Available commands/endpoints {#implementing-cli-commands}

All commands can be executed using TYPO3's default CLI endpoint,
`typo3 [command]`, e.g. `typo3 interest:create ...`.

### interest:clearhash {#implementing-cli-clearhash}

Interest stores a hash of the data in each operation together with the remote
ID. This command clears this hash. The hash is used to prevent an operation from
being executed repeatedly.

Sometimes, especially in connection with testing, clearing the hash and
re-running the operation makes sense.

```bash
typo3 interest:clearhash REMOTE_ID [-c|--contains]
```

#### Options {#implementing-cli-clearhash-options}

-   **-c | --contains**

    -   *Name:* `--contains`
    -   *Shortcut:* `-c`
    -   *Type:* boolean

    Interpret `REMOTE_ID` as a partial remote ID and match any remote ID
    containing this string.

### interest:create {#implementing-cli-create}

Create a record.

```bash
typo3 interest:create ENDPOINT REMOTE_ID [LANGUAGE [WORKSPACE]] [-u|--update] [-d|--data]  [-m|--metaData] [-b|--batch] [--disableReferenceIndex]
```

#### Additional options {#implementing-cli-create-options}

-   **-u | --update**

    -   *Name:* `--update`
    -   *Shortcut:* `-u`
    -   *Type:* boolean

    If the record already exists, update it instead.

### interest:delete {#implementing-cli-delete}

Delete a record.

> [!TIP]
> The `REMOTE_ID` argument can be a comma-separated list of remote IDs.

```bash
typo3 interest:delete REMOTE_ID [LANGUAGE [WORKSPACE]] [--disableReferenceIndex]
```

### interest:pendingrelations {#implementing-cli-pendingrelations}

View statistics and optionally try to resolve pending relations.

```bash
typo3 interest:pendingrelations [-r|--resolve]
```

#### Options {#implementing-cli-pendingrelations-options}

-   **-r | --resolve**

    -   *Name:* `--resolve`
    -   *Shortcut:* `-r`
    -   *Type:* boolean

    Try to resolve any resolvable pending relations in addition to showing
    statistics.

### interest:update {#implementing-cli-update}

Update a record.

```bash
typo3 interest:update ENDPOINT REMOTE_ID [LANGUAGE [WORKSPACE]] [-c|--create] [-d|--data]  [-m|--metaData] [-b|--batch] [--disableReferenceIndex]
```

#### Additional options {#implementing-cli-update-create}

-   **-c | --create**

    -   *Name:* `--update`
    -   *Shortcut:* `-u`
    -   *Type:* boolean

    If the record doesn't exist, create it instead.
