Table of Contents maxLevel 3 minLevel 2
...
Create a Budget
Required parameters: budget_metric, budget_value, budget_period
Optional parameter: budget_pacing (if you leave blank it defaults to ASAP)
Budget pacing values: "front_loaded" or "even"
...
Code Block |
---|
In [1]: import springserve In [2]: tag = springserve.demand_tags.get(30424) In [3]: new_budget = { "budget_metric": "requests", #mandatory "budget_period": "day", #mandatory "budget_pacing": "even", #optional "budget_value": 300 #mandatory "vast_caching_adjustment": True, #optional "vast_caching_lookback_seconds": None, #optional "vast_caching_multiplier": None, #optional "ignore_supply_allocations": False, #optional "budget_value_currency": "USD" #optional } In [4]: tag.budgets.append(new_budget) In [5]: tag.save() In [6]: tag.ok Out [5]: True |
...
Code Block |
---|
{
"id": 316932,
"account_id": 391,
"name": "test_tag",
"active": true,
"rate": "0.01",
…
"budgets": [
{
"id": 139151,
"budget_metric": "requests",
"budget_period": "day",
"budget_pacing": null,
"budget_value": 300,
"vast_caching_adjustment": True,
"vast_caching_lookback_seconds": None,
"vast_caching_multiplier": None,
"ignore_supply_allocations": False,
"budget_value_currency": "USD"
}
],
"frequency_caps": []
} |
...