[Spacewalk-list] help with api

Brian Collins brianc at sedata.com
Fri Nov 1 11:39:08 UTC 2013


> > Thanks, it's useful to hear it does work in python. Here is how I call the
> > api in my script for a single key.
> >
> > my $key = $opt_a;
> > # my $key = $client->string($opt_a); # this didn't work either
> > my $details = $client->call('activationkey.getDetails', $session, $key);
> >
> > At least I now have a workaround of doing it in python with a chunk of
> > working code to start from.
> 
> Interesting.  Mine doesn't work in Python.
> 
> #!/usr/bin/python
> (login stuff, define client, key)
> client.activationkey.listActivationKeys(key)
> # returns a list of dictionaries; I pick one, copy the key from it
> actkey='1-8a4bf8bf138495df5737ae8037310efd'
> client.activationkey.getDetails(key,actkey)
> (traceback)

This is resolved for us.  The user I was utilizing for the API call didn't have privileges to see activation keys.  Switching to a more privileged user fixed the problem.





More information about the Spacewalk-list mailing list