Zum Hauptinhalt springen

SaveRoomTemplates

Class Description

Saves unconnected templates that then can be attached to tags.

RPC Configuration

Rpc Name:

Plain: SaveRoomTemplates
Sha1: 755bda25ebb0edb987f292b1907bdc7e86851d05
Rpc Call

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

Rpc Parameters:

"building_id" : int,
"templates" : array
Parameter Description


@param int building_id


@param object templates See schema/createRoomTempaltes.json


@throws \Exception

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.

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,
"templates": "[{\"room_id\":-1348268,\"room_name\":null,\"floor\":1,\"polygon\":[{\"lat\":\"49.49874517402\",\"lng\":\"8.46852438651\"},{\"lat\":\"49.49875730622\",\"lng\":\"8.46848732301\"},{\"lat\":\"49.49876943842\",\"lng\":\"8.46845025951\"},{\"lat\":\"49.49881694454\",\"lng\":\"8.46848711164\"},{\"lat\":\"49.49879267641\",\"lng\":\"8.46856125011\"},{\"lat\":\"49.4987886333\",\"lng\":\"8.46855811251\"},{\"lat\":\"49.498781381\",\"lng\":\"8.46855248445\"},{\"lat\":\"49.49877278232\",\"lng\":\"8.46854581156\"},{\"lat\":\"49.49876517544\",\"lng\":\"8.46853990834\"},{\"lat\":\"49.49874517402\",\"lng\":\"8.46852438651\"}],\"externalIdentifier\":null,\"agcolor\":\"#66f31d13\"},{\"room_id\":-1348269,\"room_name\":null,\"floor\":1,\"polygon\":[{\"lat\":\"49.49879267641\",\"lng\":\"8.46856125011\"},{\"lat\":\"49.49881694454\",\"lng\":\"8.46848711164\"},{\"lat\":\"49.49886242984\",\"lng\":\"8.46852239619\"},{\"lat\":\"49.49883816928\",\"lng\":\"8.46859654052\"},{\"lat\":\"49.49883113753\",\"lng\":\"8.46859108575\"},{\"lat\":\"49.49882395082\",\"lng\":\"8.46858551077\"},{\"lat\":\"49.49881813664\",\"lng\":\"8.4685810005\"},{\"lat\":\"49.49881050388\",\"lng\":\"8.4685750795\"},{\"lat\":\"49.49881033309\",\"lng\":\"8.46857494701\"},{\"lat\":\"49.49880307837\",\"lng\":\"8.46856931927\"},{\"lat\":\"49.49879267641\",\"lng\":\"8.46856125011\"}],\"externalIdentifier\":null,\"agcolor\":\"#66f31d13\"}]"
}