-
Notifications
You must be signed in to change notification settings - Fork 0
Logging Policy
mrblacyk edited this page Apr 24, 2020
·
2 revisions
{
"title": "Logging Policy #0001",
"default": "Not configured",
"volume": "Low",
"description": "Description of the logging policy. Keep in min that it has to be valid JSON so any new lines have to be escaped \n",
"eventID": [1, 4688],
"references": ["https://duckduckgo.com/", "https://www.torproject.org/"],
"configuration": "Again, any new lines have to escaped\n```\nsomecode\n```\n"
}
title: Logging Policy #0001
default: Not configured
volume: Low
description: >
Description of the logging policy. Keep in min that it has to be valid JSON so any new lines have to be escaped
eventID:
- 1
- 4688
references:
- https://duckduckgo.com/
- https://www.torproject.org/
configuration: |
Again, any new lines have to escaped
``
somecode
``
path_to_lp = "LP0001.yml"
with open(path_to_lp, 'r') as stream:
lp = yaml.safe_load(stream)
r = requests.post(
'http://127.0.0.1:8000/api/v1/atc/loggingpolicy/',
json=lp,
auth=('admin', 'admin')
)
There are two types of filters - exact match
and contains
. Here is the list of valid filters:
title_contains
title_exact
eventID_exact
volume_exact