cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA XSA. xs create-role with Attribute and JSON format with XS CLI

draschke
Active Contributor

Hi Experts,

I try to create a role with an attribute by XS CLI

How do we have to use it, if we want to include a JSON for "Static" and the "Value" in the command?

xs create-role TBASE  Display RoleDisplayAttrPatIDAll   "Role Display Attribute PatID for All" -s TEST {"key": "*"} {"key": "Static"}

I don't know, what kind of key we do have to use.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Hi Dirk,

I had the same problem. The expected JSON format is

{
  "here your Attribute Name" : {
    "value" : "<enter value here>",
    "source" : "static"
  }
}

So as a one liner your solution would be propably the following

xs create-role TBASE  Display RoleDisplayAttrPatIDAll   "Role Display Attribute PatID for All" -s TEST -a "{\"here your Attribute Name\" : {\"value\" : \"*\",\"source\" : \"static\"}}"

hope this helps

Matthias

draschke
Active Contributor
0 Kudos

Very nice, thank you it works!

Answers (0)