1

Create, update and Delete Custom fields

Тема: Create, update and Delete Custom fields

Hello Team,

How can i perform CRUD operation on drivers custom fields via API?

Please let us know from which API i can achieve this.
Also pls provide the request params details that what it means.

For e.g. if there is Item ID in request param, then pls provide which id we need to give as item id.

Thanks
Samir

2

Create, update and Delete Custom fields

Re: Create, update and Delete Custom fields

Hi Samir,

You need to execute request resource/update_driver  where in parameter 'jp' specify custom fields (name and value)
Please note you need to pass all other driver's settings - name, code, phone, and etc

For example

https://hst-api.wialon.com/wialon/ajax.html?svc=resource/update_driver&sid=021df621073f5b102b83740b0ea0eaf5
params: {"c":"driver_code","ck":0,"ds":"","id":2,"n":"Driver_name","p":"+375336058598","r":0,"f":1,"pwd":"","jp":{"custom1":"value1","custom2":"value2"},"itemId":17711,"callMode":"update"}

where "itemId":17711 is resource Id ,  "id":2 - driver
You can find resource Id and driver id via request search_items - search resource by name with flag = 1 +     256 (base flag + driver's flag) https://sdk.wialon.com/wiki/en/sidebar/ … t/resource

Diana Cheley
Wialon Hosting Expert
Gurtam