Delete assets offline since a particular date using the API

Delete assets offline since a particular date using the API

This script / procedure outlines the process to delete assets which have been offline before a particular date.


Prerequisite tools


iusql

urestapi


Procedure


Download api key from Uptycs UI

Download attached script, delete_offline_assets_since.sh

    chmod +x delete_offline_assets_since.sh

Execute the script using following parameters

    ./delete_offline_assets_since.sh <api_key_file> "<date>"

    e.g. ./delete_offline_assets_since.sh my_api_key_file.json "2019-01-01"


    • Related Articles

    • Delete duplicate assets using the API

      Duplicate asset (hostname) on Uptycs platform could be a result of particular asset being in rotation or being used a a loaner laptop in which case, uuid of the asset remains the same and the asset is recorded under different hostnames. Following ...
    • 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 ...
    • Python script to delete asset by providing the hostname

      To use this python script, place the API credentials json file and this script in the same folder and run this script from that folder. Inputs to this script : fileName of the JSON Credentials file HostName of asset to be deleted External modules ...
    • Create Custom Event Exclusion Profile via API

      It may be a lengthy process to create an event exclusion profile with many entries using the GUI. This article shows how to create two custom event exclusion profiles via the API. The urestapi tool is used (https://pypi.org/project/urestapi/).  ...
    • 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 ...