Delete Document Pages

Delete Pages method allows to delete pages in the cloud storage, created by get pages method.

API Usage

There are steps that usage of GroupDocs.Annotation Cloud consists of:

  1. Upload input document into cloud storage and other files, like image annotation
  2. Add annotation
  3. Call Preview method
  4. Download result pages from cloud storage
  5. Delete pages in cloud storage
HTTP DELETE ~/annotation/pages

Swagger UI lets you call this REST API directly from the browser.

cURL REST Example

// First get JSON Web Token
// Please get your Client Id and Client Secret from https://dashboard.groupdocs.cloud/applications. Kindly place Client Id in the "client_id" and Client Secret in the "client_secret" arguments.
curl -v "https://api.groupdocs.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=xxxx&client_secret=xxxx" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"
  
// cURL example to get document information
curl -v "https://api.groupdocs.cloud/v2.0/annotation/pages?filePath=annotationdocs%2Fone-page.docx" \
-X DELETE \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt token>"
204 No content

SDKs

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.

SDK Examples


// For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-dotnet-samples
string MyClientSecret = ""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
string MyClientId = ""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
  
var configuration = new Configuration(MyClientId, MyClientSecret);
  
var apiInstance = new AnnotateApi(configuration);

var request = new DeletePagesRequest("one-page.docx");

apiInstance.DeletePages(request);
Console.WriteLine("DeletePages: pages deleted.");


// For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-java-samples
String MyClientSecret = ""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
String MyClientId = ""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
  
Configuration configuration = new Configuration(MyClientId, MyClientSecret);
  
AnnotateApi apiInstance = new AnnotateApi(configuration);

// Create request object.
DeletePagesRequest request = new DeletePagesRequest();
request.setfilePath("Annotationdocs\\one-page.docx");

// Executing api method.
apiInstance.deletePages(request);

System.out.println("DeletePages: pages deleted.");


// For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-php-samples
use GroupDocs\Annotation\Model;
use GroupDocs\Annotation\Model\Requests;

$ClientId = ""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
$ClientSecret = ""; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
  
$configuration = new GroupDocs\Annotation\Configuration();
$configuration->setAppSid($ClientId);
$configuration->setAppKey($ClientSecret);

$apiInstance = new GroupDocs\Annotation\AnnotateApi($configuration);

$request = new GroupDocs\Annotation\Model\Requests\DeletePagesRequest("annotationdocs\\one-page.docx");
$apiInstance->deletePages($request);

echo "DeletePages: pages deleted.";


// For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-node-samples
global.annotation_cloud = require("groupdocs-annotation-cloud");

global.clientId = "XXXX-XXXX-XXXX-XXXX"; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
global.clientSecret = "XXXXXXXXXXXXXXXX"; // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
  
global.annotateApi = annotation_cloud.AnnotateApi.fromKeys(clientId, clientSecret);

var request = new annotation_cloud.DeletePagesRequest("Annotationdocs\\one-page.docx");
await previewApi.deletePages(request)
console.log("DeletePages: pages deleted.");


# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-python-samples
import groupdocs_annotation_cloud

client_id = "XXXX-XXXX-XXXX-XXXX" # Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
client_secret = "XXXXXXXXXXXXXXXX" # Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
  
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(client_id, client_secret)

request = DeletePagesRequest("annotationdocs\\one-page.docx")
api.delete_pages(request)

print("DeletePages: pages deleted")

# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-ruby-samples
require 'groupdocs_annotation_cloud'

$client_id = "XXXX-XXXX-XXXX-XXXX" # Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
$client_secret = "XXXXXXXXXXXXXXXX" # Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
  
$api = GroupDocsAnnotationCloud::AnnotateApi.from_keys($client_id, $client_secret)

$request = GroupDocsAnnotationCloud::DeletePagesRequest.new("Annotationdocs\\one-page.docx")

# Executing an API.
$api.delete_pages($request)

puts("DeletePages: pages deleted.")