Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Alfresco的用户首选项中从JSON中删除特定值_Alfresco_Alfresco Share - Fatal编程技术网

如何在Alfresco的用户首选项中从JSON中删除特定值

如何在Alfresco的用户首选项中从JSON中删除特定值,alfresco,alfresco-share,Alfresco,Alfresco Share,当我使用以下链接时 http://localhost:8080/alfresco/service/api/people/admin/preferences?pf=org.my 它返回如下的json结构 {"org": {"ivory": {"share": {"site": {"search": {"dashlet":

当我使用以下链接时

http://localhost:8080/alfresco/service/api/people/admin/preferences?pf=org.my
它返回如下的json结构

{"org": 
    {"ivory": 
        {"share": 
            {"site": 
                {"search": 
                    {"dashlet": 
                        {"component-1-1": 
                            {"search-definition": 
                                {"fromdate": "01\/02\/2015", 
                                 "author": "jhone", 
                                 "todate": "30\/04\/2015", 
                                 "term": "pensions"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

如何从这个JSON中删除作者部分?

首选项RESTAPI有一个。要从首选项存储中删除项目,请确保pf参数中指定的筛选器只识别要删除的项目,然后使用HTTP delete方法调用该项目

例如,HTTP访问此URL:

http://localhost:8080/alfresco/service/api/people/admin/preferences?pf=org.alfresco.share.sites.favourites.12345

如果该站点受欢迎,将返回true。要将其从收藏夹中删除,请对同一URL发出HTTP删除请求

在alfresco var连接器的控制器上使用此线路=remote.connect(“alfresco”);var pp=“/api/people/admin/preferences?pf=org.site”;del(pp);