1

Create Unit

Тема: Create Unit

Hello,

i try to use the API remote to create item  :

https://hst-api.wialon.com/wialon/ajax.html?svc=core/create_unit&params={"creatorId":18261704,"name":"ips_unit","hwTypeId":18721183,"dataFlags":1}&sid=09cfe4c6fe49a6375e7e4b07dd3e3d33

but i get error 4  as response (check the joined file)

2

Create Unit

Re: Create Unit

iheb.balti пишет:

Hello,

i try to use the API remote to create item  :

https://hst-api.wialon.com/wialon/ajax.html?svc=core/create_unit&params={"creatorId":18261704,"name":"ips_unit","hwTypeId":18721183,"dataFlags":1}&sid=09cfe4c6fe49a6375e7e4b07dd3e3d33

but i get error 4  as response (check the joined file)

Hello!

there is not hwTypeId as 18721183
You can get all available hw types with their id by request core/get_hw_types

Diana Cheley
Wialon Hosting Expert
Gurtam
3

Create Unit

Re: Create Unit

Hola,

Estoy tratando de crear una unidad con los siguientes parametros :

https://hst-api.wialon.com/wialon/ajax.html?svc=core/create_unit&params={"creatorId":20676297,"name":"KBXT77","hwTypeId":18904625,"dataFlags":1}&sid=09238654931419b4aaccebd484dba628

y me esta dando

{
    "error": 6
}

obtuve los datos del usuario : 

  "host": "186.67.179.2",
    "eid": "09238654931419b4aaccebd484dba628",
    "gis_sid": "8d36378d",
    "au": "kaufmann_demo",
    "tm": 1582559676,
    "wsdk_version": "1.281",
    "base_url": "https://hst-api.wialon.com",
    "hw_gw_ip": "193.193.165.165",
    "hw_gw_dns": "nl.gpsgsm.org",
    "user": {
        "nm": "kaufmann_demo",
        "cls": 1,
        "id": 20676297,


Que esta fallando ?..

Muchas gracias

4

Create Unit

Re: Create Unit

Good day!

The error 6 means that user-creator cannot create items due to billing rights, or access rights (token access, user's access).
For your user "kaufmann_demo" billing on account / billing plan is ok, it also seems ok with user's access rights.
So please check the token access (parameter 'access type' ) - you need to login with token which have access flag no more than 0x200(512)
For example, you can use the following URL to get token  https://hosting.wialon.com/login.html?access_type=768 (or full access: access_type=-1)

Please note we provide support on English here.

Diana Cheley
Wialon Hosting Expert
Gurtam