Announcement

Collapse
No announcement yet.

Method not found error.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • xoroz
    replied
    too bad we can not even filter by STATUS as explained in the documentation... very sad

    GET /centreon/api/index.php?action=list&object=centreon_realtime_ser vices&viewType=problems&fields=host_name,state,out put&status=critical HTTP/1.1


    HTTP/1.1 400 Bad Request

    Leave a comment:


  • kermith72
    replied
    Hello,

    There is no space for the action keyword "action=li st" , so the command is like this
    Code:
    curl -s 'http://localhost/centreon/api/index.php?object=centreon_realtime_hosts&action=list' -H 'Content-Type: application/json' -H 'centreon-auth-token: NWE4ODFmMjFlZWIwNTcuMzczMTI4ODY='
    Part of the result
    Code:
    [{"id":"23","name":"Central","alias":"Serveur de supervision","address":"localhost","state":"0","state_type":"1","output":"OK - localhost: rta 0,040ms, lost 0%","max_check_attempts":"2","check_attempt":"1","last_check":"1518870139","last_state_change":"1517850519","last_hard_state_change":"1517850519","acknowledged":"0","instance_name":"Central","criticality":"1"},{"id":"24","name":"vmtechpoller","alias":"poller","ad.....
    What is the version of the Centreon-web ?

    Leave a comment:


  • pstokyo
    started a topic Method not found error.

    Method not found error.

    Hi,

    I have successfully get an authentication from Centreon.

    curl -s --data 'username=user&password=*****' 'http://localhost/centreon/api/index.php?action=authenticate'

    but I am not able to get hosts status due to "Method not found " error

    curl -s 'http://localhost/centreon/api/index.php?object=centreon_realtime_hosts&action=li st' -H 'Content-Type: application/json' -H 'centreon-auth-token: ######################'

    "Method not found"

    Does anyone have encountered same problem, please let me know.
    Thank you very much!!!!

    PS. I already give a permission the user "reach API", and access all lists.
Working...
X