Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions mq/reference/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ POST /projects/<span class="variable project_id">{Project ID}</span>/queues/<spa

The following parameters are all related to Push Queues.

* **subscribers**: An array of subscriber hashes containing a "url" field. This set of subscribers will replace the existing subscribers. See [Push Queues](/mq/reference/push_queues/) to learn more about types of subscribers. To add or remove subscribers, see the <a href="#add_subscribers_to_a_queue">add subscribers endpoint</a> or the <a href="#remove_subscribers_from_a_queue">remove subscribers endpoint</a>. The maximum is 64kb for JSONify array of subscribers' hashes. See below for example JSON.
* **subscribers**: An array of subscriber hashes containing a required "url" field and an optional "headers" map for custom headers. This set of subscribers will replace the existing subscribers. See [Push Queues](/mq/reference/push_queues/) to learn more about types of subscribers. To add or remove subscribers, see the <a href="#add_subscribers_to_a_queue">add subscribers endpoint</a> or the <a href="#remove_subscribers_from_a_queue">remove subscribers endpoint</a>. The maximum is 64kb for JSON array of subscribers' hashes. See below for example JSON.
* **push_type**: Either `multicast` to push to all subscribers or `unicast` to push to one and only one subscriber.
Default is `multicast`. To revert push queue to reqular pull queue set `pull`.
* **retries**: How many times to retry on failure. Default is 3. Maximum is 100.
Expand All @@ -305,7 +305,10 @@ Default is `multicast`. To revert push queue to reqular pull queue set `pull`.
"push_type":"multicast",
"subscribers": [
{"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_1"},
{"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_2"}
{
"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_2",
"headers": {"Content-Type": "application/json"}
}
]
}
{% endhighlight %}
Expand All @@ -324,7 +327,7 @@ Default is `multicast`. To revert push queue to reqular pull queue set `pull`.
"retries_delay":60,
"subscribers":[
{"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_1"},
{"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_2"}
{"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_2", "headers": {"Content-Type": "application/json"}}
]
}
{% endhighlight %}
Expand Down Expand Up @@ -352,14 +355,17 @@ POST /projects/<span class="variable project_id">{Project ID}</span>/queues/<spa

The following parameters are all related to Push Queues.

* **subscribers**: An array of subscriber hashes containing a "url" field. See below for example. See [Push Queues](/mq/reference/push_queues/) to learn more about types of subscribers.
* **subscribers**: An array of subscriber hashes containing a required "url" field and an optional "headers" map for custom headers. See below for example. See [Push Queues](/mq/reference/push_queues/) to learn more about types of subscribers.

### Request

{% highlight js %}
{
"subscribers": [
{"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_2"}
{
"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_2",
"headers": {"Content-Type": "application/json"}
}
]
}
{% endhighlight %}
Expand All @@ -378,7 +384,7 @@ The following parameters are all related to Push Queues.
"retries_delay":60,
"subscribers":[
{"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_1"},
{"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_2"}
{"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_2", "headers": {"Content-Type": "application/json"}}
]
}
{% endhighlight %}
Expand Down