For #23899
This commit is contained in:
@@ -4867,11 +4867,20 @@ Add a dynamic or manual label.
|
||||
| name | string | body | **Required**. The label's name. |
|
||||
| description | string | body | The label's description. |
|
||||
| query | string | body | The query in SQL syntax used to filter the hosts. Only one of either `query` (to create a dynamic label) or `hosts` (to create a manual label) can be included in the request. |
|
||||
| criteria | object | body | Criteria for adding hosts to a host vitals label. See [`criteria`](#criteria) for details. |
|
||||
| hosts | array | body | The list of host identifiers (`hardware_serial`, `uuid`, or `hostname`) the label will apply to. Only one of either `query` (to create a dynamic label), `hosts` (to create a manual label), or `host_ids` (to create a manual label) can be included in the request. |
|
||||
| host_ids | array | body | The list of Fleet host IDs the label will apply to. Only one of either `query` (to create a dynamic label) or `hosts`/`host_ids` (to create a manual label) can be included in the request.
|
||||
| host_ids | array | body | The list of Fleet host IDs the label will apply to. Only one of either `query` (to create a dynamic label) or `hosts`/`host_ids` (to create a manual label) can be included in the request. |
|
||||
| platform | string | body | The specific platform for the label to target. Provides an additional filter. Choices for platform are `darwin`, `windows`, `ubuntu`, and `centos`. All platforms are included by default and this option is represented by an empty string. |
|
||||
|
||||
If both `query` and `hosts` aren't specified, a manual label with no hosts will be created.
|
||||
If `query`, `criteria`, and `hosts` aren't specified, a manual label with no hosts will be created.
|
||||
|
||||
#### criteria
|
||||
|
||||
| Name | Type | Description |
|
||||
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| vital | string | The type of host vital to use when creating a host vital label. Can be `"end_user_idp_group"` or `"end_user_idp_department"`. |
|
||||
| value | string | Hosts with vital data matching this value will be added to the label. |
|
||||
|
||||
|
||||
#### Example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user