Remove content history. It works in CLOUD
        :param page_id:
        :param version_id:
        :return:
189038
def remove_content_history_in_cloud(self, page_id, version_id):
        
        url = 'rest/api/content/{id}/version/{versionId}'.format(id=page_id, versionId=version_id)
        self.delete(url)
348775
public int remove(CmsUUID id) {

        CmsDetailPageInfo info = m_infoById.get(id);
        if (info == null) {
            throw new IllegalArgumentException();
        }
        String type = info.getType();
        List<CmsDetailPageInfo> infos = m_map.get(type);
        int pos = infos.indexOf(info);
        infos.remove(pos);
        m_infoById.remove(id);
        return pos;

    }
1093699
public void clearHistory(int profileId, String clientUUID) {
        PreparedStatement query = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            String sqlQuery = "DELETE FROM " + Constants.DB_TABLE_HISTORY + " ";

            // see if profileId is null or not (-1)
            if (profileId != -1) {
                sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId;
            }

            // see if clientUUID is null or not
            if (clientUUID != null && clientUUID.compareTo("") != 0) {
                sqlQuery += " AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "'";
            }

            sqlQuery += ";";

            logger.info("Query: {}", sqlQuery);
            query = sqlConnection.prepareStatement(sqlQuery);
            query.executeUpdate();
        } catch (Exception e) {
        } finally {
            try {
                if (query != null) {
                    query.close();
                }
            } catch (Exception e) {
            }
        }
    }
1102753
function unpublish($id, $previous)
    {
        $this->requestDecorator->setId($id  . '/published');
        $this->requestDecorator->addHeader('X-Contentful-Version', $previous['sys']['version']);
        $result = $this->client->delete($this->requestDecorator->makeResource(), $this->requestDecorator->makeHeaders());
        $this->refresh();
        return $result;
    }
320248
@Override
  public void deletePage(int pageID) {
    try {
      // / put id to empty pages list
      super.deletePage(pageID);

      // delete from file
      countWrite();
      byte[] array = pageToByteArray(null);
      long offset = ((long) (header.getReservedPages() + pageID)) * (long) pageSize;
      file.seek(offset);
      file.write(array);
    }
    catch(IOException e) {
      throw new RuntimeException(e);
    }
  }
564754
private void removeVersionHistory(NodeData mixVersionableNode) throws RepositoryException,
      ConstraintViolationException, VersionException
   {
      try
      {
         PropertyData vhpd =
            (PropertyData)dataConsumer.getItemData(mixVersionableNode, new QPathEntry(Constants.JCR_VERSIONHISTORY, 1),
               ItemType.PROPERTY);

         String vhID = ValueDataUtil.getString(vhpd.getValues().get(0));
         VersionHistoryRemover historyRemover =
            new VersionHistoryRemover(vhID, dataConsumer, nodeTypeDataManager, repository, currentWorkspaceName, null,
               ancestorToSave, changesLog, accessManager, userState);
         historyRemover.remove();
      }
      catch (IllegalStateException e)
      {
         throw new RepositoryException(e);
      }
   }
288491
def history(self, storage_version):
        
        params = {
            "storageVersion": storage_version,
            "includeSnoozePresetUpdates": True,
        }
        params.update(self.static_params)

        return self.send(
            url=self._base_url + 'history',
            method='POST',
            json=params
        )
900447
public void savePreviousImplementedVersion(Page page, Integer version) {
        String value = version != null ? String.valueOf(version) : null;
        ContentEntityObject entityObject = getContentEntityManager().getById(page.getId());
        getContentPropertyManager().setStringProperty(entityObject, PREVIOUS_IMPLEMENTED_VERSION, value);
    }
700306
public function deletePage($page_id)
    {
        try {
            return json_decode($this->getClient()->delete('content/' . $page_id)->getBody(), true);
        } catch (BadResponseException $e) {
            throw $this->handleError($e);
        }
    }
