GET Logset

GET Log Set


Request used to get a specific Log Set from an account

URL

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

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

Method

GET

Authentication

Owner, Read Write or Read Only key is required.

URL Params

logsetid

Data Params

None

Success Response

Code 200Content:

json
1
{
2
"logset": {
3
"user_data": {},
4
"logs_info": [
5
{
6
"id": "847dd050-df29-4c5c-ac34-a2049d4cd57e",
7
"links": [
8
{
9
"href": "https://us.rest.logs.insight.rapid7.com/management/logs/847dd050-df29-4c5c-ac34-a2049d4cd57e",
10
"rel": "Self"
11
}
12
],
13
"name": "Lambda Log"
14
},
15
{
16
"id": "b144fd14-c106-4c77-a6ae-db4942c7444c",
17
"links": [
18
{
19
"href": "https://us.rest.logs.insight.rapid7.com/management/logs/b144fd14-c106-4c77-a6ae-db4942c7444c",
20
"rel": "Self"
21
}
22
],
23
"name": "Lambda Log Debug"
24
}
25
],
26
"description": null,
27
"id": "11a6f6dc-58b5-4097-b211-fd37c19037b0",
28
"name": "MyLogSet"
29
}
30
}

Sample Call

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

Notes