Reading a project record is similar to reading a contact record. A main difference would be when you request the categories property in the resulting project record's returned property values. By default, the returned list of categories also stores all property values associated with all project categories.
//for this example, it is assumed that you already know the target project record's unique key (where uniqueKey is a String variable)
protected ProjectRepository projectRepository;
public void readProject() throws Exception {
Project project = (Project)
projectRepository.readProject(uniqueKey, getPropertiesToRead());
}
private List<String> getPropertiesToRead() {
List<String> properties = new List<String>();
properties.add("name");
properties.add("idNumber");
properties.add("currentPhase.storedValue");
properties.add("assignees");
properties.add("categories");
return properties;
}