API Error add network component
Description
Unable to add a component trough Web Service
Distribution Name and Version
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
FusionDirectory Version
ii fusiondirectory 1.4-163130 all
Plugin with the defect
ii fusiondirectory-plugin-webservice 1.4-163130 all webservice plugin for FusionDirectory
PHP version used
ii php 2:7.3+69
Origin of php packages
from debian repository and entreprise fd repository
Steps to Reproduce
- user fd-admin account
- run the curl command
curl -X POST "<URL Server>/rest.php/v1/objects/component" -H "accept: application/json" -H "Session-Token: <token>" -H "Content-Type: application/json" -d "{\"attrs\":{\"componentGeneric\":{\"cn\":\"TST-DEVICE\",\"description\":\"Description\",\"ipHostNumber\":\"1.1.1.1\"}}}"
JSON :
{
"attrs": {
"componentGeneric": {
"cn": "TST-DEVICE",
"description": "Description",
"ipHostNumber" : "1.1.1.1"
}
}
}
Expected behavior:
a simple device should be created
Actual behavior:
can't parse JSON. Raw result:
Error while Remote Objects[{"class":"SimplePluginPermissionError","message":"Vous n'avez pas les droits n\u00e9cessaires pour modifier le champ \u00abipHostNumber\u00bb de l'objet \u00abnew\u00bb","line":2062,"file":"\/usr\/share\/fusiondirectory\/include\/simpleplugin\/class_simplePlugin.inc","dn":"new","tab":"componentGeneric"}]
Reproduces how often: 100%
Additional Information
Maybe there is a trick to do with adding fdNetworkInterface ? user creation is OK