Skip to content

Latest commit

 

History

History
325 lines (287 loc) · 26.7 KB

README.md

File metadata and controls

325 lines (287 loc) · 26.7 KB

Go API client for BloxOne FW API

BloxOne Threat Defense Cloud is an extension of the BloxOne Suite that provides visibility into infected and compromised off-premises devices, roaming users, remote sites, and branch offices. You can subscribe to BloxOne Cloud and use its functionality to mitigate and control malware as well as provide unprecedented insight into your network security posture and enable timely action. BloxOne Cloud also offers unified policy management, reporting, and threat analytics across the entire spectrum. Using automated and high-quality threat intelligence feeds and unique behavioral analytics, it automatically stops device communications with C&Cs/botnets and prevents DNS based data exfiltration.

The mission-critical DNS infrastructure can become a vulnerable component in your network when it is inadequately protected by traditional security solutions and consequently used as an attack surface. Compromised DNS services can result in catastrophic network and system failures. To fully protect your network in today’s cyber security threat environment, Infoblox sets a new DNS security standard by offering scalable, enterprise-grade, and integrated protection for your DNS infrastructure.

Through the Infoblox Cloud Services Portal, you can view the status of your subscription and threat intelligence feeds, manage your network scope and roaming end users, and learn more about threats on your networks through the Infoblox Threat Lookup tool and predefined reports.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: v1
  • Generator version: 7.5.0
  • Build package: com.infoblox.codegen.BloxoneGoClientCodegen

Installation

Install the package using go get:

go get github.com/infobloxopen/bloxone-go-client/fw

Import the package into your code:

import "github.com/infobloxopen/bloxone-go-client/fw"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

To create a new API client, you can use the NewAPIClient function as shown below

client := fw.NewAPIClient()

Configuration

The NewAPIClient function accepts a variadic list of option.ClientOption functions that can be used to configure the client. It requires the option package to be imported. You can import the package using:

import "github.com/infobloxopen/bloxone-go-client/option"

Client Name

The client name is used to identify the client in the logs. By default, the client name is set to bloxone-go-client. You can change this using the option.WithClientName option. For example:

client := fw.NewAPIClient(option.WithClientName("my-client"))

Server URL

The default URL for the Cloud Services Portal is https://csp.infoblox.com. If you need to change this, you can use option.WithCSPUrl to set the URL. For example:

client := fw.NewAPIClient(option.WithCSPUrl("https://csp.eu.infoblox.com"))

You can also set the URL using the environment variable BLOXONE_CSP_URL

Authorization

An API key is required to access BloxOne FW API. You can obtain an API key by following the instructions in the guide for Configuring User API Keys.

To use an API key with BloxOne FW API, you can use the option.WithAPIKey option. For example:

client := fw.NewAPIClient(option.WithAPIKey("YOUR_API_KEY"))

You can also set the API key using the environment variable BLOXONE_API_KEY

Note: The API key is a secret and should be handled securely. Hardcoding the API key in your code is not recommended.

Default Tags

You can set default tags for all API requests using the option.WithDefaultTags option. For example:

client := fw.NewAPIClient(option.WithDefaultTags(map[string]string{"tag1": "value1", "tag2": "value2"}))

This will add the tags tag1=value1 and tag2=value2 to all API requests that support tags in the request body.

Documentation for API Endpoints

All URIs are relative to https://csp.infoblox.com/api/atcfw/v1

