Cancel an Export

DELETE: https://api.crossengage.io/export/exportId

Content Type: application/json

Request

cURL
Java
JavaScript
Node.js
Python
PHP
cURL
curl --include \
--request DELETE \
--header "Content-Type: application/json" \
--header "X-XNG-ApiVersion: 2" \
--header "X-XNG-AuthToken: YourAPIKey" \
'https://api.crossengage.io/export/{exportId}'
Java
// Maven : Add these dependecies to your pom.xml (java6+)
// <dependency>
// <groupId>org.glassfish.jersey.core</groupId>
// <artifactId>jersey-client</artifactId>
// <version>2.8</version>
// </dependency>
// <dependency>
// <groupId>org.glassfish.jersey.media</groupId>
// <artifactId>jersey-media-json-jackson</artifactId>
// <version>2.8</version>
// </dependency>
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.MediaType;
Client client = ClientBuilder.newClient();
Response response = client.target("https://api.crossengage.io/export/{exportId}")
.request(MediaType.APPLICATION_JSON_TYPE)
.header("X-XNG-ApiVersion", "2")
.header("X-XNG-AuthToken", "YourAPIKey")
.delete();
System.out.println("status: " + response.getStatus());
System.out.println("headers: " + response.getHeaders());
System.out.println("body:" + response.readEntity(String.class));
JavaScript
var request = new XMLHttpRequest();
request.open('DELETE', 'https://api.crossengage.io/export/{exportId}');
request.setRequestHeader('Content-Type', 'application/json');
request.setRequestHeader('X-XNG-ApiVersion', '2');
request.setRequestHeader('X-XNG-AuthToken', 'YourAPIKey');
request.onreadystatechange = function () {
if (this.readyState === 4) {
console.log('Status:', this.status);
console.log('Headers:', this.getAllResponseHeaders());
console.log('Body:', this.responseText);
}
};
request.send();
Node.js
var request = require('request');
request({
method: 'DELETE',
url: 'https://api.crossengage.io/export/{exportId}',
headers: {
'Content-Type': 'application/json',
'X-XNG-ApiVersion': '2',
'X-XNG-AuthToken': 'YourAPIKey'
}}, function (error, response, body) {
console.log('Status:', response.statusCode);
console.log('Headers:', JSON.stringify(response.headers));
console.log('Response:', body);
});
Python
from urllib2 import Request, urlopen
headers = {
'Content-Type': 'application/json',
'X-XNG-ApiVersion': '2',
'X-XNG-AuthToken': 'YourAPIKey'
}
request = Request('https://api.crossengage.io/export/{exportId}', headers=headers)
request.get_method = lambda: 'DELETE'
response_body = urlopen(request).read()
print response_body
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.crossengage.io/export/{exportId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"X-XNG-ApiVersion: 2",
"X-XNG-AuthToken: YourAPIKey"
));
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);

Parameters

Name

Data Type

Description

exportId

string

Required. id of an export Example: 1ee25bc0-21aa-4759-8716-8397b6997e98

Response: 200

Export job stopped.

Body

{
"id": "1ee25bc0-21aa-4759-8716-8397b6997e98",
"requestedAt": "2007-04-10T14:30:00Z",
"status": "CANCELED",
"exportDestinationId": 24,
"callbackDestinationId": 23,
"attributes": {
"enabled": true
}
}