Update Source (Full)

I am trying to update a source via the Update Source (Full) V3 API. I need to add the rules to the source for Connector and Cloud Rules. I am running into an issue and getting the following error.

“text”: “Illegal attempt to modify "id" field.”

i know from the documentation (put-source | SailPoint Developer Community) that Some fields are immutable and cannot be changed, such as:

  • id
  • type
  • authoritative
  • connector
  • connectorClass
  • passwordPolicies

however the ID does not appear to be part of the body so not sure where it’s being changed.

Can someone point me in the right direction?

Why don’t you just PATCH the source?

https://developer.sailpoint.com/idn/docs/rules/connector-rules#attaching-connector-related-rules-to-sources

Though the title says “Connector-executed” rules, it includes instructions for cloud rules as well

Nithesh, that appears to working. I am running into an issue with this part.

WebServiceAfterOperation Rule

PATCH /v3/sources/{id} Content-Type: application/json-patch+json

Note: Replace [] with the index location of the operation the way it is configured on the source. For example, 0, 1, 2, etc. You can use a GET call on the source first to verify the index location prior to executing the PATCH call to attach the rule*

i don’t understand the structure of the “Get” call? I hadn’t made an API call 9 months ago. Thanks for the guidance.

Hello @swcoleman ,

First you need to make a GET to https://{{tenant}}.api.identitynow.com/v3/sources/{source-id}
where, {{tenant}} is your org and {source-id} is the id of your Web Service Source.
In the GET response, search for your Web Service Operation (like Account Aggregation, Create Account, etc.) on which you want to apply the rule. Once found, check the index number (like 0, 1, 2, etc.).

Once you know the index, make a PATCH to https://{{tenant}}.api.identitynow.com/v3/sources/{source-id} Content-Type: application/json-patch+json

Body:

[
  {
    "op": "replace",
    "path": "/connectorAttributes/connectionParameters/{index}/afterRule",
    "value": "Example Rule"
  }
]

where {index} is the number value (like 0, 1, 2, etc.) which you received from previous GET response.

All the best!

1 Like

I don’t understand where to get the index value. Is that how far indented the row is? I don’t see anything labeled index in the response.

It is the order how the operations are listed in Source Configuration (first one has index 0). You can check the order from the UI

:slight_smile: that makes sense me. Thanks a lot. I am glad we have a great community for those of us that are just learning some of this.

1 Like

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