Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »


Creating a Supply Router

SDK

Use tab completion with SDK to auto-complete function names or show field options!

In [40]: router = springserve.supply_routers.new({"name": "Test Router", "supply_partner_id":47340})                                                                                                                               

In [41]: print router.id, router.name
1764 Test Router

REST API

POST /api/v0/supply_routers

Headers

Content-Type application/json
Authorization "yourAuthToken"

Body (example)

{
"name": "Test Router",
"supply_partner_id":47340
}

Required parameters: name, supply_partner_id

Response

Status code 200


{
    "id": 1234,
    "account_id": 1,
    "name": "Test Router",
    "active": true,
    "supply_partner_id": 47340,
    "environment": "ctv",
    "domain_white_list": "",
    "app_name_white_list": "",
    "app_bundle_white_list": "",
    "ip_white_list": "",
    "country_white_list": "",
    "dma_white_list": "",
    "post_imp_detection_enabled": true,
    "post_imp_percentage_whiteops": 1,
    "post_imp_percentage_ias": 0,
    "post_imp_percentage_moat": 0,
    "post_imp_percentage_protected": 1,
    "post_imp_percentage_forensiq": 1,
    "pre_bid_blocking_enabled": false,
    "pre_bid_blocking_components": [],
    "key_ids": [],
    "min_aspect_ratio": null,
    "max_aspect_ratio": null,
    "format": "video",
    "third_party_override": true,
    "player_sizes": [
        "xs",
        "s",
        "m",
        "l",
        "xl",
        "u"
    ],
    "domain_list_ids": [],
    "app_bundle_list_ids": [],
    "app_name_list_ids": [],
    "ip_list_ids": [],
    "country_codes": [],
    "dma_codes": [],
    "user_agent_devices": [],
    "user_agent_brands": [],
    "user_agent_operating_systems": [],
    "user_agent_browsers": [],
    "segment_targeting_enabled": false,
    "tag_pixels": [],
    "segment_groups": [],
    "supply_router_ratios": []
}

Get a Supply Router

SDK

In [1]: per = springserve.supply_routers.get(1234)

In [2]: print router.name

"Test Router"

REST API

GET /api/v0/supply_routers/<id>

Headers

Content-Type application/json
Authorization "yourAuthToken"

Response

Status code 200


{
"id": 1234,
"account_id": 1,
"name": "Test Router",
"active": true,
"supply_partner_id": 12345,
"environment": "ctv",
"domain_white_list": "",
"app_name_white_list": "",
"app_bundle_white_list": "",
"ip_white_list": "",
"country_white_list": "",
"dma_white_list": "",
"post_imp_detection_enabled": true,
"post_imp_percentage_whiteops": 100,
"post_imp_percentage_ias": 0,
"post_imp_percentage_moat": 0,
"post_imp_percentage_protected": 0,
"post_imp_percentage_forensiq": 0,
"pre_bid_blocking_enabled": false,
"pre_bid_blocking_components": [],
"key_ids": [],
"min_aspect_ratio": null,
"max_aspect_ratio": null,
"format": "video",
"third_party_override": true,
"player_sizes": [
"xs",
"s",
"m",
"l",
"xl",
"u"
],
"domain_list_ids": [],
"app_bundle_list_ids": [],
"app_name_list_ids": [],
"ip_list_ids": [],
"country_codes": [],
"dma_codes": [],
"user_agent_devices": [],
"user_agent_brands": [],
"user_agent_operating_systems": [],
"user_agent_browsers": [],
"segment_targeting_enabled": false,
"tag_pixels": [],
"segment_groups": [],
"supply_router_ratios": [
{
"supply_tag_id": 123456,
"ratio": 35,
"fallback_supply_tag_id": null
},
{
"supply_tag_id": 654321,
"ratio": 30,
"fallback_supply_tag_id": null
},
{
"supply_tag_id": 321654,
"ratio": 35,
"fallback_supply_tag_id": null
}
]
}


Edit a Supply Router

SDK

In [1]: router = springserve.supply_routers.get(1234)

In [2]: router.name = "Test Router with new name"

In [3]: changed = router.save()


In [4]: changed.ok
Out [4]: True
In [5]: print changed.name

"Test Router with new name"

REST API

PUT /api/v0/supply_routers/<id>

Headers

Content-Type application/json
Authorization "yourAuthToken"

Body (example)

{
    "name": "Test Router with new name"
}

Response

Status code 200

{
"id": 1234,
"account_id": 1,
"name": "Test Router with new name",
"active": true,
"supply_partner_id": 12345,
"environment": "ctv",
"domain_white_list": "",
"app_name_white_list": "",
"app_bundle_white_list": "",
"ip_white_list": "",
"country_white_list": "",
"dma_white_list": "",
"post_imp_detection_enabled": true,
"post_imp_percentage_whiteops": 100,
"post_imp_percentage_ias": 0,
"post_imp_percentage_moat": 0,
"post_imp_percentage_protected": 0,
"post_imp_percentage_forensiq": 0,
"pre_bid_blocking_enabled": false,
"pre_bid_blocking_components": [],
"key_ids": [],
"min_aspect_ratio": null,
"max_aspect_ratio": null,
"format": "video",
"third_party_override": true,
"player_sizes": [
"xs",
"s",
"m",
"l",
"xl",
"u"
],
"domain_list_ids": [],
"app_bundle_list_ids": [],
"app_name_list_ids": [],
"ip_list_ids": [],
"country_codes": [],
"dma_codes": [],
"user_agent_devices": [],
"user_agent_brands": [],
"user_agent_operating_systems": [],
"user_agent_browsers": [],
"segment_targeting_enabled": false,
"tag_pixels": [],
"segment_groups": [],
"supply_router_ratios": [
{
"supply_tag_id": 123456,
"ratio": 35,
"fallback_supply_tag_id": null
},
{
"supply_tag_id": 654321,
"ratio": 30,
"fallback_supply_tag_id": null
},
{
"supply_tag_id": 321654,
"ratio": 35,
"fallback_supply_tag_id": null
}
]
}
  • No labels