Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #4970] icinga web rest api updates #425

Closed
icinga-migration opened this issue Oct 29, 2013 · 4 comments
Closed

[dev.icinga.com #4970] icinga web rest api updates #425

icinga-migration opened this issue Oct 29, 2013 · 4 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/4970

Created by mfriedrich on 2013-10-29 21:50:13 +00:00

Assignee: Wolfgang
Status: Closed (closed on 2014-03-07 10:29:04 +00:00)
Target Version: 1.11
Last Update: 2014-03-07 10:29:04 +00:00 (in Redmine)

Icinga Version: 1.10.0

it's obviously wrong/has changed in recent versions.

20:15:03 < quickdry21> Hey, I'm trying to get the REST API going. Trying this URL 
http://example.com/icinga-web/web/api/service/filter[AND(HOST_CURRENT_STATE|=|0;OR(SERVICE_CURRENT_STATE|=|1;SERVICE_CURRENT_STATE|=|2))]columns(SERVICE_NAME|HOST_NAME|SERVICE_CURRENT_STATE|HOST_NAME|HOST_CURRENT_STATE|HOSTGROUP_NAME)order(SERVICE_CURRENT_STATE;DESC)/authkey=supersecret/json - I get {"result":[[],[],[],[]],"success":"true"} - proper number of 
                       hosts but no columns
20:15:03 < quickdry21> returned. Any thoughts?
20:18:44 < quickdry21> NVM. Figured it out. Documentation is wrong in two places - columns needs [] brackets, not (). columns needs to be separated by a / - this one worker 
http://example.com/icinga-web/web/api/service/filter[AND(HOST_CURRENT_STATE|=|0;OR(SERVICE_CURRENT_STATE|=|1;SERVICE_CURRENT_STATE|=|2))]/columns[SERVICE_NAME|HOST_NAME|SERVICE_CURRENT_STATE|HOST_NAME|HOST_CURRENT_STATE|HOSTGROUP_NAME]/authkey=supersecret/json

places to be corrected:

please ask web devs for details.

@icinga-migration
Copy link
Author

Updated by bstaz on 2013-12-11 18:54:06 +00:00

I ran into this as well. I actually began working with the API in 1.9.1, and then upgraded to 1.10 thinking that would fix my problem. Unfortunately I cannot go back and re-verify on 1.9.1.

In both docs listed the "Parameters in detail" section is correct, but the "Example for GET" has parenthesis instead of brackets. I feel like most people are going to copy that example to get started as I did, and unfortunately, completely miss the accurate details section.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-12-11 20:49:51 +00:00

  • Priority changed from Normal to High

@icinga-migration
Copy link
Author

Updated by Wolfgang on 2013-12-12 13:22:08 +00:00

  • Done % changed from 0 to 70

Commit ff9afcb in master

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-03-07 10:29:04 +00:00

  • Status changed from Assigned to Closed
  • Done % changed from 70 to 100

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant