Put AssetGroup Assets API erases already existing Assets in Asset Group and just adds the Assets which are provided as part of Put API input json data. So, as a work around we are trying to first retrieving the existing Assets in Asset Group using Get API and then along with retrieved existing Asset IDs appending the new asset IDs to be added to Asset Group. While performing this, for some of the Asset Groups, when trying to add back the existing Asset IDs along with new IDs, error stating “One or more asset ids in the request is invalid. Please verify that all assets exist and you have access to all assets in the request.” is displayed.
This might be due to some Asset IDs retrieved using Get API are no more part of Rapid7 (and are deleted).