cassandra-reaper
cassandra-reaper copied to clipboard
JSON Formatting Issue in API Calls
API responses are returned in json format with the exception of the first two lines. For example:
sreaper.py list-runs --reaper-host reaper.myhostname.com --reaper-port=80
Response:
# Listing repair runs
# Found 312 repair runs
[
{
"blacklisted_tables": [],
etc., etc.,
This requires some extra handling on our side to separate the response into non-json and json, and to ensure we are passing only the valid bits to our json filter (jq). I'm curious as to what your thougjts would be on ommitting the commented lines (shown above).
Thanks, and keep up the great work!
┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: REAP-162
Thanks @jordanwilson230
Indeed the output need to be cleaned up a bit. Some work was recently done to standardise the REST outputs: only resource queries return json entities and commands return either a message or a redirect to the resource.
But this effort didn't extend to spreaper.