Zum Hauptinhalt springen

SaveCampaign

RPC Configuration

Rpc Name:

Plain: SaveCampaign
Sha1: 7ae008069191f1f0995bf53ea94302fa5a7234dc
Rpc Call

RPCs can be called by their plain name or their SHA1 representation.

Rpc I18n Name:

saveCampaignI18n

Rpc Parameters:

"building_id" : int,
"campaign_id" : int = -1,
"headline" : string = ,
"content" : ?string = null,
"date_start" : ?string = null,
"date_end" : ?string = null,
"temp_min" : ?float = null,
"temp_max" : ?float = null,
"weather" : mixed = null,
"beacon_id" : ?int = null,
"content_type" : string = NOCONTENT,
"cooldown_enter" : ?int = 10000,
"cooldown_exit" : ?int = 10000,
"tag_id" : ?string = null,
"accessibleOnly" : ?bool = ,
"campaign_type" : int = 1,
"teaser" : ?string = null,
"author" : ?string = null,
"source_type" : ?string = null
Parameter Description

Saves or Updates a Campaign. To create a new Campaign, transmit -1 campaign_id.
@param int building_id The Building ID the campaign should be connected to. If not a new campaign, the already used Building ID is required.


@param int campaign_id The Campaign ID of the campaign to edit, or -1 for a new campaign.


@param string headline The headline of the campaign


@param string content The content of the campaign


@param ?string date_start ISO 8601 formatted date string


@param ?string date_end ISO 8601 formatted date string


@param ?float temp_min Minimum current environmental air temperature to exec any trigger of this campaign


@param ?float temp_max Maximum current environmental air temperature to exec any trigger of this campaign


@param mixed weather A string or array of allowed weather types to exec any trigger of this campaign, values can be ['sunny', 'rainy', 'cloudy', 'snowy', null]


@param ?int beacon_id A beacon ID for a connected Access Point Id.


@param string content_type The Content of the Campaign, can be ['NOCONTENT', 'URI', 'AUDIO']


@param ?int cooldown_enter A cooldown time in ms, until the campaign won't be replayed, even if all other constraints are matched .Default: 10000,


@param ?int cooldown_exit A cooldown time in ms, until the campaign won't be replayed, even if all other constraints are matched .Default: 10000,


@param ?string tag_id A connected contagt id.


@param bool accessibleOnly If ture, this campaign will only be played to users with a screenreader active.


@param int campaign_type On of [1, 2, 4, 8, 16] where 1 = Regular Campaign, 2 = News, 4 = Info, 8 = External News, 16 = Orientation Point. Acts as a Flag, so can be bitwise connected by OR.


@param ?string teaser A short teaser text for the campaign.


@param ?string author A generic name of the author of the campaign.


@param ?string source_type A generic name of the source of the campaign. Usually Instagram, RSS or X (many more to follow).


@return array|bool

Requires Login:

true

Requires Context:

Context

The context providing parameter can either be a contagt-id (8-Bytes, Alphaumeric) or an integer as a building id. The context parameter name should make the choice obviouse, the type has not to be defined manually.

true

Requires contextParamName:

building_id

Requires WriteAccess:

WriteAccess

Only accounts that have an explicit write access to the defined context can execute this RPC, no matter if the authentication level matches or not.

true

Requires AuthenticationLevel:

Context

Authentication levels allow the SuperUser to define a by-RPC granular access configuration. If RPCs are chained in a single unified call and lenient is enabled, all allowed RPCs will be executed, while execution will fail entirely with lenient set to false.

LOCAL_ADMINISTRATOR

Requires Subbuilding Merge Strategy:

SUBBUILDING_ONLY

Cache Configuration

Response Cache

All writing RPCs are not Cacheable, also Caching will be disabled by the paramters nocache and readonly.

Cache enabled:

false

Sample Request

->

{
"building_id": 131,
"campaign_id": "115",
"content": "Herzlich willkommen in der Messe Freiburg. Zu Ihrer Rechten finden Sie die Information sowie die Toiletten. Geradeaus befindet sich die \"Halle 3\" der Messe. Auf der linken Seite befinden sich die Treppen in das Obergeschoss.",
"content_type": "AUDIO",
"cooldown_enter": "10000",
"cooldown_exit": "10000",
"date_start": "2017-12-21 00:00:00",
"date_end": "2017-12-21 00:00:00",
"headline": "Contagt Headquarters",
"tag_id": "Rl7fnB0M",
"temp_max": 17,
"temp_min": 4,
"weather": [
"rainy"
]
}

<-

false