Bulk operations

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

Bulk update

The bulk update command allows 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, the labels and the contact email of the certificates. To unset an existing value use the value "unset".

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)

--labels

The labels, in the comma separated key:value form, to set on certificates matching the query. (Optional)

--contact-email

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

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

Bulk migrate

The bulk migrate command allows 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. You can update the owner, the team, the labels and the contact email of the certificates. To unset an existing value use the value "unset".

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)

--labels

The labels, in the comma separated key:value form, to set on certificates matching the query. (Optional)

--contact-email

The contact email 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 --labels mylabel:myvalue

Bulk revoke

The bulk revoke command allows 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