1

Unable to create Jobs

Тема: Unable to create Jobs

While logged in to the main account. I have created a sub account. Under this account I have created various resources.

I am able to create units, resources and unit groups  but I cannot create jobs.


I have also updated the user flags from the main account.


http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"flags":4,"flagsMask":4}&svc=user/update_user_flags&sid=d9ac72a055c5405febd6277467491110

and the response was :

{
fl: 4
}

then I try the following in vkituae:

http://kit-api.wialon.com/wialon/ajax.html?params={"act":{"p":{"email_to":"email@domain.com","file_type":"2","flags":"16777250","pack":"1","params":"<report render_map=\"0\" ignore_basis=\"0\" coding=\"utf8\" delimiter=\"semicolon\" headers=\"1\" orientation_landscape=\"1\" page_size=\"4\" nowrap=\"0\" xlsx_support=\"0\" content=\"1\"><\/report>","report_guid":"7397893","report_id":"4","report_objects":"11718904","time_from":"0","time_to":"1"},"t":"send_email_report"},"at":1386619200,"d":"","l":"en","m":0,"n":"Daily Kilometer Update - OrganTech","r":"1 08:00","sch":{"f1":0,"f2":0,"m":0,"t1":0,"t2":0,"w":0,"y":0},"st":{"c":18,"e":1,"l":1398657638},"tz":134232128,"callMode":"create","itemId":11763973,"id":8}&svc=resource/update_job&sid=fffe5c236ac467c567b76cd6ecb366ac


But I get access denied.

Why is this happening?



Let me also list the process of creating an account:

http://kit-api.wialon.com/wialon/ajax.html?params={"name":"[removed]","password":"[removed]","creatorId":11688186,"dataFlags":5}&svc=core/create_user&sid=428fe9dedbbb237a3c8953cdb837e8c9


response: {"item":{"nm":"[removed]","cls":1,"id":11750651,"crt":11688186,"bact":11688187,"mu":0,"uacl":-1},"flags":5}


http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11750651,"flags":4,"flagsMask":4}&svc=user/update_user_flags&sid=428fe9dedbbb237a3c8953cdb837e8c9

Response:

{"fl":4}
http://kit-api.wialon.com/wialon/ajax.html?params={"creatorId":11750651,"name":"bcrac","dataFlags":5}&svc=core/create_resource&sid=428fe9dedbbb237a3c8953cdb837e8c9

{
"item":{
"nm":"[removed]",
"cls":3,
"id":11750652,
"crt":11750651,
"bact":11688187,
"mu":0,
"uacl":-1
},
"flags":5
}
http://kit-api.wialon.com/wialon/ajax.html?params={"itemId":11750652,"plan":"Wialon Kit"}&svc=account/create_account&sid=428fe9dedbbb237a3c8953cdb837e8c9

{
"error":4
}


I tried asking gurtam support, several times, on  how and where to get the plan name, but they had no Idea what I was talking about and directed me here.

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
2

Unable to create Jobs

Re: Unable to create Jobs

kaippally пишет:

But I get access denied.
Why is this happening?

It seems to me that you grant right of creating items to chosen user, but he still hasn't got needful rights for resource where you want to create a job. Request  http://sdk.wialon.com/wiki/en/sidebar/r … tem_access will help you.

Development Department
Gurtam
3

Unable to create Jobs

(02/05/2014 12:04:39 отредактировано zuve)

Re: Unable to create Jobs

About creating account.... it can be different reasons for not making an account. These are some of them:
1. Resource creator  already has an account.
2. There are no billing plans to set
3. There is no billing plan with such name

Development Department
Gurtam
4

Unable to create Jobs

(02/05/2014 18:29:25 отредактировано kaippally)

Re: Unable to create Jobs

As per wialon   http://sdk.wialon.com/wiki/en/sidebar/r … ng#general


I tried the following while logged in as the main user.

http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11761997,"accessMask":1108445158703104,"svc":"user/update_item_access"}&svc=user/update_item_access&sid=55f7044a4b7b91d3b1af9ae2acbf9b6e 

I get
{
error: 6
}

And then I attempt to use the following access flag:

