Purge All
/mobile/system/analyticsDataManagement/purge
Initiates a job to delete rows from the ApiCalls, Events, Sessions, and Users tables for the specified date range and then shrink the tables. Optionally, you can specify the backends for which data is to be deleted.
Permissions
Only team members with the Administrator
role can access the Analytics Data Management API.
Request
- application/json
object
Filters
-
endDate:
string
The end of the date range. Format:
YYYY-MM-DDTHH:mm:ss.SSSZ
-
mobileBackends(optional):
array mobileBackends
(Optional) Only delete analytic data for these backends.
-
startDate:
string
The start of the date range. Format:
YYYY-MM-DDTHH:mm:ss.SSSZ
array
-
Array of:
object Backend
Title:
Backend
Backend identification.
object
Backend
-
name(optional):
string
Backend's name.
-
version(optional):
string
The backend's version.
{
"mobileBackends":[
{
"name":"FixItFastCustomerMBE1",
"version":"1.0"
},
{
"name":"FixItFastCustomerMBE1",
"version":"1.1"
},
{
"name":"FixItFastCustomerMBE2",
"version":"1.0"
}
],
"endDate":"2018-04-12T09:00:00.000Z",
"startDate":"2018-04-12T07:00:00.000Z"
}
Response
- application/json
202 Response
object
Job
-
createdBy:
string
The user name of the job creator.
-
createdOn:
string
When the job was initiated.
-
filters:
object Filters
Title:
Filters
The date range of the data to delete and, optionally, for which backends. -
id:
string
The job ID.
-
links:
array Relationship links
Title:
Relationship links
Minimum Number of Items:1
Unique Items Required:true
-
status:
string
Allowed Values:
[ "PENDING", "RUNNING", "SUCCESSFUL", "FAILED" ]
The job status. -
type(optional):
string
Allowed Values:
[ "PURGE", "DELETION_ALL", "DELETION_API_CALLS", "DELETION_EVENTS", "DELETION_SESSIONS", "DELETION_USERS", "SHRINK_ALL", "SHRINK_API_CALLS", "SHRINK_EVENTS", "SHRINK_SESSIONS", "SHRINK_USERS" ]
The job type.
object
Filters
-
endDate:
string
The end of the date range. Format:
YYYY-MM-DDTHH:mm:ss.SSSZ
-
mobileBackends(optional):
array mobileBackends
(Optional) Only delete analytic data for these backends.
-
startDate:
string
The start of the date range. Format:
YYYY-MM-DDTHH:mm:ss.SSSZ
array
Relationship links
1
true
-
Array of:
object Link
Title:
Link
array
-
Array of:
object Backend
Title:
Backend
Backend identification.
object
Backend
-
name(optional):
string
Backend's name.
-
version(optional):
string
The backend's version.
object
Link
-
href:
string
A relative URL.
-
rel:
Allowed Values:
[ "self", "canonical", "prev", "next" ]
The type of link.
{
"createdBy":"UserX",
"links":[
{
"rel":"canonical",
"href":"/mobile/system/analytics/dataManagement/jobs/123"
},
{
"rel":"self",
"href":"/mobile/system/analytics/dataManagement/jobs/123"
}
],
"id":null,
"filters":{
"mobileBackends":[
{
"name":"FixItFastCustomerMBE1",
"version":"1.0"
},
{
"name":"FixItFastCustomerMBE1",
"version":"1.1"
},
{
"name":"FixItFastCustomerMBE2",
"version":"1.0"
}
],
"endDate":"2018-05-12T09:00:00.000Z",
"startDate":"2018-04-12T07:00:00.000Z"
},
"type":"PURGE",
"createdOn":"2018-09-02T12:34:56.789Z",
"status":"PENDING"
}
400 Response
Bad request.
object
Error
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
The service's error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
array
0
-
Array of:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Examples
The following example shows how to use cURL to initiate a job to delete rows from the ApiCalls, Events, Sessions, and Users tables for a specified backend for a specified date range and then shrink the tables. For more information about cURL, see Use cURL.
curl -i \ -X POST \ -u administrator@example.com:password \ -d @body.json \ -H "Content-Type: application/json; charset=utf-8" \ -H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce" \ https://fif.cloud.oracle.com/mobile/system/analyticsDataManagement/purge
Examples of Request Body
The following shows an example of the request body.
{ "startDate":"2018-01-12T07:00:00.000Z", "mobileBackends":[ { "name":"FixItFastCustomerMBE1", "version":"1.0" }, { "name":"FixItFastCustomerMBE1", "version":"1.1" }, { "name":"FixItFastCustomerMBE2", "version":"1.0" } ], "endDate":"2018-01-12T09:00:00.000Z" }
Example of Response Header
The following shows an example of the response header:
200 OK Content-Type: application/json Date: Wed, 31 Jan 2018 23:41:33 GMT
Example of Response Body
The following example shows the contents of the response body in JSON format:
{
"id": null,
"status": "PENDING",
"type": "PURGE",
"createdOn": "2018-01-31T23:41:32.472Z",
"createdBy": "jdoe",
"filters": {
"startDate": "2018-01-12T07:00:00.000Z",
"endDate": "2018-01-12T09:00:00.000Z",
"mobileBackends": [
{
"name": "FixItFastCustomerMBE1",
"version": "1.0"
},
{
"name": "FixItFastCustomerMBE1",
"version": "1.1"
},
{
"name": "FixItFastCustomerMBE2",
"version": "1.0"
}
]
},
"links": [
{
"rel": "canonical",
"href": "/mobile/system/analyticsDataManagement/purge/"
},
{
"rel": "self",
"href": "/mobile/system/analyticsDataManagement/purge/"
}
]
}