Server Endpoints represent server-side logic incorporated in UI Component Fields, however they can be used independently.
Click a link to jump to the indicated section.
bluecat.server_endpoints.empty_decorator
(res)
Default ‘do nothing’ decorator applied to every result set.
bluecat.server_endpoints.get_address_data
(configuration_id, ip4_address)
Get the BAM data for a given ip4_address in the given configuration.
Parameters | Description |
---|---|
configuration_id |
The ID of the configuration in which the ip4_address resides. |
ip4_address |
The IP address in octet form. |
Returns: The IP address data in JSON, using result template format.
bluecat.server_endpoints.get_alias_record_data
(configuration, view, parent_zone, alias)
Get all alias records under the given configuration, view and parent_zone.
Parameters | Description |
---|---|
configuration |
The ID of the configuration in which the text records reside. |
view |
Name of the view the text records are under. |
parent_zone |
Name of zone that the text records are under. |
alias |
Name of the alias record. |
Returns: Alias Records data in JSON, using result template format.
bluecat.server_endpoints.get_alias_records_endpoint
(workflow_name, element_id, permissions, result_decorator=None)
Generate an endpoint for retrieving alias record data. Accepts the following keys in the posted form: configuration, view, zone, alias_record. Where:
-
configuration - The ID of the configuration containing the Alias Record.
-
view - The name of the view in the given configuration that contains the Alias Record.
-
zone - The name of the zone (and subzones) in the given view that contains the Alias Record.
-
alias_record - The name of the Alias Record.
Parameters | Description |
---|---|
workflow_name |
The name of the workflow that is using this endpoint. |
element_id |
The ID of the form field using this endpoint. |
permissions |
What workflow permissions the user needs to access this endpoint. |
result_decorator |
function to add custom manipulations to a result set. |
Returns: The generated endpoint unique to get_alias_records_endpoint. The Alias Record name and zone, and the Linked Record name and zone for the Alias Record if it exists.
bluecat.server_endpoints.get_host_records_endpoint
(workflow_name, element_id, permissions, result_decorator=None)
Generate an endpoint for retrieving zone data. Accepts the following keys in the posted form: configuration, view, parent_zone, host_record. Where:
-
configuration - The ID of the configuration containing the Host Record.
-
view - The name of the view in the given configuration that contains the Host Record.
-
parent_zone - The name of the zone (and subzones) in the given view that contains the Host Record.
-
host_record - The name of the Host Record.
Parameters | Description |
---|---|
workflow_name |
The name of the workflow that is using this endpoint. |
element_id |
The ID of the form field using this endpoint. |
permissions |
What workflow permissions the user needs to access this endpoint. |
result_decorator |
Function to add custom manipulations to a result set. |
Returns: Host record name and addresses and the generated endpoint unique to get_host_records_endpoint.
bluecat.server_endpoints.get_ip4_address_endpoint
(workflow_name, element_id, permissions, result_decorator=None)
Generate an endpoint for retrieving IP4 Address data. Accepts the following keys in the posted form: configuration, address.
Where:-
configuration - The ID of the configuration containing the IPv4 Address.
address - The IP of the IPv4 Address.
-
IP4 object with status, name and MAC address properties if it is a valid address within a network.
Parameters | Description |
---|---|
workflow_name |
The name of the workflow that is using this endpoint. |
element_id |
The ID of the form field using this endpoint. |
permissions |
What workflow permissions the user needs to access this endpoint. |
result_decorator |
Function to add custom manipulations to a result set. |
Returns: The generated endpoint unique to get_ip4_address_endpoint.
bluecat.server_endpoints.get_result_template
()
Template for the communication object; all components are designed to expect the data object, surrounding processing relies on status and message to determine whether the query was successful.
Returns:
-
status:
SUCCESS
orFAIL
string; defines whether the POST query was successful. -
message: A message describing what occurred during the processing of the request.
-
data: A dictionary representing the return data. Components of different types will look for their key in this object and use that data. If they cannot find the needed key the components will attempt to use the entire “data” object.
Each component requires a certain response format:
autocomplete_field:
DESCRIPTION: The field will present options to the user as they type. PRIMARY: [{'value': '<STRING>', 'label': '<STRING>'}, {...}, ...] ALTERNATIVE: ['<STRING1>', '<STRING2>', ...]
select_field:
DESCRIPTION: The field will be pre-populated with options for the user to select. PRIMARY: [{'id': '<STRING>', 'txt': '<STRING>'}, {...}, ...]
bluecat.server_endpoints.get_text_record_data
(configuration, view, parent_zone, name)
Get all text records under the given configuration, view and parent_zone.
Parameters | Description |
---|---|
configuration |
The ID of the configuration in which the text records reside. |
view |
Name of the view the text records are under. |
parent_zone |
Name of zone that the text records are under. |
name |
Name of the text record. |
Returns: Text Records data in JSON, using result template format.
bluecat.server_endpoints.get_text_records_endpoint
(workflow_name, element_id, permissions, result_decorator=None)
Generate an endpoint for retrieving text record data. Accepts the following keys in the posted form: configuration, view, parent_zone, name.
Where:-
configuration - The ID of the configuration containing the Text Record.
view - The name of the view in the given configuration that contains the Text Record.
parent_zone - The name of the zone (and subzones) in the given view that contains the Text Record.
name - The name of the Text Record.
-
List of Text Records with the given name.
Parameters | Description |
---|---|
workflow_name |
The name of the workflow that is using this endpoint. |
element_id |
The ID of the form field using this endpoint. |
permissions |
What workflow permissions the user needs to access this endpoint. |
result_decorator |
function to add custom manipulations to a result set. |
Returns: The generated endpoint unique to get_text_records_endpoint.
bluecat.server_endpoints.get_view_data
(configuration_id)
Get all views under a configuration with the given ID.
Parameters | Description |
---|---|
configuration_id |
The id of the configuration in which the views reside. |
Returns: Views data in JSON, using result template format.
bluecat.server_endpoints.get_views_endpoint
(workflow_name, element_id, permissions, result_decorator=None)
Generate an endpoint for retrieving view data. Accepts the following keys in the posted form: configuration.
Where:-
configuration - The ID of the configuration whose view data to retrieve.
-
The Alias Record name and zone, and the Linked Record name and zone for the Alias Record if it exists.
Parameters | Description |
---|---|
workflow_name |
The name of the workflow that is using this endpoint. |
element_id |
The ID of the form field using this endpoint. |
permissions |
What workflow permissions the user needs to access this endpoint. |
result_decorator |
function to add custom manipulations to a result set. |
Returns: The generated endpoint unique to get_views_endpoint.
bluecat.server_endpoints.get_zones_data_by_hint
(configuration_id, view_name, hint)
Get a list of zone FQDNs that corresponds to the given configuration, view and hint.
Parameters | Description |
---|---|
configuration_id |
The ID of the configuration in which the zone resides. |
view_name |
The name of the view in which the zone resides. |
hint |
Partial or full name of zone to find. |
Returns: FQDN of any zones that match the given hint as data in JSON, using result template format.
bluecat.server_endpoints.get_zones_endpoint
(workflow_name, element_id, permissions, result_decorator=None)
Generate an endpoint for retrieving zone data. Accepts the following keys in the posted form: configuration, view, zone.
Where:-
configuration - The ID of the configuration containing the Zone(s).
view - The name of the view in the given configuration that contains the Zone(s).
zone - The full name of the zone to find or partial name matching any number of zones.
-
A list of zone paths for autocomplete field and a list of zone paths and zone id’s for select field
Parameters | Description |
---|---|
workflow_name |
The name of the workflow that is using this endpoint. |
element_id |
The ID of the form field using this endpoint. |
permissions |
What workflow permissions the user needs to access this endpoint. |
result_decorator |
Function to add custom manipulations to a result set. |
Returns: The generated endpoint unique to get_zones_endpoint.