Hi Muhammad, I've already figured out your answer, but thank you very much for it.
To Reapply a policy that hasn't been modified, I have to run three requests: Get+Put+Put
$SecGrpV1Url = https:// + $DCSserver + ":4443/sis-ui/api/v1/sa/securitygroups"
$GetSecGroup = Invoke-RestMethod -Method 'Get' -Uri $SecGrpV1Url/1501 -Header $header | ConvertTo-Json -Depth 10
$UpdateSecGroup = Invoke-RestMethod -Method 'Put' -Uri $SecGrpV1Url/1501 -Header $header -Body $GetSecGroup
$ReapplySecGroup = Invoke-RestMethod -Method 'Put' -Uri $SecGrpV1Url/1501/reapply -Header $header
It's just a shame that we get "Published state" in the error, while the documentation calls it APPLIED state.
Dima
[cid:
image001.jpg@01DCE881.1735A890][cid:
image002.gif@01DCE881.1735A890]
Dimitri Danishevski
Cyber Security Engineer
Mobile: +972 547005702
Mail:
dimitrid@malamteam.com<mailto:
dimitrid@malamteam.com>
Webex:
https://malamteam.webex.com/meet/dimitrid
Original Message:
Sent: 5/14/2026 11:13:00 AM
From: Muhammad Ihsan
Subject: RE: Reapply a policy with API
When a Security Group is already in APPLIED state, there is nothing to reapply, therefore, we send out error 437: Security Group already in published state.
User will have to update a policy applied to that SG. This action will move the SG to the Modified state and then the reapply API will return success.
-------------------------------------------