GET Label
GET Tag
Request used to get a specific Label
URL
https://REGION.rest.logs.insight.rapid7.com/management/labels/:label_id
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
label_id=1777de65-61c5-4adc-b7e3-a82d9d4df9e9
Data Params
None
Success Response
Code 200Content:
json
1{2"label": {3"id": "1777de65-61c5-4adc-b7e3-a82d9d4df9e9",4"sn": 1022,5"name": "DemoTag-Last 20min",6"color": "0000cc",7"reserved": false8}9}
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/1777de65-61c5-4adc-b7e3-a82d9d4df9e9"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?