Campaign

Creates a program campaign from the given stream program.

Changed on

The program is validated before the campaign is persisted; a malformed graph (missing root, dangling references, cycles, unreachable nodes) is rejected. The campaign starts in the Created status; move it to Active to start serving sessions.

post/campaign/program

Request

  • Base URL
    https://api.rapidata.ai
  • URL
    https://api.rapidata.ai/campaign/program
  • Auth
    OpenID Connect (https://auth.rapidata.ai/.well-known/openid-configuration, scopes: openid, profile, email, offline_access, api)

Request body

namestring required

The name of the campaign.

priorityinteger required

The priority weight the campaign competes with for sessions.

rootNodeIdstring required

The node the program's evaluation enters at.

nodesobject required

The program's decision graph, keyed by node id.

maxRapidsinteger required

The session ends after this many counted responses.

maxDurationSecondsinteger required

The session ends after this many seconds.

routingIdstring nullable

The routing that owns the work; its completion moves the campaign to analysis.

Response

OK

campaignIdstring required

The id of the created campaign.

Changes

    • info

      added the new optional request property

    • breaking

      removed from the ///////// request property oneOf list

    • info

      added CountryPredicate LanguagePredicate discriminator mapping keys to the ///////// request property

    • info

      removed UserAttributePredicate discriminator mapping keys from the ///////// request property

    • info

      added to the ///////// request property oneOf list