Uptycs Alert Triggers API Call

Uptycs Alert Triggers API Call

This python module can be run to trigger Uptycs API calls from Uptycs alerts. 


Example: An alert is configured to fire when asset location is not in USA (possible GDPR issue). This python can then be run to automatically make an API call to disable the asset (so it stops collecting data). 


api_call_from_alert.py


Usage: ./api_call_from_alert.py <uptycs_apikey_file> [--domainsuffix <uptycs_domain>]


The --domainsuffix flag is only required for uptycs domains other than '.uptycs.io'


This python script reads alerts from Uptycs and then makes Uptycs API calls. 

Each type of Uptycs alert to be processed must have a corresponding config file in 

the "./alert_config/" directory. Each config file has the Uptycs alert code and details 

of the API call to make.  


Each time this script is run it pulls alerts for codes specified in the ./alert_config/*.json files

with timestamp greater than the last run time and less than the current run time. 

The first time it is run it goes back a maximum of 1 day. 

We recommend running this script every 30 mins and specifying a maximum interval of 15 mins

for SQL alerts. 

 

    • Related Articles

    • API calling via Swagger

      Go To the "Account Settings". Click the "CREATE" button to generate API keys, which will be downloaded in JSON format. The downloaded JSON will contain information such as customerId, API key, API Secret, Domain, DomainSuffix, and other relevant ...
    • How to Retrieve Software Bill of Materials (SBOM) Using the Uptycs API: A Step-by-Step Guide

      To get SBOM(Software Bill of Material) information for your resource through Uptycs API, follow below step → Obtain Access Keys: • Login to the Uptycs console • Go to Account Settings • Create an API Key • Download the API Key in JSON format. For ...
    • Python helper module for Uptycs API

      The attached helper module (uptapi.py) and demo program (uptdemo.py) show how to access Uptycs API from Python 3. 
    • Provisioning roles using API

      Overview Starting with Uptycs portal release 46025, Uptycs provides entity level granular user permissions through roles. This document outlines the process to create roles using API - with examples. Procedure -- Create a new role $ urestapi -k ...
    • Create Custom Threat Source using API

      The article includes the API query to create and update the threat source. We support uploading CSV as of now. To create Threat source: curl --location --request POST ...