cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1403
Views
3
Helpful
5
Replies

Importing groupRules

smp
Level 4
Level 4

Our PI3.0.2 deployment experienced database corruption, and we were forced to stand up a new instance. Our old deployment is in a state where it will still respond to API calls, so I developed some automation to pull out the groupRules from the old deployment and push them into the new one. But when I attempt to push a rule with a 'criteria' that contains a percent sign (%), PI responds with the error 'Parameter 'criteria' contains invalid characters'. I'm using Python/JSON, and the data structure I'm trying to PUT looks like this:

{

  "groupRulesDTO": {

    "rules": {

      "rule": {

        "matchCondition": "AND",

        "field": "Device Name",

        "operation": "STARTS_WITH",

        "criteria": "us%-fargnpi"

      }

    }

  }

Can you advise on the proper way to escape the 'criteria' so it will be accepted by the PUT groups/groupRules API?


This data structure was pulled directly from another instance of PI, so it's a shame that it isn't in a format that I could simply turn around and use instead of having to fiddle with. In any case, I can reproduce with Postman. I've tried a few escape sequences that I could think of/find, but none have been successful so far.

1 Accepted Solution

Accepted Solutions

Just an update on this.  We have a fix for this issue that we will be including in the 3.0.3 Update 1 patch.  Thanks for reporting this issue

Edit: Forgot to mention, CSCuy02077 covers this issue (https://tools.cisco.com/bugsearch/bug/CSCuy02077).

View solution in original post

5 Replies 5

Spencer Zier
Cisco Employee
Cisco Employee

We've reproduced this issue internally.  We're looking into why there's a discrepancy between the API and the UI.  I'll update this thread once I know more.

Thank you for that confirmation Spencer. I look forward to the results of your analysis!

Just an update on this.  We have a fix for this issue that we will be including in the 3.0.3 Update 1 patch.  Thanks for reporting this issue

Edit: Forgot to mention, CSCuy02077 covers this issue (https://tools.cisco.com/bugsearch/bug/CSCuy02077).

Yay! Thanks for the update!

I can confirm the issue is resolved in 3.1. I am running my "rules copy" job right now .