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": false9},10{11"id": "15e996c9-4f43-4731-b214-e6eae66e4281",12"sn": 1014,13"name": "DemoTag-Wrap Text Button",14"color": "9b59b6",15"reserved": false16}17]18}
Error Response
Sample Call
python
1import requests23API_KEY ='00112233-4455-6677-8899-aabbccddeeff'45def handle_response(resp):6response = resp7if response.status_code >= 200:8print response.status_code9print response.text10return111213def make_request():14headers = {'x-api-key': API_KEY}15url = "https://us.rest.logs.insight.rapid7.com/management/labels"16req = requests.get(url, headers=headers)17return req181920def print_query():21req = make_request()22handle_response(req)232425def start():26print_query()2728if __name__ == '__main__':29start()
Notes
Did this page help you?