Class: PEClient::Resource::NodeClassifierV1::Classification
- Defined in:
- lib/pe_client/resources/node_classifier.v1/classification.rb
Overview
The classification endpoints accepts a node name and a set of facts, and then return information about how the specified node is classified. The output can help you test your node group classification rules.
Constant Summary collapse
- BASE_PATH =
The base path for Node Classifier API v1 groups endpoints.
"#{NodeClassifierV1::BASE_PATH}/classified/nodes".freeze
Instance Method Summary collapse
-
#explanation(name, fact: {}, trusted: {}) ⇒ Hash
Retrieve a detailed explanation about how a node is classified based on facts supplied in the body of your request.
-
#get(name, fact: nil, trusted: nil) ⇒ Hash
Retrieve a specific node’s classification information based on facts supplied in the body of your request.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PEClient::Resource::Base
Instance Method Details
#explanation(name, fact: {}, trusted: {}) ⇒ Hash
Retrieve a detailed explanation about how a node is classified based on facts supplied in the body of your request.
56 57 58 |
# File 'lib/pe_client/resources/node_classifier.v1/classification.rb', line 56 def explanation(name, fact: {}, trusted: {}) @client.post "#{BASE_PATH}/#{name}/explanation", body: {fact:, trusted:}.compact end |
#get(name, fact: nil, trusted: nil) ⇒ Hash
Retrieve a specific node’s classification information based on facts supplied in the body of your request.
41 42 43 |
# File 'lib/pe_client/resources/node_classifier.v1/classification.rb', line 41 def get(name, fact: nil, trusted: nil) @client.post "#{BASE_PATH}/#{name}", body: {fact:, trusted:}.compact end |