Skip to content

Use Configuration Datasase /pm/config/device instead of /sys/proxy/json for Fortigate request #35

@moustic999

Description

@moustic999

In order to get/set device configuration it is possible from the fortimanager to request the device in 2 ways:

as of done today in this code, by using /sys/proxy/json and passing the url of fortigate api.

There is antoher way which is recommended by Fortinet :
use the /pm/config/device urls

as per explained in the full JSON reference :

{
    "method": "add",
    "params": [ 
        {
            "url": "/pm/config/device/fg1/vdom/root/firewall/address",
            "data": [
                {
                    "name": "addr1",
                    "subnet": ["1.1.1.0","255.255.255.0"],
                    "type": "ipmask" 
                }
            ] 
        } 
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions