Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Latest commit

 

History

History
116 lines (75 loc) · 3.91 KB

File metadata and controls

116 lines (75 loc) · 3.91 KB

ESP::StatCustomSignaturesApi

All URIs are relative to https://api.evident.io

Method HTTP request Description
list_for_stat GET /api/v2/stats/{stat_id}/custom_signatures.json_api Statistics for custom signatures
show GET /api/v2/stats/custom_signatures/{id}.json_api Show a single Stat Custom Signature

list_for_stat

PaginatedCollection list_for_stat(stat_id, opts)

Statistics for custom signatures

A successful call to this API returns all the statistics of all the custom signatures for a report identified by the stat_id parameter. Said report contains all statistics for this alert triggered from signatures contained in all custom_signatures for the selected hour.

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::StatCustomSignaturesApi.new

stat_id = 56 # Integer | The ID of the stat to retrieve custom signature statistics for

opts = { 
  include: "include_example", # String | Related objects that can be included in the response:  custom_signature, stat See Including Objects for more information.
  filter: {'key' => "filter_example"}, # Hash<String, String> | Filter Params for Searching.  Equality Searchable Attributes: [stat_id, type_id]    
  page: "{:number=>1,+:size=>20}" # String | Page Number and Page Size.  Number is the page number of the collection to return, size is the number of items to return per page.
}

begin
  #Statistics for custom signatures
  result = api_instance.list_for_stat(stat_id, opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling StatCustomSignaturesApi->list_for_stat: #{e}"
end

Parameters

Name Type Description Notes
stat_id Integer The ID of the stat to retrieve custom signature statistics for
include String Related objects that can be included in the response: custom_signature, stat See Including Objects for more information. [optional]
filter Hash<String, String> Filter Params for Searching. Equality Searchable Attributes: [stat_id, type_id] [optional]
page String Page Number and Page Size. Number is the page number of the collection to return, size is the number of items to return per page. [optional] [default to {:number=>1,+:size=>20}]

Return type

PaginatedCollection

Authorization

See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

show

StatCustomSignature show(id, opts)

Show a single Stat Custom Signature

Example

# load the gem
require 'esp_sdk'

api_instance = ESP::StatCustomSignaturesApi.new

id = 56 # Integer | Stat Custom Signature ID

opts = { 
  include: "include_example" # String | Related objects that can be included in the response:  custom_signature, stat See Including Objects for more information.
}

begin
  #Show a single Stat Custom Signature
  result = api_instance.show(id, opts)
  p result
rescue ESP::ApiError => e
  puts "Exception when calling StatCustomSignaturesApi->show: #{e}"
end

Parameters

Name Type Description Notes
id Integer Stat Custom Signature ID
include String Related objects that can be included in the response: custom_signature, stat See Including Objects for more information. [optional]

Return type

StatCustomSignature

Authorization

See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json