Import from WLP API

Topic: Import from WLP API

I am trying to create a unit by importing the WLP file via API (or assign the WLP settings to an existing unit)

I am trying to replicate this via postman but it is not entirely clear to me how I can assign these wlp settings to a unit. Where do I assign the unit id?

I am following the documentation in https://sdk.wialon.com/wiki/en/sidebar/ … mport_json
I made a post request to the endpoint svc=exchange/import_json&params={}
I uploaded an image of my form_data to the attachments. I receive back a status 200 with an empty object {}

This API request is not entirely clear to me. How shall I go about this?



Import from WLP API

Re: Import from WLP API

Looking at other related posts, it seems like this API does not do what I thought it would do.

My goal is to duplicate a unit's properties and create a new unit with those properties via API. I know I can simply create a unit and then edit its properties with an x amount of API calls but this approach is not ideal (what is 1 API call fails? the unit would get created without all the right properties). Would have loved to have some kind of unit duplication feature via API.


Import from WLP API

Re: Import from WLP API


When you create a unit via API  core/create_unit, the unit is created  with basic parameter values. Then you can edit required parameters.
Please look example here

So if you need to create units with the same parameters except unit name, ID, phone number, device type, first you execute request, then request to edit parameters,  which values you can take from some file on your side or any presets.  All requests can be called from one function in code which will realise function "duplication".

Diana Cheley
Wialon Hosting Expert