10-28-2011 12:49 PM
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();
}
}
10-31-2011 08:11 AM
GetMethod method = new GetMethod("http://127.0.0.1:8085/alfresco/s/api/groups/ALFRESCO_ADMINISTRATORS");
11-01-2011 10:29 AM
200
{
"data":{
"authorityType": "GROUP",
"shortName": "ALFRESCO_ADMINISTRATORS",
"fullName": "GROUP_ALFRESCO_ADMINISTRATORS",
"displayName": "ALFRESCO_ADMINISTRATORS",
"isRootGroup": true,
"isAdminGroup": false,
"url": "/api/groups/ALFRESCO_ADMINISTRATORS"
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.