minions interface — VMware Salt for VCF Components API

minions interface — VMware Salt for VCF Components API

minions interface

The minions interface provides querying capabilities for VCF component inventory, connection presence, and dynamic grain metadata. It allows you to check which appliances are online, retrieve their configuration tags (grains), and manage their cryptographic key states.

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:

curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_minion_cache",
    "kwarg": {
      "master_id": "master-01.local",
      "minion_id": "minion-01.local"
    }
  }'
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 VMware Salt for VCF Components API.

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).
Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_minion_deployments",
    "kwarg": {
      "limit": 50
    }
  }'
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
Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_minion_details",
    "kwarg": {
      "minion_id": "11111111-2222-3333-4444-555555555555",
      "limit": 1
    }
  }'
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.

Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_minion_grain_keys",
    "kwarg": {
      "minion_id": "11111111-2222-3333-4444-555555555555"
    }
  }'
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.

Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_minion_grain_values",
    "kwarg": {
      "key": "vcfops_resource_kind"
    }
  }'
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).
Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_minion_key_state",
    "kwarg": {
      "key_state": "accepted",
      "limit": 50
    }
  }'
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:

curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_minion_presence",
    "kwarg": {
      "status": "present",
      "limit": 1000
    }
  }'
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)
Example:
curl -k -X POST "https://<vcfms-hostname>/raas/rpc" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <jwt_token>" \
  -d '{
    "resource": "minions",
    "method": "get_trusted_minion_keys",
    "kwarg": {
      "state": "trusted",
      "limit": 50
    }
  }'