Class Method HTTP request Description
AccessCodesAPI CreateAccessCode Post /access_codes Create Access Codes
AccessCodesAPI DeleteAccessCodes Delete /access_codes Delete Access Codes
AccessCodesAPI DeleteSingleAccessCodes Delete /access_codes/{access_key} Delete Access Code By ID
AccessCodesAPI ListAccessCodes Get /access_codes List Access Codes
AccessCodesAPI ReadAccessCode Get /access_codes/{access_key} Read Access Codes
AccessCodesAPI UpdateAccessCode Put /access_codes/{payload.access_key} Update Access Codes
AppApprovalsAPI ListAppApprovals Get /app_approvals
AppApprovalsAPI ReplaceAppApprovals Put /app_approvals Update Application Approval.
AppApprovalsAPI UpdateAppApprovals Patch /app_approvals
ApplicationFiltersAPI CreateApplicationFilter Post /application_filters Create Application Filter.
ApplicationFiltersAPI DeleteApplicationFilters Delete /application_filters Delete Application Filters.
ApplicationFiltersAPI DeleteSingleApplicationFilters Delete /application_filters/{id} Delete Application Filter Object by ID.
ApplicationFiltersAPI ListApplicationFilters Get /application_filters List Application Filters.
ApplicationFiltersAPI ReadApplicationFilter Get /application_filters/{id} Read Application Filter.
ApplicationFiltersAPI UpdateApplicationFilter Put /application_filters/{id} Update Application Filter.
CategoryFiltersAPI CreateCategoryFilter Post /category_filters Create Category Filter.
CategoryFiltersAPI DeleteCategoryFilters Delete /category_filters Delete Category Filters By ID.
CategoryFiltersAPI DeleteSingleCategoryFilters Delete /category_filters/{id} Delete Category Filters.
CategoryFiltersAPI ListCategoryFilters Get /category_filters List Category Filters.
CategoryFiltersAPI ReadCategoryFilter Get /category_filters/{id} Read Category Filter.
CategoryFiltersAPI UpdateCategoryFilter Put /category_filters/{id} Update Category Filter.
ContentCategoriesAPI ListContentCategories Get /content_categories List Content Categories.
InternalDomainListsAPI CreateInternalDomains Post /internal_domain_lists Create Internal Domains.
InternalDomainListsAPI DeleteInternalDomains Delete /internal_domain_lists Delete Internal Domains.
InternalDomainListsAPI DeleteSingleInternalDomains Delete /internal_domain_lists/{id} Delete Internal Domains.
InternalDomainListsAPI InternalDomainsItemsPartialUpdate Patch /internal_domain_lists/{id}/items Patch Internal Domains.
InternalDomainListsAPI ListInternalDomains Get /internal_domain_lists List Internal Domains.
InternalDomainListsAPI ReadInternalDomains Get /internal_domain_lists/{id} Read Internal Domains.
InternalDomainListsAPI UpdateInternalDomains Put /internal_domain_lists/{id} Update Internal Domains.
NamedListItemsAPI DeleteNamedListItems Delete /named_lists/{id}/items Delete Named List Items.
NamedListItemsAPI InsertOrReplaceNamedListItems Post /named_lists/{id}/items Insert Named List Items.
NamedListItemsAPI NamedListItemsPartialUpdate Patch /named_lists/{id}/items Partial Update Named List Items.
NamedListsAPI CreateNamedList Post /named_lists Create Named List.
NamedListsAPI DeleteNamedLists Delete /named_lists Delete Named Lists.
NamedListsAPI DeleteSingleNamedLists Delete /named_lists/{id} Delete Named Lists.
NamedListsAPI ListNamedLists Get /named_lists List Named Lists.
NamedListsAPI ListNamedListsCSV Get /named_lists_download List Named Lists in CSV format.
NamedListsAPI MultiListUpdate Patch /named_lists Patch Multiple Named Lists.
NamedListsAPI ReadNamedList Get /named_lists/{id} Read Named List.
NamedListsAPI UpdateNamedList Put /named_lists/{id} Update Named List.
NamedListsAPI UpdateNamedListPartial Patch /named_lists/{id} Patch TI List.
NetworkListsAPI CreateNetworkList Post /network_lists Create Network List.
NetworkListsAPI DeleteNetworkLists Delete /network_lists Delete Network Lists.
NetworkListsAPI DeleteSingleNetworkLists Delete /network_lists/{id} Delete Network Lists.
NetworkListsAPI ListNetworkLists Get /network_lists List Network Lists.
NetworkListsAPI ReadNetworkList Get /network_lists/{id} Read Network List.
NetworkListsAPI UpdateNetworkList Put /network_lists/{id} Update Network List.
PopRegionsAPI ListPoPRegions Get /pop_regions List PoP Regions.
PopRegionsAPI ReadPoPRegion Get /pop_regions/{id} Read PoP Region.
SecurityPoliciesAPI CreateSecurityPolicy Post /security_policies Create Security Policy.
SecurityPoliciesAPI DeleteSecurityPolicy Delete /security_policies Delete Security Policies.
SecurityPoliciesAPI DeleteSingleSecurityPolicy Delete /security_policies/{id} Delete Security Policy.
SecurityPoliciesAPI ListSecurityPolicies Get /security_policies List Security Policies.
SecurityPoliciesAPI ReadSecurityPolicy Get /security_policies/{id} Read Security Policy.
SecurityPoliciesAPI UpdateSecurityPolicy Put /security_policies/{id} Update Security Policy.
SecurityPolicyRulesAPI ListSecurityPolicyRules Get /security_policy_rules List Security Policy Rules.
ThreatFeedsAPI ListThreatFeeds Get /threat_feeds List Threat Feeds.

Documentation For Models

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime