penfold Posted December 16, 2021 Posted December 16, 2021 I am trying to update some Assets in Tenable for some scans we have. I am able to change some of the fields that I need to, but I am lost when it comes to updating the asset itself. If I want to change the scan time or IP list etc I can use the Code below $update_asset = (ConvertTo-Json -compress @{ "maxScanTime"="12" "ipList"="" "assets"="38" }) $update_asset Invoke-RestMethod -Method PATCH -URI $URI -Headers $headers -Body $update_asset From what I can see this is because the format is "response" : { "id" : "4", "name" : "POSTtest", "description" : "This is a test for POST", "ipList" : "", "reports" : [], "assets" : [], But I am completely lost for the format I need to use when the structure is "assets" : [] Can someone please point me in the right direction?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now