0×0000008000000     Create, edit, and delete jobs

 
http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11761997,"accessMask":134217728,"svc":"user/update_item_access"}&svc=user/update_item_access&sid=55f7044a4b7b91d3b1af9ae2acbf9b6e

I still get


{
error: 6
}

I then attempted to set access to another resource to the same user:


http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11763974,"accessMask":134217728,"svc":"user/update_item_access"}&svc=user/update_item_access&sid=55f7044a4b7b91d3b1af9ae2acbf9b6e 

I get the same result everytime no matter what combination I try .

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
5

Unable to create Jobs

Re: Unable to create Jobs

I checked for the billing plans

http://kit-api.wialon.com/wialon/ajax.html?params={"itemId":11761997}&svc=account/get_billing_plans&sid=55f7044a4b7b91d3b1af9ae2acbf9b6e 


{
 "plan": {
  "parent": "Wialon Kit Base",
  "name": "Wialon Kit",
  "servicesModCounter": 1,
  "historyPeriod": 3000,
  "flags": 18,
  "denyBalance": 0,
  "blockBalance": 0,
  "minDaysCounter": 0,
  "currencyFormat": "%.02f",
  "descr": "gredenza",
  "email": "jishi@gredenza.com",
  "hwTypes": {
   "UMBRELLA GPS-120": {
    "id": 41808
   },
   "UMBRELLA GPS-100": {
    "id": 42807
   },
   "UMBRELLA GPS-50/55/60": {
    "id": 49797
   },
   "UMBRELLA GPS-300": {
    "id": 76588
   },
   "ARTtrack1": {
    "id": 1001845
   }
  },
  "personal": {
   "services": {
    "service.gredenza": {
     "type": 1,
     "maxUsage": -1,
     "cost": "service identification",
     "interval": 0,
     "descr": "",
     "flags": 0
    }
   }
  },
  "combined": {
   "services": {
    "service.gredenza": {
     "type": 1,
     "maxUsage": -1,
     "cost": "service identification",
     "interval": 0,
     "descr": "",
     "flags": 0
    },
    "avl_resource": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "Учетные Записи",
     "flags": 0
    },
    "wialon_kit": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "Wialon Kit main site access",
     "flags": 0
    },
    "avl_unit_group": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "Группы объектов",
     "flags": 0
    },
    "jobs": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "задания",
     "flags": 0
    },
    "email_report": {
     "type": 1,
     "maxUsage": 20,
     "cost": "20:0;-1",
     "interval": 1,
     "descr": "E-Mail отчет",
     "flags": 0
    },
    "avl_unit": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "Объекты",
     "flags": 0
    },
    "wialon_activex": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "Wialon SDK external access",
     "flags": 0
    },
    "custom_reports": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "extended reports",
     "flags": 0
    },
    "notifications": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "уведомления",
     "flags": 0
    },
    "reportsdata": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "Группы геозон",
     "flags": 0
    },
    "storage_user": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "пользователи",
     "flags": 0
    },
    "custom_fields": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "",
     "flags": 0
    },
    "unit_sensors": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "датчики устройств",
     "flags": 0
    },
    "email_notification": {
     "type": 1,
     "maxUsage": 20,
     "cost": "20:0;-1",
     "interval": 1,
     "descr": "E-Mail уведомления",
     "flags": 0
    },
    "pois": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "POI",
     "flags": 0
    },
    "reports": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "отчеты",
     "flags": 0
    },
    "zones_library": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "геозоны",
     "flags": 0
    },
    "drivers": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "drivers module",
     "flags": 0
    },
    "reporttemplates": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "отчеты",
     "flags": 0
    },
    "reportsmngt": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "manager reports",
     "flags": 0
    },
    "messages": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "access to messages mode",
     "flags": 0
    },
    "unit_commands": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "unit commands",
     "flags": 0
    },
    "service_intervals": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "maintenance intervals",
     "flags": 0
    },
    "wialon.kit": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "Product specification",
     "flags": 0
    },
    "route_schedules": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "route schedules",
     "flags": 0
    },
    "rounds": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "route rounds",
     "flags": 0
    },
    "retranslator_units": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "retranslator units",
     "flags": 0
    },
    "driver_groups": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "drivers module",
     "flags": 0
    },
    "avl_route": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "routes",
     "flags": 0
    },
    "trailer_groups": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "trailers module",
     "flags": 0
    },
    "sms": {
     "type": 1,
     "maxUsage": 0,
     "cost": "-1",
     "interval": 0,
     "descr": "SMS service",
     "flags": 0
    },
    "trailers": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "trailers module",
     "flags": 0
    },
    "user_notifications": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "user messages",
     "flags": 0
    },
    "wialon_kit_api": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "api site access",
     "flags": 0
    },
    "admin_fields": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "admin fields",
     "flags": 0
    },
    "avl_retranslator": {
     "type": 2,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "retranslators",
     "flags": 0
    },
    "sdk": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "SDK access",
     "flags": 0
    },
    "app.idrivesafe": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "idrivesafe app access",
     "flags": 0
    },
    "app.trackplayer": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "trackplayer app access",
     "flags": 0
    },
    "app.dashboard": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "dashboard app access",
     "flags": 0
    },
    "app.chatterbox": {
     "type": 1,
     "maxUsage": -1,
     "cost": "",
     "interval": 0,
     "descr": "chatterbox app access",
     "flags": 0
    }
   }
  }
 },
 "subPlans": [
  {
   "parent": "Wialon Kit Base",
   "name": "Wialon Kit",
   "servicesModCounter": 1,
   "historyPeriod": 3000,
   "flags": 18,
   "denyBalance": 0,
   "blockBalance": 0,
   "minDaysCounter": 0,
   "currencyFormat": "%.02f",
   "descr": "gredenza",
   "email": "jishi@gredenza.com",
   "hwTypes": {
    "UMBRELLA GPS-120": {
     "id": 41808
    },
    "UMBRELLA GPS-100": {
     "id": 42807
    },
    "UMBRELLA GPS-50/55/60": {
     "id": 49797
    },
    "UMBRELLA GPS-300": {
     "id": 76588
    },
    "ARTtrack1": {
     "id": 1001845
    }
   },
   "personal": {
    "services": {
     "service.gredenza": {
      "type": 1,
      "maxUsage": -1,
      "cost": "service identification",
      "interval": 0,
      "descr": "",
      "flags": 0
     }
    }
   },
   "combined": {
    "services": {
     "service.gredenza": {
      "type": 1,
      "maxUsage": -1,
      "cost": "service identification",
      "interval": 0,
      "descr": "",
      "flags": 0
     },
     "avl_resource": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "Учетные Записи",
      "flags": 0
     },
     "wialon_kit": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "Wialon Kit main site access",
      "flags": 0
     },
     "avl_unit_group": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "Группы объектов",
      "flags": 0
     },
     "jobs": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "задания",
      "flags": 0
     },
     "email_report": {
      "type": 1,
      "maxUsage": 20,
      "cost": "20:0;-1",
      "interval": 1,
      "descr": "E-Mail отчет",
      "flags": 0
     },
     "avl_unit": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "Объекты",
      "flags": 0
     },
     "wialon_activex": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "Wialon SDK external access",
      "flags": 0
     },
     "custom_reports": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "extended reports",
      "flags": 0
     },
     "notifications": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "уведомления",
      "flags": 0
     },
     "reportsdata": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "Группы геозон",
      "flags": 0
     },
     "storage_user": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "пользователи",
      "flags": 0
     },
     "custom_fields": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "",
      "flags": 0
     },
     "unit_sensors": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "датчики устройств",
      "flags": 0
     },
     "email_notification": {
      "type": 1,
      "maxUsage": 20,
      "cost": "20:0;-1",
      "interval": 1,
      "descr": "E-Mail уведомления",
      "flags": 0
     },
     "pois": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "POI",
      "flags": 0
     },
     "reports": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "отчеты",
      "flags": 0
     },
     "zones_library": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "геозоны",
      "flags": 0
     },
     "drivers": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "drivers module",
      "flags": 0
     },
     "reporttemplates": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "отчеты",
      "flags": 0
     },
     "reportsmngt": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "manager reports",
      "flags": 0
     },
     "messages": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "access to messages mode",
      "flags": 0
     },
     "unit_commands": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "unit commands",
      "flags": 0
     },
     "service_intervals": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "maintenance intervals",
      "flags": 0
     },
     "wialon.kit": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "Product specification",
      "flags": 0
     },
     "route_schedules": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "route schedules",
      "flags": 0
     },
     "rounds": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "route rounds",
      "flags": 0
     },
     "retranslator_units": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "retranslator units",
      "flags": 0
     },
     "driver_groups": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "drivers module",
      "flags": 0
     },
     "avl_route": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "routes",
      "flags": 0
     },
     "trailer_groups": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "trailers module",
      "flags": 0
     },
     "sms": {
      "type": 1,
      "maxUsage": 0,
      "cost": "-1",
      "interval": 0,
      "descr": "SMS service",
      "flags": 0
     },
     "trailers": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "trailers module",
      "flags": 0
     },
     "user_notifications": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "user messages",
      "flags": 0
     },
     "wialon_kit_api": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "api site access",
      "flags": 0
     },
     "admin_fields": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "admin fields",
      "flags": 0
     },
     "avl_retranslator": {
      "type": 2,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "retranslators",
      "flags": 0
     },
     "sdk": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "SDK access",
      "flags": 0
     },
     "app.idrivesafe": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "idrivesafe app access",
      "flags": 0
     },
     "app.trackplayer": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "trackplayer app access",
      "flags": 0
     },
     "app.dashboard": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "dashboard app access",
      "flags": 0
     },
     "app.chatterbox": {
      "type": 1,
      "maxUsage": -1,
      "cost": "",
      "interval": 0,
      "descr": "chatterbox app access",
      "flags": 0
     }
    }
   }
  }
 ]
}

