Skip to content

Commit a4b1510

Browse files
committed
Bump v3 API docs version release-candidate
1 parent 5e345ee commit a4b1510

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

version/release-candidate/index.html

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18181,7 +18181,17 @@ <h3 id="the-route-options-object">The route options object</h3>
1818118181
<tr>
1818218182
<td><strong>loadbalancing</strong></td>
1818318183
<td><em>string</em></td>
18184-
<td>The load-balancer associated with this route. Valid values are &lsquo;round-robin&rsquo; and &lsquo;least-connection&rsquo;</td>
18184+
<td>The load-balancer associated with this route. Valid values are &lsquo;round-robin&rsquo;, &lsquo;least-connection&rsquo;, and &lsquo;hash&rsquo;</td>
18185+
</tr>
18186+
<tr>
18187+
<td><strong>hash_header</strong></td>
18188+
<td><em>string</em></td>
18189+
<td>HTTP header name to hash for routing (e.g., &lsquo;X-User-ID&rsquo;, &lsquo;Cookie&rsquo;). Required when loadbalancing is &lsquo;hash&rsquo;. Cannot be set when loadbalancing is not &lsquo;hash&rsquo;.</td>
18190+
</tr>
18191+
<tr>
18192+
<td><strong>hash_balance</strong></td>
18193+
<td><em>string</em></td>
18194+
<td>Weight factor for load balancing (1.1 - 10, or 0 for disabling balancing). Higher values consider load more. Optional when loadbalancing is &lsquo;hash&rsquo;. Cannot be set when loadbalancing is not &lsquo;hash&rsquo;.</td>
1818518195
</tr>
1818618196
</tbody></table>
1818718197
<h3 id="create-a-route">Create a route</h3>
@@ -18204,7 +18214,7 @@ <h3 id="create-a-route">Create a route</h3>
1820418214
},
1820518215
"options": {
1820618216
"loadbalancing": "round-robin"
18207-
}
18217+
},
1820818218
"metadata": {
1820918219
"labels": { "key": "value" },
1821018220
"annotations": { "note": "detailed information"}
@@ -18372,6 +18382,30 @@ <h4 id="permitted-roles">Permitted roles</h4>
1837218382
<td>Space Supporter</td>
1837318383
</tr>
1837418384
</tbody></table>
18385+
18386+
<h4 id="example-with-hash-based-routing">Example with hash-based routing</h4>
18387+
<div class="highlight"><pre class="highlight shell"><code>curl <span class="s2">"https://api.example.org/v3/routes"</span> <span class="se">\</span>
18388+
<span class="nt">-X</span> POST <span class="se">\</span>
18389+
<span class="nt">-H</span> <span class="s2">"Authorization: bearer [token]"</span> <span class="se">\</span>
18390+
<span class="nt">-H</span> <span class="s2">"Content-type: application/json"</span> <span class="se">\</span>
18391+
<span class="nt">-d</span> <span class="s1">'{
18392+
"host": "user-specific-app",
18393+
"relationships": {
18394+
"domain": {
18395+
"data": { "guid": "domain-guid" }
18396+
},
18397+
"space": {
18398+
"data": { "guid": "space-guid" }
18399+
}
18400+
},
18401+
"options": {
18402+
"loadbalancing": "hash",
18403+
"hash_header": "X-User-ID",
18404+
"hash_balance": "50.0"
18405+
}
18406+
}'</span>
18407+
</code></pre></div>
18408+
<p>This creates a route that uses hash-based routing on the <code class="prettyprint">X-User-ID</code> header with a load balance factor of 50.0.</p>
1837518409
<h3 id="get-a-route">Get a route</h3>
1837618410
<div class="highlight"><pre class="highlight plaintext"><code>Example Request
1837718411
</code></pre></div><div class="highlight"><pre class="highlight shell"><code>curl <span class="s2">"https://api.example.org/v3/routes/[guid]"</span> <span class="se">\</span>

0 commit comments

Comments
 (0)