Delete All

post

/mobile/system/analyticsDataManagement/deletion

Initiates a job to delete rows from the ApiCalls, Events, Sessions, and Users tables for the specified date range. Optionally, you can specify the mobile backends for which data is to be deleted.

Permissions

Only team members with the MobileEnvironment_System role can access the Analytics Data Management API.

Request

Supported Media Types
Body ()
Root Schema : Filters
Type: object
Title: Filters
The date range of the data to delete and, optionally, for which mobile backends.
Show Source
Nested Schema : mobileBackends
Type: array
(Optional) Only delete analytic data for these mobile backends.
Show Source
Nested Schema : Mobile Backend
Type: object
Title: Mobile Backend
Mobile backend identification.
Show Source
Example Request (application/json)
{
    "startDate":"2017-04-12T07:00:00.000Z",
    "mobileBackends":[
        {
            "name":"FixItFastCustomerMBE1",
            "version":"1.0"
        },
        {
            "name":"FixItFastCustomerMBE1",
            "version":"1.1"
        },
        {
            "name":"FixItFastCustomerMBE2",
            "version":"1.0"
        }
    ],
    "endDate":"2017-04-12T09:00:00.000Z"
}
Back to Top

Response

Supported Media Types

202 Response

Job initiated successfully.
Body ()
Root Schema : Job
Type: object
Title: Job
Information about a purge job.
Show Source
Nested Schema : Filters
Type: object
Title: Filters
The date range of the data to delete and, optionally, for which mobile backends.
Show Source
Nested Schema : mobileBackends
Type: array
(Optional) Only delete analytic data for these mobile backends.
Show Source
Nested Schema : Mobile Backend
Type: object
Title: Mobile Backend
Mobile backend identification.
Show Source
Example Response (application/json)
{
    "id":null,
    "createdOn":"2015-09-02T12:34:56.789Z",
    "createdBy":"UserX",
    "status":"PENDING",
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/system/analytics/dataManagement/jobs/123"
        },
        {
            "rel":"self",
            "href":"/mobile/system/analytics/dataManagement/jobs/123"
        }
    ],
    "type":"DELETION_ALL",
    "filters":{
        "startDate":"2017-04-12T07:00:00.000Z",
        "mobileBackends":[
            {
                "name":"FixItFastCustomerMBE1",
                "version":"1.0"
            },
            {
                "name":"FixItFastCustomerMBE1",
                "version":"1.1"
            },
            {
                "name":"FixItFastCustomerMBE2",
                "version":"1.0"
            }
        ],
        "endDate":"2017-05-12T09:00:00.000Z"
    }
}

400 Response

Bad request.

Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by Mobile Cloud Service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
List of the issues that cause the error. Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Back to Top

Examples

The following example shows how to initiate a job to delete rows from the ApiCalls, Events, Sessions, and Users tables for a specified backend for a specified date range using cURL. 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/deletion

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:07:01 GMT

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
    "id": null,
    "status": "PENDING",
    "type": "DELETION_ALL",
    "createdOn": "2018-01-31T23:07:01.909Z",
    "createdBy": "jdoe",
    "filters": {
        "startDate": "2018-01-12T07:00:00.000Z",
        "endDate": "2018-01-12T09:00:00.000Z",
        "mobileBackends": [
            {
                "name": "FixItFastCustomerMBE1",
                "version": "1.1"
            },
            {
                "name": "FixItFastCustomerMBE2",
                "version": "1.0"
            },
            {
                "name": "FixItFastCustomerMBE1",
                "version": "1.0"
            }
        ]
    },
    "links": [
        {
            "rel": "canonical",
            "href": "/mobile/system/analyticsDataManagement/deletion/"
        },
        {
            "rel": "self",
            "href": "/mobile/system/analyticsDataManagement/deletion/"
        }
    ]
}
Back to Top