Then I tried all methods to get the name of the plan

in order to make into an account I tried the following
1) asked support, they asked me to ask here
2) tried various combinations :


http://kit-api.wialon.com/wialon/ajax.html?params={"itemId":11761997,"plan":"gredenza"}&svc=account/create_account&sid=55f7044a4b7b91d3b1af9ae2acbf9b6e 

I also tried the following combinations

{"itemId":11761997,"plan":"WialonKit"}
{"itemId":11761997,"plan":"vkituae"}
{"itemId":11761997,"plan":"vertexuae"}

All provide the same result
 
{
 "error": 4
}
Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
6

Unable to create Jobs

Re: Unable to create Jobs

I can't understand what rights do you want to grant. Please describe them, because it seems to me that  you put wrong mask.

kaippally пишет:

And then I attempt to use the following access flag:
0×0000008000000     Create, edit, and delete jobs

http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11761997,"accessMask":134217728,"svc":"user/update_item_access"}&svc=user/update_item_access&sid=55f7044a4b7b91d3b1af9ae2acbf9b6e
I still get

{
error: 6
}
I then attempted to set access to another resource to the same user:

You can't apply flag 0x8000000 without 0x4000000 and 0x1. Because first you should have watching rights and then editing. So your flag will be 201326593. I think in previous request you have the same mistake.

