# Date: 06-09-2018 # Gateway Version: 18.9.1 # Description: This workflow will provide access to a REST based API for Gateway. # Once imported, documentation for the various end points available can # be viewed by navigating to /api/v1/. from flask import g, jsonify from flask_restplus import fields, reqparse, Resource import bluecat.server_endpoints as se from bluecat import util import config.default_config as config from .configuration_page import config_doc, config_defaults, entity_parser, entity_model, entity_return_model from main_app import api view_default_ns = api.namespace('views', path='/views/', description='View operations') view_ns = api.namespace('views', path='/configurations/<string:configuration>/views/', description='View operations') zone_default_root_ns = api.namespace('zones', description='Zone operations') zone_root_ns = api.namespace( 'zones', path='/configurations/<string:configuration>/views/<string:view>/zones/', description='Zone operations', ) zone_default_ns = api.namespace('zones', description='Zone operations') zone_ns = api.namespace( 'zones',
# By: Xiao Dong ([email protected]) # Anshul Sharma ([email protected]) # Date: 06-09-2018 # Gateway Version: 18.9.1 # Description: This workflow will provide access to a REST based API for Gateway. # Once imported, documentation for the various end points available can # be viewed by navigating to /api/v1/. from flask import g, jsonify from flask_restplus import fields, Resource, reqparse from bluecat import util import config.default_config as config from main_app import api config_ns = api.namespace('configurations', description='Configuration operations') config_doc = { 'configuration': { 'in': 'path', 'description': 'The name of the Configuration' } } entity_parser = reqparse.RequestParser() entity_parser.add_argument('name', location="json", help='The name of the entity.') entity_parser.add_argument( 'properties', location="json", help=
# By: Xiao Dong ([email protected]) # Anshul Sharma ([email protected]) # Date: 06-09-2018 # Gateway Version: 18.9.1 # Description: This workflow will provide access to a REST based API for Gateway. # Once imported, documentation for the various end points available can # be viewed by navigating to /api/v1/. from flask import g, jsonify from flask_restplus import fields, reqparse, Resource import bluecat.server_endpoints as se from bluecat import util from .configuration_page import config_defaults, entity_return_model from main_app import api ip4_address_root_default_ns = api.namespace( 'ipv4_addresses', description='IPv4 Address operations') ip4_address_root_ns = api.namespace( 'ipv4_addresses', path='/configurations/<string:configuration>/', description='IPv4 Address operations', ) ip4_address_default_ns = api.namespace('ipv4_addresses', description='IPv4 Address operations') ip4_address_ns = api.namespace( 'ipv4_addresses', path='/configurations/<string:configuration>/', description='IPv4 Address operations', ) ip4_block_root_default_ns = api.namespace('ipv4_blocks',
# limitations under the License. # # By: Xiao Dong, Anshul Sharma, Chris Storz ([email protected]) Date: 06-09-2018 # Gateway Version: 19.8.1 # Description: This workflow will provide access to a REST-based API for BlueCat Gateway. # Once imported and permissioned, documentation for the various available endpoints # can be viewed by navigating to /api/v1/. from flask import g from flask_restplus import Resource from bluecat import util from main_app import api from .library.models.entity_models import entity_return_model search_ns = api.namespace('search', path='/', description='Search for any object of the specified type') @search_ns.route( '/search_pattern/<string:search_pattern>/object_type/<string:object_type>/search/<path:search_filters>/' ) @search_ns.response(200, 'Objects found', model=entity_return_model) class ObjectSearch(Resource): @util.rest_workflow_permission_required('rest_page') def get(self, search_pattern, object_type, search_filters): """ Search for entities of the specified object type. Only the first 1000 possible results will be returned. filters can be in the format of property=value pairs: