[ 
https://issues.apache.org/jira/browse/HBASE-14147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15205636#comment-15205636
 ] 

Matt Warhaftig commented on HBASE-14147:
----------------------------------------

Hi [~misty],  It looks like specifying {{-H "Content-Type: text/xml"}} results 
in a 400 Bad Request if the curl statement does not also include the -data 
argument.

To create a namespace with no namespace properties specified you can do:
 {noformat}curl -vi -X POST -H "Accept: text/xml" 
"http://localhost:20550/namespaces/namespaceName"{noformat}

Or to create a namespace with property key1=value1 specified via xml you can do:
{noformat}curl -vi -X POST -H "Accept: text/xml" -H "Content-Type: text/xml" -d 
"<?xml version=\"1.0\" encoding=\"UTF-8\" 
standalone=\"yes\"?><NamespaceProperties><properties><entry><key>key1</key><value>value1</value></entry></properties></NamespaceProperties>"
 "http://localhost:20550/namespaces/namespaceName"{noformat}

> REST Support for Namespaces
> ---------------------------
>
>                 Key: HBASE-14147
>                 URL: https://issues.apache.org/jira/browse/HBASE-14147
>             Project: HBase
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 1.1.1
>            Reporter: Rick Kellogg
>            Assignee: Matt Warhaftig
>            Priority: Minor
>             Fix For: 2.0.0, 1.2.0, 1.3.0, 0.98.15
>
>         Attachments: SuccessfulLocalBuild.txt, hbase-14147-v1.patch, 
> hbase-14147-v1.patch, hbase-14147-v1.patch
>
>
> Expand REST services to include addition features:
> * Create namespace
> * Alter namespace
> * Describe namespace
> * Drop namespace
> * List tables in a specific namespace
> * List all namespaces.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to