Switch ambient plays on or off

patch/v1/test_helpers/simulation

Background (ambient) plays: while on, each simulated screen plays its campaigns during its site's opening hours, about plays_per_hour times an hour, each with the evidence its simulation profile describes. Off by default. Switching it on (or sending ambient: true again) runs it for 24 hours from now; it then switches itself off, so a forgotten sandbox stops making plays.

Access

Authentication
Secret key or OAuth access token.
Scope
test_helpers:write
User permission
developerAccess

Headers

  • Vojo-Versionstring

    Optional API version pin (a date). Overrides the version pinned on the secret key / organisation for this request. Echoed in the Vojo-Version response header. Within /v1 only additive changes ship, so most callers can omit it.

    date

Request body

at least 1 field

  • ambientboolean

    True switches ambient plays on for 24 hours from now (renewing if already on); false switches them off.

  • plays_per_hourinteger

    1 to 60

Response 200

OK

  • dataobjectRequired
    Show 6 fields
    • ambientbooleanRequired
    • ambient_untilstring or nullRequired

      When ambient plays switch themselves off; null while off.

      date-time

    • plays_per_hourintegerRequired

      Roughly how often each simulated screen plays while ambient is on.

      1 to 60

    • plays_todayintegerRequired

      Simulated plays started today (Europe/London), test plays included.

      at least 0

    • plays_per_day_limitintegerRequired
    • livemodeboolean

      False for an object in an integrator sandbox (test key), true otherwise. Always set on each object directly under data; absent on the same kind of object nested inside another.

  • metaobjectRequired

Response headers

  • Vojo-Versionstring

    The API version (date) this response was rendered with — the request's Vojo-Version, else the key/org pin.

  • RateLimitstring

    IETF RateLimit header: remaining quota in the current window, e.g. "default";r=97;t=42.

  • RateLimit-Policystring

    IETF RateLimit-Policy header, e.g. "default";q=100;w=60. Portal OAuth clients get a higher tier.

Errors

Every error is application/problem+json. Branch on its code.

  • 400

    Malformed request: invalid JSON, a bad cursor, a missing Vojo-Organisation for an OAuth caller, or an unknown Vojo-Version.

  • 401

    Missing, invalid, expired or revoked credential.

  • 403

    The caller is authenticated but not allowed: missing scope (insufficient_scope), missing Permissions flag (permission_denied), a client/installer persona on an operator endpoint (operator_access_required), or no access to the requested org (organisation_access_denied).

  • 422

    Well-formed request that failed validation. errors[] lists each failing field.

  • 429

    Rate limit exceeded for this principal. Back off for Retry-After seconds.

  • 500

    Unexpected server failure.