BSUS REST API endpoint reference - Adaptive Applications - BlueCat Gateway - 25.2

BlueCat Server Update Services Administration Guide

ft:locale
en-US
Product name
BlueCat Gateway
Version
25.2

The BlueCat Server Update Services (BSUS) REST API has the following constants and API endpoints

Tip:
While working within the BlueCat Server Update Services UI, you can access the latest REST API Swagger documentation by entering the following URL in your browser:
http://<Gateway host name or IP address>/bsus/api/v1/doc

From there, you can view a list of all supported API methods, their input parameters, and test API methods.

API constants

The following section lists API constants used by the BlueCat Server Update Services APIs.

Status codes:

  • WAITING = 0
  • PROCESSING = 1
  • SUCCESS = 2
  • FAIL = 3

The ServiceSyncStatus class has the following defined constants:

  • FAIL = 0
  • SUCCESS = 1
  • WAITING = 2
  • NOT_SUPPORTED = 3

List of BSUS API endpoints

Access rights endpoints

GET .../bsus/api/v1/access-rights
  • Retrieve the current set of all BSUS access right permission settings for all BSUS non-administrator user groups. (That is, all non-administrator user groups group that were given the rights to work with Server Batches.)

PUT .../bsus/api/v1/access-rights/{group_name}
  • Update the access rights to Server Batches for a specific BSUS user group.

DELETE .../bsus/api/v1/access-rights/{group_name}
  • Deletes BSUS access rights completely for a BSUS user group, removing access to all Server Batches.

GET .../bsus/api/v1/access-rights/{group_name}
  • Retrieve the current set of all BSUS access right permission settings for a specific BSUS non-administrator user group.

Address Manager endpoints

GET /bsus/api/v1/address_manager
  • Tests the database connection with BlueCat Address Manager.

Agent timeout endpoints

GET /bsus/api/v1/agent_timeout
  • Retrieves the BSUS agent timeout settings. The agent is the BSUS app that is installed and runs on the target DNS/DHCP server.

PUT /bsus/api/v1/agent_timeout
  • Update the agent timeout settings.

Agent upgrade endpoints

POST /bsus/api/v1/agent_upgrade
  • Sends the latest BSUS patch update to a BDDS server, updating the portions of the BSUS app that live on that server to the latest version.

Batches endpoints

GET /bsus/api/v1/batches
  • Retrieves a list of server batches on a particular page.

GET /bsus/api/v1/batches/{batch_id}
  • Retrieves information about a specific Server Batch based on the ID provided.

POST /bsus/api/v1/batches
  • Adds servers to a Server Batch

PUT /bsus/api/v1/batches/move-servers
  • Moves a DNS/DHCP server to a different Server Batch.

PUT /bsus/api/v1/batches/{batch_id}
  • Update the servers in an existing Server Batch based on the ID provided

DELETE /bsus/api/v1/batches/{batch_id}
  • Deletes a Server Batch based on the ID provided.

Deployment endpoints

POST /bsus/api/v1/deployment/apply
  • Applies patches to a Server Batch.

POST /bsus/api/v1/deployment/schedule
  • Schedules a Server Batch to be applied at a specified date and time.

POST /bsus/api/v1/deployment/validate-disk-space
  • Determines whether there is sufficient disk space to apply a patch on a set of servers in a Server Batch.

POST /bsus/api/v1/deployment/stage-updates
  • Stages (uploads) one or more patch files to a Server Batch so that it can be applied later.

Events endpoints

GET /bsus/api/v1/events
  • Retrieves event list items.

GET /bsus/api/v1/events/report
  • Generates a report containing event list items.

Global user endpoints

GET /bsus/api/v1/globaluser
  • Retrieves the global user settings.

PUT /bsus/api/v1/globaluser
  • Update the global user settings.

Job restoration endpoints

POST /bsus/api/v1/job_restoration

Patches endpoints

GET /bsus/api/v1/patches
  • Retrieves a list of patches in a Server Batch.

GET /bsus/api/v1/patches/{patch_id}/md5
  • Retrieves the MD5 checksum file of a specific patch based on the ID provided.

GET /bsus/api/v1/patches/{patch_id}/package
  • Retrieves the patch package file of a specific patch based on the ID provided.

POST /bsus/api/v1/patches
  • Adds patch updates to BlueCat Server Update Services.

PUT /bsus/api/v1/patches/{patch_id}
  • Update the patch information.

DELETE /bsus/api/v1/patches
  • Deletes patch updates from BlueCat Server Update Services.

Portal server endpoints

GET /bsus/api/v1/portal_server
  • Retrieve the settings for the current portal host and port that DNS/DHCP servers use to connect with BSUS for acquiring staged patch files and configuration packages.

PUT /bsus/api/v1/portal_server
  • Update the settings for the current portal host and port that DNS/DHCP servers use to connect with BSUS for acquiring staged patch files and configuration packages.

POST /bsus/api/v1/portal_server/test
  • Tests the portal server connection, which is used by DNS/DHCP servers to connect with BSUS for acquiring staged patch files and configuration packages.

