You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Arun Patel <ar...@gmail.com> on 2015/04/22 02:57:53 UTC

HBase REST API calls in JavaScript

My HBase application provides an API to ingest XML data.  I am able to make
successful PUT and GET calls to Hbase using below commands

PUT:

curl -k -H "Content-Type: application/xml" -H "Accept: application/xml" -d
'Rowkey and a column as an XML here'
https://hostname:8443/mySrvc/webapi/put/VVDRC

I get a successful response with a rowkey

GET:

curl -k -H "Accept: text/xml"
https://hostname:8443/mySrvc/webapi/get/VVDRC/rowkey

I get successful return of the row inserted with PUT.

Now, how do I make these REST API calls in a Javascript or java.
Javascript is preferred.  Please note my application will not be able to
make any connection with HBase.  It has to use above REST API calls only.

Please share any code snippet you might have.  Thanks a lot in advance.

Regards,
Arun

Re: HBase REST API calls in JavaScript

Posted by Ted Yu <yu...@gmail.com>.
Please take a look at:
https://developer.wordpress.com/docs/rest-api-javascript/

On Tue, Apr 21, 2015 at 5:57 PM, Arun Patel <ar...@gmail.com> wrote:

> My HBase application provides an API to ingest XML data.  I am able to make
> successful PUT and GET calls to Hbase using below commands
>
> PUT:
>
> curl -k -H "Content-Type: application/xml" -H "Accept: application/xml" -d
> 'Rowkey and a column as an XML here'
> https://hostname:8443/mySrvc/webapi/put/VVDRC
>
> I get a successful response with a rowkey
>
> GET:
>
> curl -k -H "Accept: text/xml"
> https://hostname:8443/mySrvc/webapi/get/VVDRC/rowkey
>
> I get successful return of the row inserted with PUT.
>
> Now, how do I make these REST API calls in a Javascript or java.
> Javascript is preferred.  Please note my application will not be able to
> make any connection with HBase.  It has to use above REST API calls only.
>
> Please share any code snippet you might have.  Thanks a lot in advance.
>
> Regards,
> Arun
>