726670
def destroy
      @history.transaction do
        @history.destroy!
        @history.page.reload

        latest_version = @history.page.histories.order(created_at: :desc).first
        if latest_version.present?
          @history.page.update_attributes!(latest_version_id: latest_version.id)
        else
          # We can't have a page with no history
          @history.page.destroy!
        end

        redirect_to @history.page, notice: 'History was successfully destroyed.'
      end
    end
1018720
def remove(cls, id):
        

        api = Client.instance().api
        api.index(id).delete()
1163992
def removePage(self, pageId):
        
        try:
            self._pages[pageId].deleteLater()
            del self._pages[pageId]
        except KeyError:
            pass
90031
public void saveImplementedVersion(Page page, Integer version) {
        Integer previousImplementedVersion = getImplementedVersion(page);
        if (previousImplementedVersion != null && version != null && previousImplementedVersion == version)
            return;

        if (previousImplementedVersion != null)
            savePreviousImplementedVersion(page, previousImplementedVersion);

        String value = version != null ? String.valueOf(version) : null;
        ContentEntityObject entityObject = getContentEntityManager().getById(page.getId());
        getContentPropertyManager().setStringProperty(entityObject, IMPLEMENTED_VERSION, value);
    }
1062201
def delete_page_property(self, page_id, page_property):
        
        url = 'rest/api/content/{page_id}/property/{page_property}'.format(page_id=page_id,
                                                                           page_property=str(page_property))
        return self.delete(path=url)
1064215
def delete_record(self, record_id):
        
        self._delete(
            urljoin(self.base_url, "informationobjects/{}".format(record_id)),
            expected_response=204,
        )
        return {"status": "Deleted"}
68339
def delete_extension_by_id(self, extension_id, version=None):
        
        route_values = {}
        if extension_id is not None:
            route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str')
        query_parameters = {}
        if version is not None:
            query_parameters['version'] = self._serialize.query('version', version, 'str')
        self._send(http_method='DELETE',
                   location_id='a41192c8-9525-4b58-bc86-179fa549d80d',
                   version='5.0-preview.2',
                   route_values=route_values,
                   query_parameters=query_parameters)
1001283
protected void removePersistedSession(String id) {
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[REMOVE_PERSISTED_SESSION], id);
        }
        Connection con;
        PreparedStatement ps = null;
        boolean psClose = false;

        //If the app calls invalidate, it may not be removed from the local cache yet.
        superRemove(id);

        con = getConnection(false);
        if (con == null) {
            return;
        }
        try {
            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[REMOVE_PERSISTED_SESSION], "before upd " + id);
            }
            ps = con.prepareStatement(delOne);
            ps.setString(1, id);
            ps.setString(2, _iStore.getId());
            ps.executeUpdate();
            ps.close();
            psClose = true;
            if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[REMOVE_PERSISTED_SESSION], "after upd " + id);
            }
            addToRecentlyInvalidatedList(id);
        } catch (SQLException se) {
            //            if (isStaleConnectionException(se)) {
            //                com.ibm.ws.ffdc.FFDCFilter.processException(se, "com.ibm.ws.session.store.db.DatabaseHashMap.removePersistedSession", "619", id);
            //            } else {
            com.ibm.ws.ffdc.FFDCFilter.processException(se, "com.ibm.ws.session.store.db.DatabaseHashMap.removePersistedSession", "621", id);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[REMOVE_PERSISTED_SESSION], "DatabaseHashMap.removeSessionsError");
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[REMOVE_PERSISTED_SESSION], "CommonMessage.exception", se);
            //            }
        } catch (Exception e) {
            com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.session.store.db.DatabaseHashMap.removePersistedSession", "626", id);
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[REMOVE_PERSISTED_SESSION], "DatabaseHashMap.removeSessionsError");
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[REMOVE_PERSISTED_SESSION], "CommonMessage.exception", e);
        } finally {
            if (!psClose && ps != null)
                closeStatement(ps);
            closeConnection(con);
        }
    }