Development Department
Gurtam
7

Unable to create Jobs

Re: Unable to create Jobs

According to the server answer you can assign only  plan named "Wialon Kit". If you still have error 4, you have problems with access rights.
And by the way, you wrote that you created resource with id 11750652, and in last post you tried to create account from resource with id 11761997. I cant say that something with such id is really a resource and really exists.

Development Department
Gurtam
8

Unable to create Jobs

Re: Unable to create Jobs

I am logged in as gredenza
and I set access flags for user vkituae (userId:11761996) to resource vd_alerts (itemId:11775188)

From what you have demonstrated I have added all the basic flags and converted to decimal which gives : 16383
to all the privileges I require for vkituae

View notifications                1048576       
Create, edit, and delete notifications        2097152       
General Flags                16383
                    3162111

View POIs                4194304       
Create, edit, and delete POIs        8388608       
General Flags                16383
                    12599295
View geofences                16777216       

Create, edit, and delete geofences        33554432       
General Flags                16383
                    50348031


View jobs                67108864       
Create, edit, and delete jobs        134217728       
General Flags                16383               
                    201342975

View report templates            268435456       
Create, edit, and delete report templates    536870912
General Flags                16383   
                    805322751

View drivers                1073741824       
Create, edit, and delete drivers        2147483648       
General Flags                16383
                    3221241855


