public static void main(String[] args) throws UnsupportedEncodingException{
HttpClient client = new HttpClient();
client.getParams().setAuthenticationPreemptive(true);
Credentials defaultcreds = new UsernamePasswordCredentials("admin", "admin");
client.getState().setCredentials(AuthScope.ANY, defaultcreds);
GetMethod method = new GetMethod("http://127.0.0.1:8085/alfresco/wcs/api/groups/ALFRESCO_ADMINISTRATORS");
try {
System.out.println(client.executeMethod(method));
System.out.println(method.getResponseBodyAsString());
} catch (HttpException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
GetMethod method = new GetMethod("http://127.0.0.1:8085/alfresco/s/api/groups/ALFRESCO_ADMINISTRATORS");
200
{
"data":{
"authorityType": "GROUP",
"shortName": "ALFRESCO_ADMINISTRATORS",
"fullName": "GROUP_ALFRESCO_ADMINISTRATORS",
"displayName": "ALFRESCO_ADMINISTRATORS",
"isRootGroup": true,
"isAdminGroup": false,
"url": "/api/groups/ALFRESCO_ADMINISTRATORS"
}
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.