Bulk operations

The horizon client allow to perform bulk operations on certificates using the Horizon Certificate Query Language (HCQL).

Bulk update

the bulk update command allow update of certificate metadata en masse. The command takes a HCQL query as parameter and updates the matching certificates with the provided metadata. You can update the owner, the team and the labels of the certificates.

Table 1. Bulk update command parameters
Parameter Description

--query

The HCQL query string. Update will be performed on results.

--confirm

Skip confirm.

--owner

The owner to set on certificates matching the query. (Optional)

--team

The team to set on certificates matching the query. (Optional)

--label

The label, in the forme key:value, to set on certificates matching the query. (Optional)

horizon-cli bulk update --query 'module equals "est" and status is valid' --owner "myuser" --team "myteam" --label "mylabel:myvalue"

Bulk migrate

The bulk migrate command allow certificate migration from one profile to another. The command takes an HCQL query as parameter and migrate the matching certificates to the provided profile. The command can also update the certificates metadata.

Table 2. Bulk migrate command parameters
Parameter Description

--query

The HCQL query string. Update will be performed on results.

--confirm

Skip confirm.

--profile

The target profile for the migration.

--owner

The owner to set on certificates matching the query. (Optional)

--team

The team to set on certificates matching the query. (Optional)

--label

The label, in the forme key:value, to set on certificates matching the query. (Optional)

horizon-cli bulk migrate --query 'module equals "est" and status is valid' --profile new-est-profile --team myteam --label mylabel:myvalue

Bulk revoke

The bulk revoke command allow certificate revocation en masse. The command takes an HCQL query as parameter and revoke the matching certificates.

Table 3. Bulk revoke command parameters
Parameter Description

--query

The HCQL query string. Update will be performed on results.

--confirm

Skip confirm.

horizon-cli bulk revoke --query 'team equals "myterminatedteam" and status is valid' --confirm