Zum Hauptinhalt springen

UpdateCampaignConstraint

Class Description

Update an existing Constraint of an Campaign. Allowed Types are In the following are the different Constraint Types explained: Area:

{
"polygon": [
{
"lat": 49.4987505998679,
"lng": 8.468761816620828
},
{
"lat": 49.498707920852134,
"lng": 8.468733653426172
},
{
"lat": 49.49866829030414,
"lng": 8.468899279832842
},
{
"lat": 49.49874058336755,
"lng": 8.468873128294947
},
"floor": 2
]
}

Proximity: Integer of the Beacon-ID and proximity has to be configured Time:

{
"time": iso8601 Time,
"trigger": iso8601 Time for the Notification Moment,
"repeat": One of ['hour', 'day', 'week'] or null,
"activeHours": [8, 10, 14, 16] or null,
"activeWeekdays": [1, 3, 5] or null,
"activeMonths": [3, 7, 11] or null,
"activeYears": [2023, 2027] or null,
"radius": float in Meter
}

Example Config

{
"time": "10:30:00+02:00",
"trigger": "10:15:00+02:00",
"repeat": "hour",
"activeHours": [8, 10, 14, 16],
"activeWeekdays": null,
"activeMonths": null,
"activeYears": null,
"radius": "5000"
}

So this campaign should trigger at these times:

  • 2020-01-01 10:15 very first trigger
  • 2020-01-01 14:15 second ever trigger
  • 2020-01-01 16:15
  • 2020-01-02 08:15 first trigger on second day and not on these (and more):
  • 2020-01-01 08:15 before StartTime
  • 2020-01-01 11:15 not an active hour
  • 2020-01-01 12:15 also not an active hour

RPC Configuration

Rpc Name:

Plain: UpdateCampaignConstraint
Sha1: d33eccb1ac095444e289a19387aa833774a377ce
Rpc Call

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

Rpc Parameters:

"building_id" : int,
"campaign_id" : int,
"constraint_id" : int,
"constraint_type" : string,
"constraint_config" : mixed,
"proximity" : float = 2.5

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": 183,
"constraint_id": 165
}