Closed elpiel closed 2 years ago
Here's a non-exhaustive list of the identified changes required to move and alter the /units-for-slot
route to account for the V5 changes:
HTTP
method should be changed to POST
AdSlot
should be POST
-ed to the route in order to fetch AdUnit
s for the particular Ad type
accepted_referrers
, categories
& alexa_rank
, previously taken from the AdSlotResponse
of the Market, should be retrieved from the Platform (see https://github.com/AmbireTech/adex-platform/issues/625 for more details)AdSlot.fallback_unit
from the Platform
(again, see https://github.com/AmbireTech/adex-platform/issues/625 for more details)depositAsset
query parameters can now be renamed to be an array depositAsset[]
and even moved to the POST
-ed data instead of the query.Campaign
s (should be discussed what this actually means in V5 for this route)The statuses of campaigns/channels (in V4) is computed when they are collected from sentry, before they are put into the cache. Supermarket statuses, in order of the performed checks, linked to their V5 counter parts (if such exist):
:x: - No counterpart in V5 :question: - uncertain if such counterpart exists in V5
Is Finalized?
1.1. Is Channel expired? Utc::now() > channel.valid_until
=> Is Campaign active Utc::now() > campaign.active.to
1.2. :x: Is in withdraw period? Utc::now() > channel.spec.withdraw_period_start
1.3 Is channel exhausted? total_balances >= channel.deposit_amount
=> Has remaining budget (in Campaign)?
Is (Channel) initializing?
Is (Channel) Unsound? 3.1. Is (Channel) offline? 3.2. Is (Channel) disconnected? 3.3. Is rejected state (of Channel)? 3.4. Is (Channel) healthy?
Is (Channel) Active? (This status incorporates both Active & Ready statuses)
4.1. Is (Channel) Active?
4.2 Is (Channel) Ready? & channel.spec.active_from < Utc::now()
=> Is (Channel) Ready? & campaign.active.from < Utc::now()
If not Active and all other status checks have passed, then status is Waiting
Move Supermarket's
GET /units-for-slot
to sentryThe market will be fully integrated into the platform and the
units-for-slot
route will be moved to Sentry.AdSlot
will not be persisted in the database, instead, the wholeAdSlot
will be used in theadview-manager
to generate the ad view code.Initially for an active status of the
Campaign
simply use:Check out the platform issue for more details https://github.com/AmbireTech/adex-platform/issues/625