Topic: Access Template Create/Update/Delete for an User
Hi Gurtam Support,
I am using update_custom_property remote API to create access templates for an user but every time when I hit the API I am getting back error code 4 which is Invalid Input.
I wrapped all the parameter values with double quotes properly ( sample req show below ) , can you please let me know how to achieve this ?
svc:item/update_custom_property
sid:0144d3156d2395604e3eecfcc1ac608b
params:
{
"itemId":14033536,
"name":"access_templates",
"value":
"{
\"avl_unit\":
[
{\"id\":0,\"name\":\"No access\",\"acl\":0,\"color\":\"rgb(232, 201, 162)\"},
{\"acl\":-1,\"name\":\"Full access\",\"color\":\"rgb(232, 164, 162)\",\"id\":1},
{\"acl\":567795534839,\"name\":\"Admin\",\"id\":2,\"color\":\"rgb(242, 190, 235)\"},{\"acl\":567795532791,\"name\":\"Supervisor\",\"id\":3,\"color\":\"rgb(192, 184, 249)\"},
{\"acl\":550024266275,\"name\":\"Read Only\",\"id\":4,\"color\":\"rgb(190, 242, 207)\"},
{\"acl\":880333094883,\"name\":\"GK\",\"color\":\"rgb(184, 215, 249)\",\"id\":5}
],
\"avl_unit_group\":
[
{\"id\":0,\"name\":\"No access\",\"color\":\"rgb(255, 217, 191)\",\"acl\":0},
{\"acl\":-1,\"name\":\"Full access\",\"color\":\"rgb(232, 164, 162)\",\"id\":1},
{\"acl\":567795535863,\"name\":\"Admin\",\"id\":2,\"color\":\"rgb(242, 190, 235)\"},{\"acl\":567795533815,\"name\":\"Supervisor\",\"id\":3,\"color\":\"rgb(192, 184, 249)\"},
{\"acl\":550024266275,\"name\":\"Read Only\",\"id\":4,\"color\":\"rgb(190, 242, 207)\"}
],
\"avl_resource\":
[
{\"id\":0,\"name\":\"No access\",\"color\":\"rgb(255, 217, 191)\",\"acl\":0},
{\"acl\":-1,\"name\":\"Full access\",\"color\":\"rgb(232, 164, 162)\",\"id\":1},
{\"acl\":52806609292279,\"name\":\"Admin\",\"color\":\"rgb(241, 198, 252)\",\"id\":2},{\"acl\":52806609290231,\"name\":\"Supervisor\",\"color\":\"rgb(162, 170, 219)\",\"id\":3},
{\"acl\":17602203107875,\"name\":\"Read Only\",\"color\":\"rgb(198, 252, 200)\",\"id\":4}
],
\"avl_route\":
[
{\"id\":0,\"name\":\"No access\",\"color\":\"rgb(255, 217, 191)\",\"acl\":0},
{\"id\":1,\"name\":\"Full access\",\"color\":\"rgb(211, 191, 229)\",\"acl\":-1},
{\"id\":2,\"name\":\"Read only\",\"color\":\"rgb(191, 212, 242)\",\"acl\":16931}
],
\"user\":
[
{\"id\":0,\"name\":\"No access\",\"color\":\"rgb(255, 217, 191)\",\"acl\":0},
{\"acl\":-1,\"name\":\"Full access\",\"color\":\"rgb(232, 164, 162)\",\"id\":1},
{\"acl\":6310903,\"name\":\"Admin\",\"id\":2,\"color\":\"rgb(242, 190, 235)\"},
{\"acl\":2114551,\"name\":\"Supervisor\",\"id\":3,\"color\":\"rgb(192, 184, 249)\"},
{\"acl\":16931,\"name\":\"Read Only\",\"id\":4,\"color\":\"rgb(190, 242, 207)\"}
]
}"
}