AnsweredAssumed Answered

Increasing Verbosity in MapR Rest API

Question asked by mandoskippy on Aug 28, 2017
Latest reply on Oct 9, 2017 by maprcommunity

I am looking for a way to have the MapR Rest API provide help back the way Maprcli does.  I am writing an interface for users to be able to do things (within their power) like create a stream in their home directory.   

 

Basically, when I type maprcli create stream (with no parameters) the maprcli gives me:

 

maprcli stream create

stream create

-path Stream Path

[ -ttl Time to live in seconds. default:604800 ]

[ -autocreate Auto create topics. default:true ]

[ -defaultpartitions Default partitions per topic. default:1 ]

[ -compression off|lz4|lzf|zlib. default:inherit from parent directory ]

[ -produceperm Producer access control expression. default u:creator ]

[ -consumeperm Consumer access control expression. default u:creator ]

[ -topicperm Topic CRUD access control expression. default u:creator ]

[ -copyperm Stream copy access control expression. default u:creator ]

[ -adminperm Stream administration access control expression. default u:creator ]

[ -copymetafrom Stream to copy attributes from. default:none ]

 

 

However, when I requests /rest/stream/create I get

 

{"timestamp":1503923145535,"timeofday":"2017-08-28 12:25:45.535 GMT+0000","status":"ERROR",
"errors":
[{"id":22,"desc":"Required parameter: path is missing and no valid default value provided"}]}

Which isn't as helpful to a user I'd like to be able to get a similar response back
from the API so I can format and provide to the user.   Any ways to do that?

Thanks!

John

Outcomes