---
title: "Set a collector's nickname; an empty name falls back to the host name"
method: PATCH
path: "/api/{org_id}/fleet/collectors/{id}"
tags: ["Fleet"]
---

# Set a collector's nickname; an empty name falls back to the host name

`PATCH /api/{org_id}/fleet/collectors/{id}`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/fleet/collectors/{id}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/fleet/collectors/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `org_id` string, required
- `id` string, required

## Request body

- RenameCollectorRequest: The nickname; an empty name falls back to the host name.
  - `name` string, required

## Response `200`

The renamed collector

- Collector
  - `arch` string, nullable
  - `config` string, nullable
  - `config_version` integer, nullable
  - `delivery` 'assigned' | 'sent' | 'accepted' | 'running' | 'rejected': Derived when read from the assignment and the collector's reports.
  - `delivery_error` string, nullable
  - `distribution` string, nullable
  - `enrolled_at` integer, required: Epoch milliseconds.
  - `fleet` CollectorFleet, required: A fleet named by its public id; `name` is null once the fleet was deleted.
    - `id` string, required
    - `name` string, nullable
  - `hostname` string, nullable
  - `id` string, required
  - `last_connected_from` string, nullable: The connection's client address, as `ZO_HTTP_REAL_IP_SOURCE` resolves it.
  - `last_seen` integer, required: Epoch milliseconds.
  - `name` string, required: The nickname, or the host name when none was set.
  - `os` string, nullable
  - `outdated` boolean, required
  - `status` 'unknown' | 'online' | 'degraded' | 'offline', required: Derived when read from `last_seen` and the reported health, never stored.
  - `token_id` string, nullable
  - `version` string, nullable

## Other responses

- `400`: Invalid
- `403`: Forbidden
- `404`: Not found

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
