Skip to content

#44954 API design: Custom host vitals#48369

Draft
rachaelshaw wants to merge 6 commits into
docs-v4.90.0from
44954-api-design
Draft

#44954 API design: Custom host vitals#48369
rachaelshaw wants to merge 6 commits into
docs-v4.90.0from
44954-api-design

Conversation

@rachaelshaw

Copy link
Copy Markdown
Member

Still TODO: "Update host's custom host vital value" endpoint

@nulmete nulmete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know what you think about my suggestions below.

Also, in order to list the custom host vitals for a particular host, I suggest extending the current host details endpoint (GET api/latest/fleet/hosts/:hostId) with a new custom_host_vitals property. (Implementation detail, no need to include a change here I think.)

Comment thread docs/REST API/rest-api.md Outdated
Comment thread docs/REST API/rest-api.md Outdated
Comment on lines +15078 to +15080
### Update host's custom host vital value

> TODO

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be

PUT /hosts/:host_id/custom_host_vitals/:id

Body:

{
  "value": "ABC-1234"
}

Default response:

Status: 200

{
  "host_id": 42,
  "custom_host_vital_id": 123,
  "name": "Asset tag",
  "value": "ABC-1234",
  "updated_at": "2026-07-01T15:23:57Z"
}

Comment thread docs/REST API/rest-api.md Outdated
Comment thread docs/REST API/rest-api.md
Co-authored-by: Nico <32375741+nulmete@users.noreply.github.com>
Comment thread docs/REST API/rest-api.md
Co-authored-by: Nico <32375741+nulmete@users.noreply.github.com>
@nulmete nulmete self-requested a review July 6, 2026 12:36

@lucasmrod lucasmrod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a nit comment.

Comment thread docs/REST API/rest-api.md

| Name | Type | In | Description |
|:--------------- |:------- |:----- |:------------------------------------------------------------|
| name | string | body | **Required.** The desired variable name, without the `FLEET_SECRET_` prefix. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
| name | string | body | **Required.** The desired variable name, without the `FLEET_SECRET_` prefix. |
| name | string | body | **Required.** The desired variable name, without the `FLEET_HOST_VITAL_` prefix. |

Comment thread docs/REST API/rest-api.md

Update the value of a custom host vital for a single host.

`PUT /hosts/:host_id/custom_host_vitals/:id`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Clearing" a host's custom vital is about PUTing with "value": "", right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants