code: func (r *Session) GetRemoteHistory(imgID, registry string) ([]string, error) {
  	res, err := r.client.Get(registry + "images/" + imgID + "/ancestry")
  	if err != nil {
  		return nil, err
  	}
  	defer res.Body.Close()
  	if res.StatusCode != 200 {
  		if res.StatusCode == 401 {
  			return nil, errcode.ErrorCodeUnauthorized.WithArgs()
  		}
  		return nil, newJSONError(fmt.Sprintf("Server error: %d trying to fetch remote history for %s", res.StatusCode, imgID), res)
  	}
  
  	var history []string
  	if err := json.NewDecoder(res.Body).Decode(&history); err != nil {
  		return nil, fmt.Errorf("Error while reading the http response: %v", err)
  	}
  
  	logrus.Debugf("Ancestry: %v", history)
  	return history, nil
  }
docs: // GetRemoteHistory retrieves the history of a given image from the registry.
  // It returns a list of the parent's JSON files (including the requested image).