GET Labels

GET Tag


Request used to get all Labels

URL

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

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

None

Data Params

None

Success Response

Code 200Content:

json
1
{
2
"labels": [
3
{
4
"id": "5bf12ea5-d064-4412-9d8f-71fc52ed9d12",
5
"sn": 1022,
6
"name": "DemoTag-Last 20min",
7
"color": "0000cc",
8
"reserved": false
9
},
10
{
11
"id": "15e996c9-4f43-4731-b214-e6eae66e4281",
12
"sn": 1014,
13
"name": "DemoTag-Wrap Text Button",
14
"color": "9b59b6",
15
"reserved": false
16
}
17
]
18
}

Error Response

Sample Call

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

Notes