Post-upgrade script endpoints

GET /bsus/api/v1/post_upgrade_script/script
POST /bsus/api/v1/post_upgrade_script/run
  • Run the "backup" or "restore" portion of the indicated Server Batch's customization package for all servers in a batch. On each server, this calls the package's customize.sh bash script with the "-r" (restore) parameter:

    customize.sh -r
DELETE /bsus/api/v1/post_upgrade_script/script/{name}
  • Delete a specified customization package from BSUS's list. The package must not be associated with any Server Batch.

GET /bsus/api/v1/post_upgrade_script/script/{name}
  • Download the customization package with the indicated name

POST /bsus/api/v1/post_upgrade_script/script/{name}
  • Upload a customization package to BSUS.

Scheduled Updates endpoints

GET /bsus/api/v1/scheduled_update
  • Retrieves a list of all scheduled updates.

PUT /bsus/api/v1/scheduled_update
  • Update a configured scheduled update.

DELETE /bsus/api/v1/scheduled_update
  • Deletes a scheduled update.

POST /bsus/api/v1/scheduled_update/apply
  • Immediately applies a staged or scheduled update to servers in its Server Batch.

Server Groups endpoints

GET /bsus/api/v1/servergroups
  • Retrieve a list of all server groups.

GET /bsus/api/v1/servergroups/{bam_id}
  • Retrieves information about a specific Server Group in Address Manager based on the ID provided.

Servers endpoints

GET /bsus/api/v1/servers/unmanaged-servers
  • Retrieves a list of all unmanaged servers.

POST /bsus/api/v1/servers/test-ssh
  • Tests the SSH connections to the DNS/DHCP Server.

GET /bsus/api/v1/servers/{id}/service-configuration-template/differences
  • Retrieves the differences between the configuration of a Server and its associated Configuration Template.

POST /bsus/api/v1/servers/{id}/service-configuration-template/apply
  • Applies a server's associated Configuration Template to the Server's configuration.

GET /bsus/api/v1/servers/{id}/service-configuration-template/download
  • Downloads the configuration of a server as JSON content suitable for use in a Configuration Template.

PUT /bsus/api/v1/server{id}
  • Assign a Configuration template to a server.

Service account endpoints

GET /bsus/api/v1/service_account
  • Retrieve account details for the account used by the API when signing in to BlueCat Address Manager.

POST /bsus/api/v1/service_account/test
  • Tests a service account's connection to Address Manager.

PUT /bsus/api/v1/service_account
  • Update the API service account connection to BlueCat Address Manager.

Service configuration template endpoints

GET /bsus/api/v1/service_configuration_template
  • Retrieve a list of all Configuration Templates.

POST /bsus/api/v1/service_configuration_template/{name}
  • Add a new Configuration Template.

DELETE /bsus/api/v1/service_configuration_template/{name}
  • Delete a specific Configuration Template.

PUT /bsus/api/v1/service_configuration_template/{name}
  • Update a specific Configuration Template.

GET /bsus/api/v1/service_configuration_template/{name}
  • Get the details of a specific Configuration Template.

Syslog endpoints

GET /bsus/api/v1/syslog
  • Retrieve syslog configuration.

PUT /bsus/api/v1/syslog
  • Update syslog configuration.

POST /bsus/api/v1/syslog/test
  • Send a test message to the syslog server.

SQL credentials endpoints

GET /bsus/api/v1/sql_credentials
  • Retrieves the maximum API timeout value before BSUS switches to DB Connection to get server details.

    The API timeout specifies how long before BSUS switches to DB Connection to get server details. If the BAM API does not respond within this timeout period, BSUS performs an SQL query to Address Manager to get server details.

PUT /bsus/api/v1/sql_credentials
  • Sets the maximum API timeout value before BSUS switches to DB Connection to get server details.

    The API timeout specifies how long before BSUS switches to DB Connection to get server details. If the BAM API does not respond within this timeout period, BSUS performs an SQL query to Address Manager to get server details.

SSH keys endpoints

GET /bsus/api/v1/ssh_keys
  • Retrieves the list of SSH private keys that have been added to BSUS, for use when connecting to DNS/DHCP servers.

GET /bsus/api/v1/ssh_keys/{name}
  • Retrieves information about a specific SSH key based on a provided name.

DELETE /bsus/api/v1/ssh_keys/{name}
  • Delete a specified SSH private key from BSUS's list.

    Note: Doing so will also remove authorization details from servers (within Server Batches) that use that SSH key.
POST /bsus/api/v1/ssh_keys/{name}
  • Updates information about a specific SSH key based on a provided name.

Template settings endpoints

GET /bsus/api/v1/template_settings
  • Retrieve the set of global settings related to Configuration Templates.

PUT /bsus/api/v1/template_settings
  • Update the set of global settings related to Configuration Templates.

User groups endpoints

GET /bsus/api/v1/user-groups
  • Retrieve a list of all user groups, including user groups that do not have access to BSUS Server Batches.