minions interface — VCF Salt API

minions interface — VCF Salt API

minions interface

The LoadedMod class allows for the module loaded onto the sub to return custom sequencing, for instance it can be iterated over to return all functions

get_minion_cache(master_id: str | None, minion_id: str | None, tgt_uuid: uuid.UUID | None, sort_by: str | None = alter_time, page: int | None, limit: int | None = 100, reverse: bool | None)
Returns: <class 'dict'>

Retrieve the minion cache for a particular master.

Parameters

master_id:ID for master.
minion_id:ID for minion.

Example:

client.api.minions.get_minion_cache(master_id='master-01.example.com',
                                    minion_id='minion-01.example.com')

RPCResponse(riq=28, ret=
    {u'master-01.example.com':
        {u'minion-01.example.com':
            {u'grains':
               {u'biosversion': u'4.2.example',
                u'kernel': u'Linux',
                u'domain': u'example.com', .... }}}},
    error=None, warnings=[])
get_minion_deployments(deploy_uuid: uuid.UUID | None, minion_id: str | None, master_id: str | None, page: int | None, limit: int | None = 50)
Returns: <class 'dict'>

Get minion deployments done using VCF Salt.

Parameters

deploy_uuid:Filter by deployment uuid. Optional.
master_id:Filter by Salt master id. Optional.
minion_id:Filter by Salt minion ID. Optional.
page:Return data from this page number.
limit:Set page size (maximum number of minion deployment records to return).
get_minion_details(master_id: str | None, minion_id: str | None, tgt_uuid: uuid.UUID | None, grains: dict | None, sort_by: str | None, reverse: bool | None, page: int | None, limit: int | None = 50, response_file: str | None, exact_match: bool | None)
Returns: <class 'dict'>

Get minion details.

Parameters

master_id:Filter minions by master id.
minion_id:Filter minions by minion id.
tgt_uuid:Limit the query to minions matching this target group.
grains:Filter the minions by matching grains.
sort_by:Sort results by this minion grain.
reverse:Pass True to sort results in descending order.
page:Return data from this page number.
limit:Set page size (maximum number of minions to return).
response_file:Pass 'filename.csv' or .json to return a file.
exact_match:Match the exact master_id and minion_id. Default: False
get_minion_grain_keys(master_id: str | None, minion_id: str | None, tgt_uuid: uuid.UUID | None)
Returns: list[str]

Get a list of unique minion grain keys, optionally filtering by master id, minion id, or target group.

Parameters

master_id:Limit the query to minion grains reported by this master
minion_id:Limit the query to grains from this minion
tgt_uuid:Limit the query to minions matching this target group

Note when enable_grains_indexing: False this will always return an empty list.

get_minion_grain_values(key: <class 'str'>, master_id: str | None, minion_id: str | None, tgt_uuid: uuid.UUID | None)
Returns: list[Any]

Get a list of unique minion grain values for a particular key, optionally filtering by master id, minion id, or target group.

Parameters

key:Get possible minion grain values for this minion grain key
master_id:Limit the query to minion grains reported by this master
minion_id:Limit the query to grains from this minion
tgt_uuid:Limit the query to minions matching this target group

Note when enable_grains_indexing: False this will always return an empty list.

get_minion_key_state(master_id: str | None, minion_id: str | None, key_state: str | None, sort_by: str | None, reverse: bool | None, page: int | None, limit: int | None = 50)
Returns: <class 'dict'>

Get minion key states

Parameters

master_id:Filter results by master id.
minion_id:Filter results by minion id.
key_state:Limit results to this minion key state (accepted, rejected, pending, or denied).
sort_by:Sort results by this field (master_id, minion_id, or key_state).
reverse:Pass True to sort results in descending order.
page:Return data from this page number.
limit:Set page size (maximum number of results to return).
get_minion_presence(master_id: str | None, minion_id: str | None, status: str | None, ipv4: str | None, host: str | None, separate_master_cluster_ids: bool | None, sort_by: str | None, reverse: bool | None, page: int | None, limit: int | None = 100)
Returns: <class 'dict'>

Retrieve presence status for all minions in the infrastructure.

Example:

client.api.minions.get_minion_presence()

RPCResponse(riq=6543, ret={
      'results': [
              {'minion': 'minion-01.example.com', 'master': 'master-01.example.com', 'status': 'present', 'timestamp': u'2026-08-05T01:08:30.227736'},
              {'minion': 'minion-02.example.com', 'master': 'master-01.example.com', 'status': 'lost', 'timestamp': u'2026-08-05T01:08:30.227736'}
          ],
      'count': 2
    },
    error=None, warnings=[])
get_trusted_minion_keys(state: str | None, minion_ids: list[str] | None, trusted_public_keys: list[str] | None, limit: <class 'int'> = 1000)
Returns: <class 'dict'>

Get trusted minion keys.

Parameters

state:Filter by state ("trusted", "rejected", "disabled")
minion_ids:Filter by list of minion IDs
trusted_public_keys:Filter by list of public keys (useful for bulk validation)
limit:Max results (default: 1000)

The return payload is a dictionary with the following structure:

{
  "count": 1,
  "keys": [
    {
      "uuid": "00000000-0000-0000-0000-000000000001",
      "trusted_public_key": "ssh-rsa AAAAB3NzaC1...",
      "minion_id": "minion-01.example.com",
      "state": "trusted",
      "description": "Example key",
      "minion_metadata": {},
      "created": "2026-08-05T01:08:30.227736",
      "updated_at": "2026-08-05T01:08:30.227736",
      "accepted_at": "2026-08-05T01:08:30.227736",
      "rejected_at": null,
      "version": 1
    }
  ]
}