1

Resource ID

Тема: Resource ID

Hi all,


I am trying to find where I can get these information highlighted in red.

https://hst-api.wialon.com/wialon/ajax. … eport&
    params={
        "reportResourceId":163266,
        "reportTemplateId":10,
        "reportObjectId":34868,
        "reportObjectSecId":0,
        "interval":{
            "from":1357938000,
            "to":1358715599,
            "flags":0
        }
    }&sid=<your_sid>


I tried to query the available reports to check if the  "reportResourceId" and  "reportObjectId" is available but no luck ( kindly see attached file)

  • Resource ID
2

Resource ID

Re: Resource ID

Hello. Execute core/search_items with following params:

{"spec":{"itemsType":"avl_resource","propName":"","propValueMask":"","sortType":"","propType":"","or_logic":false},"force":1,"flags":8193,"from":0,"to":0}

Flags are 8193 = 1 | 0x2000

Response will contain items with resources and reports, that are belong to resources:

{
  "nm": "rual_test",
  "cls": 3,
  "id": 14809663,
  "mu": 0,
  "rep": {
    "1": {
      "id": 1,
      "n": "New report",
      "ct": "avl_unit",
      "c": 51426
    }
  }
}

Then, reportResourceId = 14809663, reportTemplateId = 1.

reportObjectId is an id of the item, on which report will be executed. In your case (ct: avl_unit_group) is a unit group id, in mine (ct: avl_unit) — unit id. They can be fetched via core/search_items too, with corresponding itemsType:

{"spec":{"itemsType":"avl_unit_group","propName":"","propValueMask":"","sortType":"","propType":"","or_logic":false},"force":1,"flags":1,"from":0,"to":0}

In the response there will be ids for reportObjectId:

{
  "nm": "New unit group",
  "cls": 5,
  "id": 15083106,
  "mu": 0,
  "u": [
    734418,
    734422
  ],
  "uacl": -1
}
3

Resource ID

(29/11/2019 13:40:06 отредактировано kabskawt)

Re: Resource ID

Hi Rual,


I am getting this result but it's empty and it only shows the table report header. Any thoughts what is lacking here? I did a test with the interval, ReportObject ID's (based from the result) but still it is empty. I also attached the report result from Wialon.  Thanks a lot for your help.   

Report Object ID Result:

itemsType    "avl_unit_group"
propName    ""
propValueMask    ""
sortType    ""
propType    ""
or_logic    "0"
dataFlags    1
totalItemsCount    1
indexFrom    0
indexTo    0
items    
0    
nm    "Company"
cls    5
id    20094932
mu    0
u    
0    19779860
1    19793563
2    19793564
3    19793566
4    19821764
5    19821765
6    19822336
7    19822343
8    19822357
9    19823326
uacl    

Report Resource ID Result

nm    "Company"
cls    3
id    19694182
mu    0
rep    
1    
id    1
n    "Unit Report"
ct    "avl_unit"
c    29065
2    
id    2
n    "Group Orders Report"
ct    "avl_unit_group"
c    65266
repmax    0
uacl 

   




Report execution:

[url]https://hst-api.wialon.com/wialon/ajax.html?svc=report/exec_report&[/url]
    params={
        "reportResourceId":19694182,
        "reportTemplateId":2,
        "reportObjectId":20094932,
        "reportObjectSecId":0,
        "interval":{
            "from":1572598800,
            "to":1572602400,
            "flags":0
        }
    }&sid=




[b]Response:[/b]

reportResult    
msgsRendered    0
stats    []
tables    
0    
name    "unit_group_orders"
label    "Group Orders Report"
grouping    
nested    
nested    
type    "unit"
type    "mday"
type    "month"
flags    536871176
rows    1
level    4
columns    18
header    
0    "Grouping"
1    "Name"
2    "Client name"
3    "Address"
4    "Comment (order)"
5    "Tags"
6    "Cost"
7    "Weight"
8    "Volume"
9    "Time from"
10    "Time to"
11    "Estimated arrival time"
12    "Actual arrival time"
13    "Deviation"
14    "Driver"
15    "Status"
16    "Comment (confirmation)"
17    "Files"
header_type    
0    ""
1    "name"
2    "client_name"
3    "address"
4    "import_comment"
5    "tags"
6    "cost"
7    "weight"
8    "volume"
9    "time_from"
10    "time_to"
11    "time_plan"
12    "time_fact"
13    "deviation"
14    "driver"
15    "status"
16    "comment"
17    "files"
attachments    []
reportLayer    
name    "report markers"
bounds    
0    0
1    0
2    0
3    0
layerCount    1
  • Resource ID