nscp icon indicating copy to clipboard operation
nscp copied to clipboard

WEBServer / query.execute / Result as string (OK/WARNING/...)

Open Samuel-BF opened this issue 7 years ago • 2 comments

With current version, /api/v1/queries/check_xxx/commands/execute returns "result" field as an int (0/1/2/...), whereas /api/v1/queries/check_xxx/commands/execute_nagios returns "result" as a string (OK/WARNING/...), like in legacy API. This modification makes the behaviour consistent by always returning the string.

Note that I did not test the proposed modification.

Samuel-BF avatar Apr 06 '18 14:04 Samuel-BF

As this is a breaking change to the API i think it would be prudent to create a new version right?

mickem avatar Apr 12 '18 09:04 mickem

As you like. There are no known open-source API clients relying on APIv1 yet. So it should not annoy lot of people.

Samuel-BF avatar Apr 16 '18 09:04 Samuel-BF