Fortinet black logo

REST API for impersonation rule management

Copy Link
Copy Doc ID 8ede2956-e766-11ec-bb32-fa163e15d75b:882098
Download PDF

REST API for impersonation rule management

Impersonation rules lists and entries of each list can be created, deleted, and managed through the REST API.

View rules list

Domain level

curl -b cookie.txt http://<ip >/api/v1/domain/<domain> /ProfImpersonation/<profile_name>/ProfImpersonationEntry

System level

curl -b cookie.txt https://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry

View match rules entry

Domain level

curl -b cookie.txt http://<ip >/api/v1/domain/<domain> /ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

curl -b cookie.txt http://<ip >/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

Add a new rule entry

Note

For display_name_type, enter 0 for Wildcard or 1 for Regex.

Domain level

URL

HTTP method

http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> POST
Example:

curl -b cookie.txt -H 'content-type: application/json' -X POST -d '{"display_name":"hello world","display_name_type":0,"email_address":"hello@world.com"}' http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

URL

HTTP method

http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> POST
Example:

curl -b cookie.txt -H 'content-type: application/json' -X POST -d '{"display_name":"hello world","display_name_type":0,"email_address":"hello@world.com"}' http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

Modify a rule entry

Note

For display_name_type, enter 0 for Wildcard or 1 for Regex.

Domain level

URL

HTTP method

http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> PUT
Example:

curl -b cookie.txt -H 'content-type: application/json' -X PUT -d '{"display_name":"new hello world"' http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

URL

HTTP method

http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> PUT
Example:

curl -b cookie.txt -H 'content-type: application/json' -X PUT -d '{"display_name":"new hello world"' http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

Delete a rule entry

Domain level

URL

HTTP method

http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> DELETE
Example:

curl -b cookie.txt -H 'content-type: application/json' -X DELETE http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

URL

HTTP method

http://<ip>/api/v1/ ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> DELETE
Example:

curl -b cookie.txt -H 'content-type: application/json' -X DELETE http://<ip>/api/v1/ ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

REST API for impersonation rule management

Impersonation rules lists and entries of each list can be created, deleted, and managed through the REST API.

View rules list

Domain level

curl -b cookie.txt http://<ip >/api/v1/domain/<domain> /ProfImpersonation/<profile_name>/ProfImpersonationEntry

System level

curl -b cookie.txt https://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry

View match rules entry

Domain level

curl -b cookie.txt http://<ip >/api/v1/domain/<domain> /ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

curl -b cookie.txt http://<ip >/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

Add a new rule entry

Note

For display_name_type, enter 0 for Wildcard or 1 for Regex.

Domain level

URL

HTTP method

http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> POST
Example:

curl -b cookie.txt -H 'content-type: application/json' -X POST -d '{"display_name":"hello world","display_name_type":0,"email_address":"hello@world.com"}' http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

URL

HTTP method

http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> POST
Example:

curl -b cookie.txt -H 'content-type: application/json' -X POST -d '{"display_name":"hello world","display_name_type":0,"email_address":"hello@world.com"}' http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

Modify a rule entry

Note

For display_name_type, enter 0 for Wildcard or 1 for Regex.

Domain level

URL

HTTP method

http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> PUT
Example:

curl -b cookie.txt -H 'content-type: application/json' -X PUT -d '{"display_name":"new hello world"' http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

URL

HTTP method

http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> PUT
Example:

curl -b cookie.txt -H 'content-type: application/json' -X PUT -d '{"display_name":"new hello world"' http://<ip>/api/v1/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

Delete a rule entry

Domain level

URL

HTTP method

http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> DELETE
Example:

curl -b cookie.txt -H 'content-type: application/json' -X DELETE http://<ip>/api/v1/domain/<domain>/ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>

System level

URL

HTTP method

http://<ip>/api/v1/ ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey> DELETE
Example:

curl -b cookie.txt -H 'content-type: application/json' -X DELETE http://<ip>/api/v1/ ProfImpersonation/<profile_name>/ProfImpersonationEntry/<mkey>