inventory: create system fails with 404

RESOLVED FIXED

Status

mozilla.org Graveyard
Server Operations: Projects
RESOLVED FIXED
7 years ago
3 years ago

People

(Reporter: dustin, Assigned: rtucker)

Tracking

Details

As far as I can tell from the API docs and inventory.py, this is doing the right thing, but it gets a 404 :(

(sandbox)dustin@euclid ~/code/moz/t/mozinventory [master] $ mozinventory add foobar
Authorization: Basic ZG1pdGNoZWxsQG1vemlsbGEuY29tOjFnb2ZlciBkcm9wcGluZ3MgdGFzdGUgbmFzdHk=
POST http://inventory.mozilla.org/api/system/foobar/
ERROR:
Traceback (most recent call last):
  File "/home/dustin/code/moz/t/mozinventory/mozinventory/inventory.py", line 120, in create_request
    result_string = urllib2.urlopen(request).read()
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 400, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 513, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 432, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 619, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python2.7/urllib2.py", line 400, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 513, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 438, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 521, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: NOT FOUND
not found

From watching the web frontend, maybe I want POST /systems/new/?

The docs in https://mana.mozilla.org/wiki/display/SYSADMIN/inventory_api_system_create are, I think, copy/pasted and not completely edited..
(Assignee)

Comment 1

7 years ago
The docs were incorrectly stating http://, I updated to the correct https://
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.