Creating subscriptions for queue in CLI

asked 2016-04-28 01:28:00 -0500

Neerja Narayan gravatar image

updated 2016-04-28 02:55:17 -0500

How do I add a subcription to a queue in Zaqar

A queue named sample queue is created with a 201 response. While I try to post a subscription to the queue I'm facing a Bad Request body error.

I have tired the following,

curl -i -X POST http://IP/v2/queues/samplequeue/subscriptions (http://IP/v2/queues/samplequeue/subsc...) -H "Content-type: application/json" -d '{'subscriber': 'mailto:fake@123.com', 'options': {'MessagingKeyMessagin': 'MessagingValueMessag'}, 'ttl': 361284}' -H "Client-ID: de305d54-75b4-431b-adb2-eb6b9e546014" -H "X-Auth-Token: fa23084ada85469cad4951ae4b2e51ca"

Response:

HTTP/1.0 400 Bad Request

Date: Thu, 28 Apr 2016 06:19:29 GMT

Server: WSGIServer/0.1 Python/2.7.6

content-length: 95

content-type: application/json

{ "title": "Invalid request body",

"description": "Request body could not be parsed."

}

Suggest where I'm going wrong :) Thanks in advance.

edit retag flag offensive close merge delete