feat: add Installation resource with Generate Token operation - #15
Open
jspern wants to merge 1 commit into
Open
Conversation
Adds a fourth resource that generates agent installation tokens via PUT https://api.backup.management/agent/installation, returning the installationToken for use with the Backup Manager installer. This is the first REST call in the node, so transport gains restRequest alongside jsonRpcRequest. It reuses the cached visa as an Authorization Bearer header and retries once on a 401 after clearing the cache. The API treats the unlimited flags and their concrete counterparts as mutually exclusive, so the body sends either UnlimitedCount or InstallationCount, and either UnlimitedExpiration or ExpirationTimestamp, never both. Field labels follow the Cove console (Customer, Retention Policy, Profile, Encryption, Device Name). InstallationType is always Initial, so it is a constant rather than a UI field. The Customer dropdown uses a new getCustomers loader that labels the root entry with the partner name instead of the existing "All Partners (Top Level)" wording; the shared enumerate logic moves into getDescendantPartnerOptions so the Account operations keep their label.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a fourth resource that generates agent installation tokens via
PUT https://api.backup.management/agent/installation, returning theinstallationTokenfor use with the Backup Manager installer.This is the first
RESTcall in the node, so transport gainsrestRequestalongsidejsonRpcRequest. It reuses the cached visa as an Authorization Bearer header and retries once on a401after clearing the cache.The API treats the unlimited flags and their concrete counterparts as mutually exclusive, so the body sends either
UnlimitedCountorInstallationCount, and eitherUnlimitedExpirationorExpirationTimestamp, never both. Field labels follow the Cove console (Customer, Retention Policy, Profile, Encryption, Device Name).InstallationTypeis always Initial, so it is a constant rather than a UI field.The Customer dropdown uses a new
getCustomersloader that labels the root entry with the partner name instead of the existing "All Partners (Top Level)" wording; the shared enumerate logic moves intogetDescendantPartnerOptionsso the Account operations keep their label.