GET Tag
GET Tag
Request used to get a specific Tag
URL
https://REGION.rest.logs.insight.rapid7.com/management/tags/:tagid
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
tagid=[UUID]
Example Value: de305d54-75b4-431b-adb2-eb6b9e546014
Data Params
None
Success Response
Code 200Content:
json
1{2"tag": {3"type": "Alert",4"id": "de305d54-75b4-431b-adb2-eb6b9e546014",5"name": "Power Button Pressed",6"sources": [],7"actions": [8{9"id": "de305d54-75b4-431b-adb2-eb6b9e546014",10"min_matches_count": 1,11"min_report_count": 1,12"min_matches_period": "Day",13"min_report_period": "Day",14"targets": [15{16"id": null,17"type": "Mailto",18"params_set": {19"direct": "user@example.com",20"teams": "",21"users": "user@example.com"22},23"alert_content_set": {}24}25],26"enabled": false,27"type": "Alert"28}29],30"patterns": [31"Power Button as"32],33"labels": [34{35"id": "de305d54-75b4-431b-adb2-eb6b9e546014",36"sn": 1056,37"name": "Power Button",38"color": "007afb",39"reserved": false40}41]42}43}
Error Response
If the Tag can not be found
Code 404 NOT FOUND
Sample Call
python
1import requests2import json3import time456API_KEY = 'YOUR API KEY GOES HERE'7TAG_ID = 'YOUR TAG ID GOES HERE'89def handle_response(resp):10response = resp11time.sleep(5)12if response.status_code == 200:13print json.dumps(resp.json(), indent=4)14else:15print response.status_code161718def make_request(provided_url=None):19headers = {'x-api-key': API_KEY}2021url = "https://us.rest.logs.insight.rapid7.com/management/tags/" + TAG_ID22req = requests.get(url, headers=headers)23return req242526def print_query():27req = make_request()28handle_response(req)2930def start():31print_query()323334if __name__ == '__main__':35start()
Notes
Did this page help you?