All URIs are relative to https://api.evident.io
| Method | HTTP request | Description |
|---|---|---|
| for_report | GET /api/v2/reports/{report_id}/stats.json_api | Stats for a report |
| latest_for_teams | PUT /api/v2/stats/latest_for_teams.json_api | Statistics for teams |
| show | GET /api/v2/stats/{id}.json_api | Show a single Stat |
Stat for_report(report_id, opts)
Stats for a report
A successful call to this API returns all the stats of all the alerts for a report identified by the report_id parameter. Said report contains all statistics for this alert triggered from signatures contained in all regions for the selected hour.
# load the gem
require 'esp_sdk'
api_instance = ESP::StatsApi.new
report_id = 56 # Integer | The ID of the report to retrieve stats for
opts = {
include: "include_example" # String | Related objects that can be included in the response: report, regions, services, signatures, custom_signatures, custom_compliance_controls, compliance_controls See Including Objects for more information.
}
begin
#Stats for a report
result = api_instance.for_report(report_id, opts)
p result
rescue ESP::ApiError => e
puts "Exception when calling StatsApi->for_report: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| report_id | Integer | The ID of the report to retrieve stats for | |
| include | String | Related objects that can be included in the response: report, regions, services, signatures, custom_signatures, custom_compliance_controls, compliance_controls See Including Objects for more information. | [optional] |
See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
PaginatedCollection latest_for_teams(opts)
Statistics for teams
A successful call to this API returns all the statistics for the most recent report of each team accessible by the given API key
# load the gem
require 'esp_sdk'
api_instance = ESP::StatsApi.new
opts = {
include: "include_example", # String | Related objects that can be included in the response: report, regions, services, signatures, custom_signatures, custom_compliance_controls, compliance_controls See Including Objects for more information.
filter: {'key' => "filter_example"}, # Hash<String, String> | Filter Params for Searching. Searchable Association: [report] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information.
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 teams
result = api_instance.latest_for_teams(opts)
p result
rescue ESP::ApiError => e
puts "Exception when calling StatsApi->latest_for_teams: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| include | String | Related objects that can be included in the response: report, regions, services, signatures, custom_signatures, custom_compliance_controls, compliance_controls See Including Objects for more information. | [optional] |
| filter | Hash<String, String> | Filter Params for Searching. Searchable Association: [report] See Searching Lists for more information. See the filter parameter of the association's list action to see what attributes are searchable on each association. See Conditions on Relationships in Searching Lists for more information. | [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}] |
See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
Stat show(id, opts)
Show a single Stat
# load the gem
require 'esp_sdk'
api_instance = ESP::StatsApi.new
id = 56 # Integer | Stat ID
opts = {
include: "include_example" # String | Related objects that can be included in the response: report, regions, services, signatures, custom_signatures, custom_compliance_controls, compliance_controls See Including Objects for more information.
}
begin
#Show a single Stat
result = api_instance.show(id, opts)
p result
rescue ESP::ApiError => e
puts "Exception when calling StatsApi->show: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | Integer | Stat ID | |
| include | String | Related objects that can be included in the response: report, regions, services, signatures, custom_signatures, custom_compliance_controls, compliance_controls See Including Objects for more information. | [optional] |
See https://github.com/EvidentSecurity/esp-sdk-ruby#set-your-hmac-security-keys
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json