POST /api/source/loadAccounts

POST beta/sources/:id/load-accounts currently supports unoptimized aggregation.

How are you trying to call this APl?

Hello Dominick,

  1. If you use python, check previous answer from @christina_gagnon (POST /api/source/loadAccounts - #95 by christina_gagnon) : pass {“disableOptimization”: “true”} in files without header ‘Content-Type’: ‘multipart/form-data’.

  2. If you use Postman/etc, work for me like that (Bruno and not postman, but really close UI) :

Hope it’s help,
Good day

3 Likes

Hi Colin,

Can we now replace beta version of API in our scripts for account aggregation?

Or do we have to wait until the V3 is released?

Regards,
Shekhar Das

Through postman it is working fine. but while trying to run this from a powershell script i am facing issues. Only optimized aggregation is working The same was working fine with cc api’s.

I suggest you replace with the beta version until the v3 is available. The CC API may be turned off before a v3 is available.

2 Likes

Could you share the Powershell code you’re using and facing issue ?

2 Likes

Jishnu,

I found that you have to keep the multipart/form content type, and actually submit the disableOptimization as “true” in a form, and not in a regular JSON body. This is slightly different than the CC api in that way.

I also found in PostMan that if you submit just a regular JSON body you get a 200 back, but it doesn’t actually do an unoptimized aggregation.

The following code works for me in PowerShell

#set your headers appropriately
$boundary = [System.Guid]::NewGuid().ToString()
$LF = "`r`n"
$bodyLines = (
    "--$boundary",
    "Content-Disposition: form-data; name=`"disableOptimization`"$LF",
    "true",
    "--$boundary"
    ) -join $LF

    $transformsuri = "https://hostname.api.identltynow.com/beta/sources/sourceid/load-accounts"
    $transforms = Invoke-RestMethod -URI $transformsuri -Method POST -Headers $headers -ContentType "multipart/form-data; boundary=`"$boundary`"" -Body $bodyLines
5 Likes

Thankyou very much William for your reply. I will try this out.

Regards,
Jishnu

1 Like

Thanks @wtboice and @tdelorge-mmb for your responses. This is working for me now after trying William’s solution. Thankyou very much!

1 Like

Is it actually possible to trigger an unoptimized aggregation with this endpoint right now via JSON? So far I have been unable to. I can call the endpoint fine but I think the body ‘disableOptimization’ parameter is not being parsed correctly.

Hello Dominick,

The body with disableOptimization can’t be in Json format : see my previous reponse about this :

@wtboice produced an exemple with powershell :

If you still stuck, feel free to share with us your code/postman config :cowboy_hat_face:
Have a good day,

Hi, I am having a non expected behaviour. We have a client with a scheduled workflow, which periodically calls old private api to perform an non optimized aggregation.

I tested in postman this new call, and works fine. But when called from workflow (a simple http request action, with the disableOptimization/true field in a form body), it does aggregation, but with optimization disabled.

Hi,

Is there an ETA for the release of the endpoint in /v3?

Have a good day,

Thanks for confirming. I am trying to call this via a SP workflow so I’m not stuck per se but limited by the endpoint architecture.

I quickly tried on my side : Content-Type form-data doesn’t exist and I didn’t succeed to start an unoptimized aggregation :

Output :

 "input": {
        "formRequestBody": {
          "disableOptimization": "true"
        },
[...]
"task": {
            "attributes": {
              "optimizedAggregation": "enabled"
            },

@colin_mckibben : there is a trick right now to do unoptimized aggregation via workflow inside idn ?

1 Like

In its current implementation, you can’t trigger an unoptimized aggregation via workflows. Workflows doesn’t support form-data, and the API doesn’t have any other way to set the unoptimized flag.

1 Like

@colin_mckibben did this recently change? I have been calling the Private endpoint for months and need to keep doing this. We have issues were some accounts are getting created manually or with Entra created on prem by IDN but then get pushed to the cloud and we need to trigger unoptimized aggregations to make sure everything is correlated.

Then again maybe it stopped working. You can no longer see those aggregations on the source account aggregation page so it’s hard to check. The workflows have been completing successfully.so i assumed . . .

Here is the thread where i worked with someone on setting this up.Looking at the JSON of the workflow i can still see the “formRequestBody”: “disableOptimization:true”,

The private endpoint worked with workflows because it allowed you to send the unoptimized flag in an x-www-urlencoded payload. The new endpoint only supports form-data, and workflows does not support this.

1 Like

Hi Guys,

I am fairly new to SailPoint IDN and recently join a team working on a SailPoint project. Can any say how best it is to identity this deprecated endpoint (/api/source/loadAccounts) in SailPoint and the best way to replace it?

This was really helpful, thank you.

If anyone wants the curl command, to paste into Postman etc.

curl --location -g --request POST 'https://{{org_name}}.api.identitynow.com/beta/sources/{{sourceID}}/load-accounts' \
--header 'Content-Type: multipart/form-data' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--form 'disableOptimization="true"'
1 Like