@Path("{osType}/repositories")
  public RepositoryService getOperatingSystemsHandler(@PathParam("osType") String osType) {
    final Map<Resource.Type, String> mapIds = new HashMap<>();
    mapIds.putAll(parentKeyProperties);
    mapIds.put(Resource.Type.OperatingSystem, osType);
    return new RepositoryService(mapIds);
  }
Handles ANY /{osType}/repositories requests.

@param osType the os type
@return repositories service
ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java