ibettinger / racktables-py-client

Python library for Racktables API
16 stars 9 forks source link

Permission Denied with add_objection #1

Open kylebrandt opened 11 years ago

kylebrandt commented 11 years ago

Hi Ian,

Already plugging away with this. I am getting permission denied when I try to add an object (However, the object gets added).

I think maybe it is an issue with the redirect design in the the API itself? So for example there is:

redirectUser( $_SERVER['SCRIPT_NAME'] . "?method=get_object&object_id=$object_id" );

I'm guessing $_SERVER doesn't have the username and pass, so that redirect returns access is denied when using some sort of auth scheme? Does that make sense?

kylebrandt commented 11 years ago

When I try the raw API via the browser... get index.php thrown in there for some reason:

The redirect ends up point to:

https://racktables.foo.com/index.php?page=/api.php?method=get_object&object_id=318&tab=

Notice the /index.php?page=api.php?