---
title: "tractorbeam object-type"
description: "The Tractorbeam API's object type operations."
sidebar:
  label: "object-type"
  order: 24
---

```sh
tractorbeam object-type <subcommand> [flags]
```

## Shared flags

Every subcommand takes these flags.

| Flag | Description |
| --- | --- |
| `--config <string>` | The Project's `tractorbeam.config.ts`. Defaults to the one in the current directory or its nearest ancestor. |
| `--workspace <string>` | Workspace name. Environment variable: `TRACTORBEAM_WORKSPACE`. |
| `--origin <string>` | The Tractorbeam origin to call instead of the default, such as a proxy's. Environment variable: `TRACTORBEAM_ORIGIN`. |
| `--token <string>` | Access token. Defaults to the saved interactive session. Environment variable: `TRACTORBEAM_TOKEN`. |

## `object-type list`

Returns the Object types the Branch's HEAD, or a retained Commit on it, selects, each with its fields, where each field gets its value, and its links. Needs Workspace authority; an App token can't list Object types.

```sh
tractorbeam object-type list [flags]
```

| Flag | Description |
| --- | --- |
| `--at-commit-id <string>` | The ID of a retained Commit on the Branch to read at. Defaults to the Branch's HEAD. |
| `--branch <string>` | Branch name. Defaults to the Branch you last switched to, or main. Environment variable: `TRACTORBEAM_BRANCH`. |

## `object-type get`

Returns the Object type with this name selected by the Branch's HEAD or by a retained Commit on it, with its fields, where each field gets its value, and its links. Returns 404 when none is selected. Needs Workspace authority; an App token can't retrieve Object types.

```sh
tractorbeam object-type get [flags] <object-type>
```

| Argument | Description |
| --- | --- |
| `<object-type>` | The name of the Object type to retrieve. |

| Flag | Description |
| --- | --- |
| `--at-commit-id <string>` | The ID of a retained Commit on the Branch to read at. Defaults to the Branch's HEAD. |
| `--branch <string>` | Branch name. Defaults to the Branch you last switched to, or main. Environment variable: `TRACTORBEAM_BRANCH`. |