View driver groups            8589934592       
Create, edit, and delete driver groups    17179869184       
General Flags                16383
                    25769820159
View drivers-units association list        34359738368       
Edit drivers-units association list        68719476736       
General Flags                16383
                    103079231487

View trailers                17592186044416       
Create, edit, and delete trailers        35184372088832       
General Flags                16383
                    52776558149631

View trailer groups            70368744177664       
Create, edit, and delete trailer groups    140737488355328       
General Flags                16383
                    211106232549375

View trailers-units association list        281474976710656       
Edit trailers-units association list        562949953421312       
General Flags                16383
                    844424930148351



And with these rather large numbers I proceed to make the query strings

first I query

http://kit-api.wialon.com/wialon/ajax.html?params={'userId':11761996,'directAccess':0,'itemSuperclass':''}&svc=user/get_items_access&sid=681844019a0af972f7cd54a1ac07ff11
{
11761997: 844424930148350,
11762019: 880265936895,
11762031: 880265936895,
11762269: -1,
11762272: 880265936895,
11763974: 844424930148350,
11767690: 880265936895,
11767919: 880265936895,
11767920: 880265936895,
11767921: 880265936895,
11767922: 880265936895,
11767923: 880265936895,
11767924: 880265936895,
11767925: 880265936895,
11767926: 880265936895,
11767927: 880265936895,
11767928: 880265936895,
11767970: -1,
11767971: 844424930148350,
11768007: -1,
11768008: 844424930148350,
11768045: 880265936895,
11769792: 880265936895,
11769994: 880265936895,
11769995: 880265936895,
11769998: 880265936895,
11769999: 880265936895,
11774115: -1,
11775188: 880265936895,
11775275: 844424930148350
}

then :

query:

http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":880265936895}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11

Response: [ ]


query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":3162111}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":12599295}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":50348031}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":201342975}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":805322751}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":3221241855}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":25769820159}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":103079231487}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":52776558149631}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":211106232549375}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []
query: http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11775188,"accessMask":844424930148351}&svc=user/update_item_access&sid=681844019a0af972f7cd54a1ac07ff11 
Response: []

So far it looks good.

However when I login as vkituae and try to create a job


http://kit-api.wialon.com/wialon/ajax.html?params={"act":{"p":{"email_to":"biju@carfarellc.com","file_type":"2","flags":"34","pack":"1","params":"<report render_map=\"0\" ignore_basis=\"0\" coding=\"utf8\" delimiter=\"semicolon\" headers=\"1\" orientation_landscape=\"1\" page_size=\"4\" nowrap=\"0\" xlsx_support=\"0\" content=\"1\"><\/report>","report_guid":"7397893","report_id":"4","report_objects":"7759116","time_from":"0","time_to":"1"},"t":"send_email_report"},"at":1386619200,"d":"","l":"en","m":0,"n":"Daily Kilometer Update - CarFare","r":"1 08:00","sch":{"f1":0,"f2":0,"m":0,"t1":0,"t2":0,"w":0,"y":0},"st":{"c":141,"e":1,"l":1399176015},"tz":134232128,"callMode":"create","itemId":11775188,"id":0}&svc=resource/update_job&sid=a353c2d06bb937242f306d03975ada91

it returns access denied


Questions:
1) Is it possible to create jobs for resources without making that resource into an account?
2) is it possible for subordinate users (like vkituae under gredenza) to create jobs?
3) is it possible for anyone from gurtam to see how this entire structure is setup and where the error is occuring?
4) Can I access some sort of log file to see the errors in what I am doing setup?

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
9

Unable to create Jobs

Re: Unable to create Jobs

due to the insane complexity of this method of handling huge numbers in setting flags, I have devised a simple secondary access method. So I would like  to give all possible access to users.


