DELETE Log

DELETE Log


Request used to delete a specific Log from an account.

URL

https://REGION.rest.logs.insight.rapid7.com/management/logs

REGION is the data center for your account - e.g. "us" or "eu"

Method

DELETE

Authentication

Read/Write Key is required.

URL Params

logid

Data Params

Success Response

1
**Code 204**
2
**Content**: None

Sample Code

python
1
import requests
2
import json
3
4
5
API_KEY ='00112233-4455-6677-8899-aabbccddeeff'
6
7
def handle_response(resp):
8
response = resp
9
if response.status_code == 200:
10
print json.dumps(resp.json(), indent=4)
11
else:
12
print response.status_code
13
14
def make_request(provided_url=None):
15
headers = {'x-api-key': API_KEY}
16
url = "https://us.rest.logs.insight.rapid7.com/management/logs/1e0f10a6-4d69-4fbe-b074-d83ecc1244d3"
17
req = requests.delete(url, headers=headers)
18
return req
19
20
21
def delete_log():
22
req = make_request()
23
handle_response(req)
24
25
def start():
26
delete_log()
27
28
29
if __name__ == '__main__':
30
start()