Technical Tip: How to rename a metadata via the FortiManager API
Description
This article describes how to rename metadata via API.
Scope
FortiManager
Solution
The following example demonstrates how to rename the test_1 metadata to test_2 in the Fortinet ADOM.
Request:
Â
{
"id": 1,
"method": "set",
"params": [
{
"data": {
"name": "test_2"
},
"url": "/pm/config/adom/Fortinet/obj/fmg/variable/test_1"
}
],
"session": "{{session}}"
}Â Â
Response:
{
"id": 3,
"result": [
{
"data": {
"name": "test_2"
},
"status": {
"code": 0,
"message": "OK"
},
"url": "/pm/config/adom/Fortinet/obj/fmg/variable/test_1"
}
]
}