Skip to main content
maritzabel_delpozo
New Member
Mar 7, 2017 4:47 PM UTC
Solved

Create dataset - CLI procedure

Hi there,

 

Does anyone know If it is possible to create/edit datasets from the cli? I'm running a FortiAnalyzer with the version 5.2.7 I've found below outdated document for the version Version 4.0 MR2, which includes the cli procedure (config sql-report dataset) but that's not working for my version.

http://docs.fortinet.com/uploaded/files/1177/fortianalyzer-fortigate-sql-technote-40-mr2.pdf 

 

I've tried a few variants of the command with the cli help but no luck.

 

Thanks,

Mari

    hzhao_FTNT
    Staff
    Mar 8, 2017 6:38 PM UTC

    Sorry Mari, there is no published documentation for public. If you are familiar with FAZ JSON, here is the sample request:

    { "id": "477ed0e8-042d-11e7-ac76-fcaa14e09d4a", "jsonrpc": "1.0", "method": "add", "params": [ { "data": [ { "dev-type": 0, "log-type": 10, "name": "dataset_1", "protected": 0, "query": "select appcat, sum(coalesce(sentbyte, 0)+coalesce(rcvdbyte, 0)) as bandwidth from $log where $filter and logid_to_int(logid) not in (4, 7, 14) and nullifna(appcat) is not null group by appcat order by bandwidth desc", "variable": null } ], "url": "config\/adom\/root\/sql-report\/dataset" } ], "session": "egEx3DfO5lCMdN+rAFCiCl89LhGc2330HAB3HvvGzscUT5WckO+CdlpERUUCgLL12UgwWBnlPMVrlSSv32kWRg==" }

     

    If assistance is required it is recommended to contact either a local Fortinet partner or to engage Fortinet Professional Services.

     

    regards,

    hz

    3 replies

    hzhao_FTNT
    Staff
    Staff
    Mar 7, 2017 5:46 PM UTC

    Hi Mari,

     

    We do not offer dataset creation under CLI any more, you have to create it either by GUI or by JSON API.

     

    Regards,

    hz

    maritzabel_delpozo
    New Member
    Mar 8, 2017 8:47 AM UTC

    Thanks hz.

     

    Is there any documentation for the dataset creation by JSON API?

     

    Mari

    hzhao_FTNT
    Staff
    Staff
    Mar 8, 2017 6:38 PM UTC

    Sorry Mari, there is no published documentation for public. If you are familiar with FAZ JSON, here is the sample request:

    { "id": "477ed0e8-042d-11e7-ac76-fcaa14e09d4a", "jsonrpc": "1.0", "method": "add", "params": [ { "data": [ { "dev-type": 0, "log-type": 10, "name": "dataset_1", "protected": 0, "query": "select appcat, sum(coalesce(sentbyte, 0)+coalesce(rcvdbyte, 0)) as bandwidth from $log where $filter and logid_to_int(logid) not in (4, 7, 14) and nullifna(appcat) is not null group by appcat order by bandwidth desc", "variable": null } ], "url": "config\/adom\/root\/sql-report\/dataset" } ], "session": "egEx3DfO5lCMdN+rAFCiCl89LhGc2330HAB3HvvGzscUT5WckO+CdlpERUUCgLL12UgwWBnlPMVrlSSv32kWRg==" }

     

    If assistance is required it is recommended to contact either a local Fortinet partner or to engage Fortinet Professional Services.

     

    regards,

    hz

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT