Description
The editHitCount operation handles configuration related to HitCount model.
This API call is not allowed on the standby unit in an HA pair.
HTTP request
PUT /api/fdm/v6/policy/accesspolicies/{parentId}/operational/hitcounts
Data Parameters
| Parameter |
Required |
Type |
Description |
| hitCount |
False |
integer | Number of hits for specific Access rule |
|
| rule |
False |
object | Hits are counted for this rule |
|
| firstHitTimeStamp |
False |
string | Time when this rule got hit first time |
|
| lastHitTimeStamp |
False |
string | Time when this rule got hit last time |
|
| lastFetchTimeStamp |
False |
string | Time when FDM has updated number of hits in database |
|
| type |
True |
string | A UTF8 string, all letters lower-case, that represents the class-type. This corresponds to the class name. |
|
Path Parameters
| Parameter |
Required |
Type |
Description |
| parentId |
True |
string | |
|
Example
curl -X PUT \
--header "Accept: application/json" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"firstHitTimeStamp": "string",
"hitCount": 0,
"lastFetchTimeStamp": "string",
"lastHitTimeStamp": "string",
"rule": {
"id": "string",
"name": "string",
"ruleId": 0,
"type": "accessruleinfo"
},
"type": "HitCount"
}' \
"https://${HOST}:${PORT}/api/fdm/v6/policy/accesspolicies/{parentId}/operational/hitcounts"
from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient
def get_client(host, token):
http_client = RequestsClient()
http_client.ssl_verify = False
http_client.set_api_key(
host,
"Bearer {}".format(token),
param_name="Authorization",
param_in="header"
)
return SwaggerClient.from_url(
"https://{}/apispec/ngfw.json".format(host),
http_client=http_client,
config={
"validate_responses": False,
"validate_swagger_spec": False
}
)
def edit_hit_count(client, parent_id, body):
return client.HitCount.editHitCount(
parentId=parent_id,
body=body
).response().result
if __name__ == "__main__":
host = "ftd.example.com"
token = "access_token"
client = get_client(host, token)
parent_id = "string"
body = {'firstHitTimeStamp': 'string',
'hitCount': 0,
'lastFetchTimeStamp': 'string',
'lastHitTimeStamp': 'string',
'rule': {'id': 'string',
'name': 'string',
'ruleId': 0,
'type': 'accessruleinfo'},
'type': 'HitCount'}
edit_hit_count(client, parent_id, body)