Configure Algorithm distribution

Configure Algorithm distribution

POST https://api.ocamba.com/v2/adex/zones/{zone_id}/distribute-search-algos

Configures the distribution for Algorithms

Path parameters

parameters

Request schema

body
POST https://api.ocamba.com/v2/adex/zones/{zone_id}/distribute-search-algos HTTP/1.1
Host: api.ocamba.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
{
  "distribute": 1,
  "algo_distribution": [
    {}
  ]
}
curl -X POST "https://api.ocamba.com/v2/adex/zones/{zone_id}/distribute-search-algos" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"distribute":1,"algo_distribution":[{}]}'
fetch("https://api.ocamba.com/v2/adex/zones/{zone_id}/distribute-search-algos", {
  method: "POST",
  headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify(
    {
      "distribute": 1,
      "algo_distribution": [
        {}
      ]
    }
  )
}).then(r => r.json());
$ch = curl_init("https://api.ocamba.com/v2/adex/zones/{zone_id}/distribute-search-algos");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer $token",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "distribute" => 1,
    "algo_distribution" => [
      []
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

204 No Content

HTTP/1.1 204 No Content
Content-Type: application/json
Responses

Tip
1
If you don’t know the zone id, list the zones to find it.
2
If you don’t know the search algorithm id, list the search algorithm to find it.
Note
1
Sum of distribution rates across all active algorithms must be 100.