IDN: Attaching Connector-Related Rules to Sources - PATCH API not working

Use case:

I have a web service connector. I want to make an POST authentication call and retireve the token from cookie value.

I want to use Web Services After Operation Rule. I have written the source code, validated and created the rule.

Now, to assign this rule to the source, I have to make a PATCH call:

PATCH /v3/sources/{id}
[
{
“op”: “replace”,
“path”: “/connectorAttributes/connectionParameters/[*]/afterRule”,
“value”: “Example Rule”
}
]

This is the response I see when I make the above call:
{
“detailCode”: “400.1 Bad request content”,
“trackingId”: “id”,
“messages”: [
{
“locale”: “und”,
“localeOrigin”: “REQUEST”,
“text”: “The request was syntactically correct but its content is semantically invalid.”
},
{
“locale”: “en-US”,
“localeOrigin”: “DEFAULT”,
“text”: “The request was syntactically correct but its content is semantically invalid.”
}
],
“causes”:
}

Please suggest if I am missing anything?

Thank you.

:bangbang: Please be sure you’ve read the docs and API specs before asking for help. Also, please be sure you’ve searched the forum for your answer before you create a new topic.

I believe you do it a bit wrong - you should use this api method

Here you can find more about connector rules

And here is direct link to pasted document

1 Like

@kjakubiak Thanks for the input Kamil.

I followed this documentation, so it said “replace”: Connector Executed Rules | SailPoint Developer Community

Question:

From your mesage above, the value: [
“Example Rule 1”]

Should we use the rule name? or Rule ID?

Thank you

@sita_ram , Have you tried using the Yannick Vscode extension?

You can simple wirte the attribute hit CTRL+S and save the connector. it you do the patch for you.

1 Like

Thanks for your input @ipobeidi
Could you please provide an example of the attribute? or point me to any documentation.

I have VS Code extension, but not sure what attribute I have to change.

  1. Open the source in VS Code
  2. Under connectorAttributes/connectionParameters find the specific operation where you want to apply the rule
  3. Add "afterRule":"Name of your After operations rule", to the existing json of the operation
  4. Save file
1 Like

@kjakubiak this method is applicable when you are adding these rules to AD or Azure sources

1 Like


per @ipobeidi 's suggestion

1 Like

Thank you @iam_nithesh. I will try this and update if I am successful.

Thank you @KevinHarrington, this is helpful.

I am able to add the afterRule to the Source connectorAttribute.

How can I use this token I retrieved using the afterRule in different HTTP operations?

When we get any reponse in the body, we can use $application.sessionId$.

In my case, how can I use the token?

@KevinHarrington , @iam_nithesh , @ipobeidi , @colin_mckibben Please advise