Imperva Traffic Statistics and Logs API
Retrieve traffic statistics and logs for sites or accounts.
Retrieve traffic statistics and logs for sites or accounts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/imperva-traffic-statistics-and-logs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cloud Application Security Traffic Statistics and Logs API
license:
name: Imperva License Agreement.
url: http://www.imperva.com/other/license_agreement.asp
version: '1.0'
description: Retrieve traffic statistics and logs for sites or accounts.
servers:
- url: https://my.imperva.com
description: Imperva API server
variables: {}
security:
- api_key: []
- api_id: []
tags:
- name: Traffic Statistics and Logs
description: Retrieve traffic statistics and logs for sites or accounts.
paths:
/api/v1/infra/stats:
post:
tags:
- Traffic Statistics and Logs
summary: Get Infrastructure Protection Statistics
description: Use this operation to get Infrastructure Protection event information for an account.
operationId: getInfraStats
parameters:
- name: account_id
in: query
description: Numeric identifier of the account to operate on.<br/>If not specified, operation will be performed on the account identified by the authentication parameters.
schema:
type: integer
format: int64
example: 10
- name: ip_prefix
in: query
description: Specific Protected IP or IP range. For example, 1.1.1.0/24.
schema:
type: string
example: 1.1.1.0/24
- name: traffic
in: query
description: 'Specific traffic. One of: Total, Passed, Blocked.'
schema:
type: string
example: Blocked
- name: traffic_type
in: query
description: 'A comma separated list of specific traffic types. Any of: UDP, TCP, DNS, DNS_RESPONSE, ICMP, SYN, FRAG, LARGE_SYN, NTP, NETFLOW, SSDP, GENERAL. Cannot be used together with the pop parameter.'
schema:
type: string
example: TCP
- name: pop
in: query
description: 'A comma separated list of specific PoP names. For example: iad, tko. Cannot be used together with the traffic_type parameter. For the list of PoP codes and locations, see <a href="https://docs.imperva.com/csh?context=pops">Imperva Data Centers (PoPs)</a>.'
schema:
type: string
example: tko
- name: start
in: query
description: 'The start date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
schema:
type: integer
format: int64
example: 1610356734
- name: end
in: query
description: 'The end date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
schema:
type: integer
format: int64
example: 1610356734
- name: directionTypes
in: query
description: The type of direction(INGRESS/EGRESS) to filter the data
schema:
type: string
example: INGRESS
- name: range_type
in: query
description: 'Can be one of the following: BGP, PROTECTED_IP'
schema:
type: string
example: INCAPSULA_IP
responses:
'200':
description: res - contains the specific error code:<br/>2 - Invalid input<br/>3015 - Internal error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/InfraStatsApiResponse'
- $ref: '#/components/schemas/ApiResult'
/api/stats/v1:
post:
tags:
- Traffic Statistics and Logs
summary: Get statistics
description: Get site statistics for one or more sites. This operation may return multiple statistics, as specified in the stats parameter.
operationId: getStats
parameters:
- name: account_id
in: query
description: 'Numeric identifier of the account to fetch data for.<br/>Note: You must specify either account_id or site_id.'
schema:
type: string
example: 10
- name: time_range
in: query
description: 'Time range to fetch data for.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
required: true
schema:
type: string
example: last_7_days
- name: start
in: query
description: 'Start date in milliseconds since 1970. Used together with the time_range parameter to specify a custom time range.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
schema:
type: string
example: 1610356734
- name: end
in: query
description: 'End date in milliseconds since 1970. Used together with the time_range parameter to specify a custom time range.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
schema:
type: string
example: 1610356734
- name: site_id
in: query
description: 'Numeric identifier of the site to fetch data for. Multiple sites can be specified in a comma separated list. For example: 123,124,125.<br/>Note: You must specify either account_id or site_id.'
schema:
type: string
example: 123
- name: stats
in: query
description: Statistics to fetch, as specified in the table below. Multiple statistics can be specified in a comma separated list.<br/>Values for the stats parameters:<br/><ul><li><b>visits_timeseries</b> Number of visits by type (Humans/Bots) over time.</li><li><b>hits_timeseries</b> Number of hits by type (Humans/Bots/Blocked) over time and per second.</li><li><b>bandwidth_timeseries</b> Amount of bytes (bandwidth) and bits per second (throughput) transferred via the Imperva network from clients to proxy servers and vice-versa over time.</li><li><b>requests_geo_dist_summary</b> Total number of requests routed via the Imperva network by data center location.</li><li><b>visits_dist_summary</b> Total number of visits per client application and country.</li><li><b>caching</b> Total number of requests and bytes that were cached by the Imperva network.</li><li><b>caching_timeseries</b> Number of requests and bytes that were cached by the Imperva network, with one day resolution, with info regarding the caching mode (standard or advanced).</li><li><b>threats</b> Total number of threats by type with additional information regarding the security rules configuration.</li><li><b>incap_rules</b> List of security rules with total number of reported incidents for each rule.</li><li><b>incap_rules_timeseries</b> List of security rules with a series of reported incidents for each rule with the specified granularity.</li><li><b>delivery_rules</b> List of delivery rules with total number of hits for each rule.</li><li><b>delivery_rules_timeseries</b> List of delivery rules with a series of hits for each rule with the specified granularity.</li></ul>
required: true
schema:
type: string
example: threats
- name: granularity
in: query
description: 'Time interval in milliseconds between data points for time series statistics. (See the timeseries values in the table below.)<br/>The default granularity depends on the specified time range, as follows:<br/><ul><li>Time range of less than 24 hours: Default granularity is 7200000 (2 hours).</li><li>Time range of between 24 hours and 30 days: Default granularity is 86400000 (1 day).</li><li>Time range of more than 30 days: Default granularity is 259200000 (3 days).</li></ul>The response includes one result for each interval. For example, if you specify a time range value of last_7_days, the default granularity is 1 day, and the response will return 7 results.'
schema:
type: string
example: 7200000
responses:
'200':
description: res - contains the specific error code:<br/> 13001 (Timerange invalid), 13002 (Granularity invalid)
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/ApiResultSiteStats'
- $ref: '#/components/schemas/ApiResult'
/api/v1/infra/top-table:
post:
tags:
- Traffic Statistics and Logs
summary: Get Infrastructure Protection Top Items (Table View)
description: Use this operation to view the highest peak values and highest average values for a protected IP range during a selected time period.
operationId: getInfraProtectTopTable
parameters:
- name: account_id
in: query
description: Numeric identifier of the account to operate on.<br/>If not specified, operation will be performed on the account identified by the authentication parameters.
schema:
type: integer
format: int64
example: 10
- name: ip_range
in: query
description: The customer's IP range.
required: true
schema:
type: string
example: INCAPSULA_IP
- name: range_type
in: query
description: 'One of the following: BGP, PROTECTED_IP'
required: true
schema:
type: string
example: PROTECTED_IP
- name: start
in: query
description: 'The start date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
required: true
schema:
type: integer
format: int64
example: 1610356734
- name: end
in: query
description: 'The end date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
required: true
schema:
type: integer
format: int64
example: 1610356734
- name: data_type
in: query
description: 'One of the following: SRC_IP, DST_IP, SRC_PORT_PROTOCOL, DST_PORT_PROTOCOL'
required: true
schema:
type: string
example: SRC_IP
- name: metric_type
in: query
description: 'One of the following: SRC_IP, DST_IP, SRC_PORT_PROTOCOL, DST_PORT_PROTOCOL'
required: true
schema:
type: string
example: BPS
- name: mitigation_type
in: query
description: 'One of the following: BLOCK, PASS'
required: true
schema:
type: string
example: BLOCK
- name: aggregation_type
in: query
description: 'One of the following: PEAK, AVERAGE'
required: true
schema:
type: string
example: AVERAGE
- name: data_storage_region
in: query
description: The data region to use. If not specified, account's default data region will be used.
schema:
type: string
example: EU
responses:
'200':
description: res - contains the specific error code:<br/>2 - Invalid input<br/>1 - Unexpected error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AnalyticsTopTableApiResponse'
- $ref: '#/components/schemas/ApiResult'
/api/v1/infra/top-graph:
post:
tags:
- Traffic Statistics and Logs
summary: Get Infrastructure Protection Top Items (Graph View)
description: Use this operation to view the highest peak values and highest average values for a protected IP range during a selected time period.
operationId: getInfraProtectTopData
parameters:
- name: account_id
in: query
description: Numeric identifier of the account to operate on.<br/>If not specified, operation will be performed on the account identified by the authentication parameters.
schema:
type: integer
format: int64
example: 10
- name: ip_range
in: query
description: The customer's IP range.
required: true
schema:
type: string
example: INCAPSULA_IP
- name: range_type
in: query
description: 'One of the following: BGP, PROTECTED_IP'
required: true
schema:
type: string
example: PROTECTED_IP
- name: start
in: query
description: 'The start date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
required: true
schema:
type: integer
format: int64
example: 1610356734
- name: end
in: query
description: 'The end date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
required: true
schema:
type: integer
format: int64
example: 1610356734
- name: data_type
in: query
description: 'One of the following: SRC_IP, DST_IP, SRC_PORT_PROTOCOL, DST_PORT_PROTOCOL'
required: true
schema:
type: string
example: SRC_IP
- name: metric_type
in: query
description: 'One of the following: BW, PPS'
required: true
schema:
type: string
example: BPS
- name: mitigation_type
in: query
description: 'One of the following: BLOCK, PASS'
required: true
schema:
type: string
example: BLOCK
- name: data_storage_region
in: query
description: The data region to use. If not specified, account's default data region will be used.
schema:
type: string
example: EU
- name: objects
in: query
description: A comma separated list of items to fetch data for. e.g., 10.10.10.10, 2.2.2.2. If not specified, top items are automatically fetched.
schema:
type: string
example: 1.1.1.1
responses:
'200':
description: res - contains the specific error code:<br/>2 - Invalid input<br/>1 - Unexpected error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AnalyticsTopGraphDataResponse'
- $ref: '#/components/schemas/ApiResult'
/api/v1/infra/histogram:
post:
tags:
- Traffic Statistics and Logs
summary: Get Infrastructure Protection Histogram
description: Use this operation to view the highest packet size values for a protected IP range during a selected time period.
operationId: getInfraProtectHistogram
parameters:
- name: account_id
in: query
description: Numeric identifier of the account to operate on.<br/>If not specified, operation will be performed on the account identified by the authentication parameters.
schema:
type: integer
format: int64
example: 10
- name: ip_range
in: query
description: The customer's IP range.
required: true
schema:
type: string
example: INCAPSULA_IP
- name: range_type
in: query
description: 'One of the following: BGP, PROTECTED_IP'
required: true
schema:
type: string
example: PROTECTED_IP
- name: start
in: query
description: 'The start date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
required: true
schema:
type: integer
format: int64
example: 1610356734
- name: end
in: query
description: 'The end date in milliseconds, since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
required: true
schema:
type: integer
format: int64
example: 1610356734
- name: mitigation_type
in: query
description: 'One of the following: BLOCK, PASS'
required: true
schema:
type: string
example: BLOCK
- name: data_storage_region
in: query
description: The data region to use. If not specified, account's default data region will be used.
schema:
type: string
example: EU
responses:
'200':
description: res - contains the specific error code:<br/>2 - Invalid input<br/>1 - Unexpected error
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/AnalyticsHistogramApiResponse'
- $ref: '#/components/schemas/ApiResult'
/api/visits/v1:
post:
tags:
- Traffic Statistics and Logs
summary: Get visits
description: Use this operation to get a log of recent visits to a website.
operationId: getVisits
parameters:
- name: site_id
in: query
description: Numeric identifier of the site to operate on.
required: true
schema:
type: string
example: 10
- name: time_range
in: query
description: 'Time range to fetch data for. Default is last_7_days.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A time range of less than 24 hours gives results for the full day.<br/>For example:<ul><li>A time range of 14:00 - 20:00 yesterday gives results for all of yesterday (midnight to midnight) - a full day.</li><li>A time range of 14:00 last Tuesday to 14:00 last Wednesday gives results for all of Tuesday and Wednesday - two full days.</li> <li>A time range of 14:00 yesterday to 14:00 today gives results for all of yesterday starting from midnight until the current time today.</li></ul></li></ul>'
schema:
type: string
example: last_7_days
- name: start
in: query
description: 'Start date in milliseconds since 1970.<br/>Some operations require the user to specify a time range. This is done via the time_range parameter, which accepts the following values:<br/><ul><li><b>today</b> Retrieve data from midnight today until the current time.</li><li><b>last_7_days</b> Retrieve data from midnight of 7 days ago until the current time.</li><li><b>last_30_days</b> Retrieve data from midnight of 30 days ago until the current time.</li><li><b>last_90_days</b> Retrieve data from midnight of 90 days ago until the current time.</li><li><b>month_to_date</b> Retrieve data from midnight of the first day of the month until the current time.</li><li><b>custom</b> Specify a custom time range using two additional parameters: start and end.<br/>Results are provided for full days only, starting from midnight. A t
# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/imperva/refs/heads/main/openapi/imperva-traffic-statistics-and-logs-api-openapi.yml