Slackbot
05/03/2023, 12:50 PMDavid Hamilton
05/03/2023, 12:50 PM{
"users": {
"alice": {
"roles": [
"admin"
],
"location": {
"country": "US",
"ip": "8.8.8.8"
}
},
"bob": {
"roles": [
"employee",
"billing"
],
"location": {
"country": "US",
"ip": "8.8.8.8"
}
},
"sunil": {
"roles": [
"guest"
],
"location": {
"country": "US",
"ip": "8.8.8.8"
}
},
"eve": {
"roles": [
"customer"
],
"location": {
"country": "US",
"ip": "8.8.8.8"
}
}
}
}
David Hamilton
05/03/2023, 12:52 PM{
"country": "US",
"ip": "8.8.8.8"
}
but what if I only wanted to update one field, say for example the ip
in this caseDavid Hamilton
05/03/2023, 12:53 PMDavid Hamilton
05/03/2023, 12:54 PM{"ip":"1.1.1.1"}
, then it will overwrite bob.location to only have the new ip and no countryDavid Hamilton
05/03/2023, 12:55 PMDavid Hamilton
05/03/2023, 12:57 PMDavid Hamilton
05/03/2023, 1:01 PMAsaf Cohen
05/03/2023, 1:03 PMAsaf Cohen
05/03/2023, 1:03 PMAsaf Cohen
05/03/2023, 1:03 PMDavid Hamilton
05/03/2023, 1:09 PMOr Weis
05/03/2023, 1:39 PMBrian Hyder
05/05/2023, 1:20 PMOr Weis
05/05/2023, 1:35 PMRo'e Katz
05/07/2023, 12:57 PMSteven Daniels
05/22/2023, 6:13 PMcurl --location --request PATCH '0.0.0.0:8181/v1/data/users/bob/roles' \
--header 'Content-Type: application/json-patch+json' \
--data-raw '[{
"op": "add",
"path": "-",
"value": "security"
}]'
Is this supported or scheduled to be worked on?Asaf Cohen
05/22/2023, 6:19 PMSteven Daniels
05/22/2023, 6:21 PMIt is in general better to work in OPA with dicts rather than lists for performance reasons.Do you have any metrics or other info about this?
Asaf Cohen
05/22/2023, 6:23 PM