@Path("{stackName}/versions/{stackVersion}/operating_systems")
  public OperatingSystemService getOperatingSystemsHandler(@ApiParam @PathParam("stackName") String stackName,
                                                           @ApiParam @PathParam("stackVersion") String stackVersion) {
    final Map<Resource.Type, String> stackProperties = new HashMap<>();
    stackProperties.put(Resource.Type.Stack, stackName);
    stackProperties.put(Resource.Type.StackVersion, stackVersion);
    return new OperatingSystemService(stackProperties);
  }
Handles ANY /{stackName}/versions/{stackVersion}/operating_systems.

@param stackName stack name
@param stackVersion stack version
@return operating system service
ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java