# Non-optimized Aggregation via REST API: Flag for Detect Deleted Accounts

**URL:** <https://developer.sailpoint.com/discuss/t/non-optimized-aggregation-via-rest-api-flag-for-detect-deleted-accounts/8081>\
**Category:** SHF Discussion and Questions\
**Tags:** aggregation\
**Created:** [February 9, 2023, 5:05pm UTC](https://developer.sailpoint.com/discuss/t/non-optimized-aggregation-via-rest-api-flag-for-detect-deleted-accounts/8081 "2023-02-09T17:05:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushantkulkarni](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sushantkulkarni/32/35213_2.png) [@sushantkulkarni](https://developer.sailpoint.com/discuss/u/sushantkulkarni)\
**Post date:** [February 9, 2023, 5:05pm UTC](https://developer.sailpoint.com/discuss/t/non-optimized-aggregation-via-rest-api-flag-for-detect-deleted-accounts/8081/1 "2023-02-09T17:05:46Z")

</div>

The API call:  
`POST <api-url>/cc/api/source/loadAccounts/<source_id>`

This API can be used with `disableOptimization=true` flag for a non-optimized aggregation. Is there also a flag that can be added to enable detection of deleted accounts along with non-optimized aggregation? For some reason the detection of deleted accounts does not work during a non-optimized aggregation for a JDBC source. Is that expected?

Note that it works fine for a regular aggregation and deleted accounts are detected just fine.

---

<div class="post-metadata">

**Author:** ![RAKGDS](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/rakgds/32/2795_2.png) [@RAKGDS](https://developer.sailpoint.com/discuss/u/RAKGDS)\
**Post date:** [June 29, 2023, 2:30pm UTC](https://developer.sailpoint.com/discuss/t/non-optimized-aggregation-via-rest-api-flag-for-detect-deleted-accounts/8081/2 "2023-06-29T14:30:13Z")

</div>

Hi Sushant,  
I think that is expected behavior as you are bringing in all the account when optimization is disabled.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [August 28, 2023, 2:30pm UTC](https://developer.sailpoint.com/discuss/t/non-optimized-aggregation-via-rest-api-flag-for-detect-deleted-accounts/8081/3 "2023-08-28T14:30:17Z")

</div>

Closed on August 28, 2023, 2:30pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
