After some more testing, I found that taking the quotes out of the inside hash and placing the quotes around the entire hash works:
"value": "{some: thing}" That works. The problem is that that's not how it gets reported from the API, if you query for that information, it quotes in inside hash key and value. I'm essentially trying to migrate massive amounts of parameter overrides from one foreman server to another for a server migration and I can't see an easy way to do that if the json the API spits out on one server cannot be accepted in that form on the new server. Does anyone have any experience in importing/exporting parameter overrides between servers? Thanks. On Monday, October 24, 2016 at 1:24:11 PM UTC-7, Jack Watroba wrote: > > I'm attempting to create smart parameter overrides via the API (version > 1.13) and I'm having some issues. > > Posting to: /api/smart_class_parameters/{paramID}/override_values > > JSON being posted: > > { > "override_value": { > "match": "hostgroup=somehostgroup", > "value": {"some": "thing"} > } > } > > > I receive this message back from the API: "error": {"message":"Validation > failed: Value can't be blank"} > > The parameter is set to be a hash and I'm passing it a hash, so I can't > figure out why it's reporting the value is blank. > > Any ideas? > > Thanks. > -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.