Please advice if there is a means to give users all possible access and what is this magic number.

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
10

Unable to create Jobs

Re: Unable to create Jobs

1) yes
2) yes
3) yes, you should send  passwords of vkituae and gredenza users (in personal message)
4) all your errors goes to you as a request answer, there are no other  options

magic number is 0xffffffffffffffff (http://sdk.wialon.com/wiki/en/kit/remot … ling#other)

Development Department
Gurtam
11

Unable to create Jobs

Re: Unable to create Jobs

While logged in as gredenza (the master account)
I tried to set all possible privileges.

http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11761997,"accessMask":"18446744073709551615"}&svc=user/update_item_access&sid=baf4e5e8734dfd924ce03161ee70d5de


I also tried (without the double quotes around the large flag number

http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11761997,"accessMask":18446744073709551615}&svc=user/update_item_access&sid=baf4e5e8734dfd924ce03161ee70d5de


I get : Invalid input

Is the decimal representation of the flags correct?

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
12

Unable to create Jobs

Re: Unable to create Jobs

While logged in as gredenza I set access flag for vkituae

http://kit-api.wialon.com/wialon/ajax.html?params={"userId":11761996,"itemId":11761997,"accessMask":"805322751"}&svc=user/update_item_access&sid=64ac916f931c0c2788cb81f486a4b3a4
result: {}

And then I logged in as vkituae and tried to create a report:

http://kit-api.wialon.com/wialon/ajax.html?params={"ct":"avl_unit","n":"Idle Duration Report","p":"","tbl":[{"c":"","cl":"","f":0,"l":"Trips","n":"unit_trips","p":"","s":"render_msgs","sch":{"f1":0,"f2":0,"m":0,"t1":0,"t2":0,"w":0,"y":0},"sl":"All messages on map"},{"c":"","cl":"","f":0,"l":"Events","n":"unit_events","p":"","s":"render_events_markers","sch":{"f1":0,"f2":0,"m":0,"t1":0,"t2":0,"w":0,"y":0},"sl":"Event markers"},{"c":"","cl":"","f":0,"l":"Parkings","n":"unit_stays","p":"","s":"render_stays_markers","sch":{"f1":0,"f2":0,"m":0,"t1":0,"t2":0,"w":0,"y":0},"sl":"Parking markers"},{"c":"","cl":"","f":0,"l":"Statistics","n":"unit_stats","p":"{\"address_format\":\"1490026496_1_1\",\"time_format\":\"%E %b %Y_%H:%M:%S\"}","s":"address_format,time_format","sch":{"f1":0,"f2":0,"m":0,"t1":0,"t2":0,"w":0,"y":0},"sl":"Address,Time Format"},{"c":"time_begin,location_begin,time_end,location_end,duration,duration_move,duration_stay","cl":"Start Time,Initial Location,End Time,Final Location,Engine Hours,Running Time,Idle Time","f":4368,"l":"Idle Duration Details","n":"unit_engine_hours","p":"{\"base_eh_sensor\":{\"mask\":\"*\"},\"unfinished_ival\":\"1\",\"duration\":{\"min\":1},\"engine_hours\":{\"min\":1},\"sensor_name\":\"*\",\"duration_format\":\"0\"}","s":"","sch":{"f1":0,"f2":0,"m":0,"t1":0,"t2":0,"w":0,"y":0},"sl":""}],"callMode":"create","itemId":11778573,"id":0}&svc=report/update_report&sid=bb8eae473e0ef7cafc855f2684d1237f

What other privileges are necessary to create reports?

I have also setting individual sets of flags for each privilege set as mentioned in reply number 8 in this thread

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
13

Unable to create Jobs

(06/05/2014 17:12:29 отредактировано zuve)

Re: Unable to create Jobs

Flag 0x30000001 will be enough for creating reports.
Also we find a mistake in documentation. The maximum flag you can put for access rights is 0xfffffffffffffff or 1152921504606846975 in decimal. I think it is easier to put hex values instead of decimal.

I don't know how you execute your request, because when i do them, the result is ok. I've answered you in personal message.

Development Department
Gurtam