Move and Bulk Move¶
The following model types can be enabled for this operation:
- Data models
- Device models
- Relations
For an API call that carries out a move on a <model_type>
, a POST payload in JSON format is added.
A move can only take place from a source hierarchy equal to or lower than [target_hierarchy]
.
Task
Move the instance with [pkid] to [target_hierarchy]
Call | URL | Parameters | Payload |
---|---|---|---|
POST | /api/tool/DataMove/ ?model_type= <model_type> | format=json hierarchy=[hierarchy] context_hierarchy= [target_hierarchy] (nowait=true) |
{“hrefs”: [“/api/<model_type>/[pkid]”]} |
Task
Move one or more model instances ([pkid1], [pkid2],…) from source hierarchy (pkid or dot notation) to target_hierarchy (pkid or dot notation).
Call | URL | Parameters | Payload |
---|---|---|---|
POST | /api/tool/DataMove/ ?model_type= <model_type> | format=json hierarchy=[hierarchy] context_hierarchy= [target_hierarchy] (nowait=true) |
{“hrefs”: [“/api/relation/Subscriber/[pkid1]”, “/api/relation/Subscriber/[pkid2]”, …]} |
For a list of hierarchy pkids and their dot notation available from [hierarchy], use the GET call:
GET api/relation/<model_type>/
?hierarchy=[hierarchy]
&format=json
&schema_rules=true