PUT logset

PUT Log Set


Request used to edit a Log Set from specific 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

PUT

Authentication

Owner, Read Write or Read Only key is required.

URL Params

logsetid

Data Params

1
{
2
"logset": {
3
"user_data": {},
4
"logs_info": [
5
{
6
"id": "b653f62e-a576-4f59-b951-f5a66fa2c99f",
7
"links": [
8
{
9
"href": "https://us.rest.logs.insight.rapid7.com/management/logs/b653f62e-a576-4f59-b951-f5a66fa2c99f",
10
"rel": "Self"
11
}
12
],
13
"name": "Lambda Log"
14
},
15
{
16
"id": "85d72a1c-0ea5-4edc-aa30-599e85a1404f",
17
"links": [
18
{
19
"href": "https://us.rest.logs.insight.rapid7.com/management/logs/85d72a1c-0ea5-4edc-aa30-599e85a1404f",
20
"rel": "Self"
21
}
22
],
23
"name": "Lambda Log Debug"
24
}
25
],
26
"description": null,
27
"name": "New Name"
28
}
29
}

Success Response

Code 200Content:

json
1
{
2
"logset": {
3
"user_data": {},
4
"logs_info": [
5
{
6
"id": "b653f62e-a576-4f59-b951-f5a66fa2c99f",
7
"links": [
8
{
9
"href": "https://us.rest.logs.insight.rapid7.com/management/logs/b653f62e-a576-4f59-b951-f5a66fa2c99f",
10
"rel": "Self"
11
}
12
],
13
"name": "Lambda Log"
14
},
15
{
16
"id": "85d72a1c-0ea5-4edc-aa30-599e85a1404f",
17
"links": [
18
{
19
"href": "https://us.rest.logs.insight.rapid7.com/management/logs/85d72a1c-0ea5-4edc-aa30-599e85a1404f",
20
"rel": "Self"
21
}
22
],
23
"name": "Lambda Log Debug"
24
}
25
],
26
"description": null,
27
"name": "New Name",
28
"id": "9206d871-d102-478f-b662-220538d2fbf9"
29
30
}
31
}

Sample Call

python
1
import json
2
import requests
3
4
rw_key = '00112233-4455-6677-8899-aabbccddeeff'
5
uri = 'management/logsets/3e4ece71-fb0f-4ed7-b57b-fccf2b661206'
6
body = {"logset":{"user_data":{},"logs_info":[{"id":"0c12af13-9b95-4ce0-acd6-1fb4461745e7","links":[{"href":"https://us.rest.logs.insight.rapid7.com/management/logs/0c12af13-9b95-4ce0-acd6-1fb4461745e7","rel":"Self"}],"name":"Lambda Log"},{"id":"7e0463fc-7135-4d96-83cf-856bef7cb44a","links":[{"href":"https://us.rest.logs.insight.rapid7.com/management/logs/7e0463fc-7135-4d96-83cf-856bef7cb44a","rel":"Self"}],"name":"Lambda Log Debug"}],"description":None,"id":"874241d4-a14a-4c98-b059-b30978baf951","name":"New Name"}}
7
8
def put_logset():
9
url = "https://us.rest.logs.insight.rapid7.com/" + uri
10
headers = {
11
'x-api-key': rw_key,
12
"Content-Type": "application/json"
13
}
14
r = requests.put(url, data=json.dumps(body, separators=(',', ':')), headers=headers)
15
print r.status_code, r.content
16
17
18
def start():
19
put_logset()
20
21
if __name__ == '__main__':
22
start()

Notes