Skip to main content
Skip table of contents

API timeflows

From earlier, the RESTFul URL for a virtual database refresh will look like:

http://<delphix_engine>/resources/json/delphix/database/MSSQL_DB_CONTAINER-39/refresh

where the MSSQL_DB_CONTAINER-39 represents the target virtualized database to refresh and we need to POST the JSON data to the URL for processing.

CODE

{    "type": "RefreshParameters",    "timeflowPointParameters": {        "type": "TimeflowPointSemantic",        "container": "MSSQL_DB_CONTAINER-38"    }}

Timeflow parameters

The "timeflowPointParameters" key has 6 "type": "..." options which each have their own set of parameters. The type "TimeflowPointSemantic" uses the default LATEST_POINT within the source container. Now, for more on timeflowPointParameters.

http://<delphix_engine>/api/#TimeflowPointParameters

TimeflowPointParameters

Parameters indicating a TimeFlow point to use as input to database operations.

TypedObject
TimeflowPointParameters

Direct Known Subclasses:

TimeflowPointTimestamp, TimeflowPointSnapshot, TimeflowPointSemantic, TimeflowPointLocation, TimeflowPointBookmark, TimeflowPointBookmarkTag

TimeflowPointTimestamp

timeflow

Reference to TimeFlow containing this point.
Type: Reference to Timeflow
Constraints: Required: true

timestamp

The logical time corresponding to the TimeFlow location.
Type: date
Constraints: Required: true

TimeflowPointSnapshot

snapshot

Reference to the snapshot.
Type: Reference to TimeflowSnapshot

TimeflowPointSemantic

Semantic reference to a Timeflow point.

The reference is relative to a container and not a TimeFlow. If the container contains multiple TimeFlows, the Delphix Engine will evaluate the semantic reference with regards to all TimeFlows in that container.

container

Reference to the container.
Type: Reference to Container
Constraints: Required: true

location

A semantic description of a TimeFlow location.
Type: string
Constraints: Default: LATEST_POINT
Acceptable values: LATEST_POINT, LATEST_SNAPSHOT
Create: optional
Update: optional

TimeflowPointLocation

TimeFlow point based on a database-specific identifier (SCN, LSN, etc).

location

The TimeFlow location.
Type: string
Constraints: Required: true

timeflow

Reference to TimeFlow containing this location.
Type: Reference to Timeflow
Constraints: Required: true

TimeflowPointBookmark

bookmark

Reference to the bookmark.
Type: Reference to TimeflowBookmark
Constraints: Required: true

TimeflowPointBookmarkTag

container

Reference to the container.
Type: Reference to Container
Constraints: Required: true

tag

The name of the tag.
Type: string
Constraints: Required: true

Timeflow API objects: timeflow, snapshot, timeflowRanges

The sample code provides information on the Timeflow, timeflowRanges and snapshot objects for the respective VDB.

Filename: flows.sh

CODE

$ ./flows.sh VBITT10Session API Login API Login {"type":"OKResult","status":"OK","result":"USER-2","job":null,"action":null}Source: VBITT10container reference: ORACLE_DB_CONTAINER-75 Timeflows API timeflow names:DB_PROVISION@2016-09-27T13:15:18DB_ROLLBACK@2016-09-28T00:33:54DB_ROLLBACK@2016-09-28T00:38:33DB_ROLLBACK@2016-09-28T00:41:44

Select Timeflow Name (copy-n-paste from the above list):

CODE

DB_ROLLBACK@2016-09-28T00:33:54timeflow reference: ORACLE_TIMEFLOW-97

TimeflowRanges for this Timeflow ...

CODE

{    "type": "ListResult",    "status": "OK",    "result": [        {            "type": "TimeflowRange",            "startPoint": {                "type": "OracleTimeflowPoint",                "location": "5475918",                "timestamp": "2016-09-28T04:35:39.000Z",                "timeflow": "ORACLE_TIMEFLOW-97"            },            "endPoint": {                "type": "OracleTimeflowPoint",                "location": "5476181",                "timestamp": "2016-09-28T04:37:53.000Z",                "timeflow": "ORACLE_TIMEFLOW-97"            },            "provisionable": true        }    ],    "job":null,    "action":null,    "total": 1,    "overflow": false}

Snapshot per Timeflow ...

snapshots:
@2016-09-28T04:35:39.826Z
@2016-09-28T04:37:38.537Z
@2016-09-28T04:37:51.273Z

Select Snapshot Name (copy-n-paste from the above list):

CODE

@2016-09-28T04:37:38.537Zsnapshot reference: ORACLE_SNAPSHOT-152{    "type": "OracleSnapshot",    "reference": "ORACLE_SNAPSHOT-152",    "namespace":null,    "name": "@2016-09-28T04:37:38.537Z",    "consistency": "CRASH_CONSISTENT",    "missingNonLoggedData": false,    "container": "ORACLE_DB_CONTAINER-75",    "creationTime": "2016-09-28T04:37:38.537Z",    "firstChangePoint": {        "type": "OracleTimeflowPoint",        "location": "5476152",        "timestamp":null,        "timeflow": "ORACLE_TIMEFLOW-97"    },    "latestChangePoint": {        "type": "OracleTimeflowPoint",        "location": "5476157",        "timestamp": "2016-09-28T04:37:38.000Z",        "timeflow": "ORACLE_TIMEFLOW-97"    },    "retention": 0,    "timeflow": "ORACLE_TIMEFLOW-97",    "timezone": "US/Eastern,EDT-0400",    "version": "11.2.0.4.0",    "runtime": {        "type": "OracleSnapshotRuntime",        "provisionable": true,        "missingLogs":null    },    "temporary": false,    "fromPhysicalStandbyVdb": false,    "fractionTimeflows":null,    "redoLogSizeInBytes": 52428800}Done

The following scripts demonstrate REFRESH and RESET/ROLLBACK for the Timeflow types of timestamp, snapshot and scn/lsn.

Filename: vdb_refresh_timestamp.sh
Filename: vdb_refresh_snapshot.sh
Filename: vdb_refresh_scn.sh

Filename: vdb_rollback_timestamp.sh
Filename: vdb_rollback_snapshot.sh
Filename: vdb_rollback_scn.sh

Usage: ./vdb_[all_the_above_scripts].sh [source_vdb_name]

Sample Usage: Copy-and-Paste the timeflow name to the "Select timeflow Name:" prompt. Enter any timestamp between the startPoint and endPoint values using the format:
[yyyy] - [MM] - [dd]T[HH] : [mm] : [ss] . [SSS]Z

CODE

$ ./vdb_rollback_timestamp.sh VBITTSession and Login Successful ...database container reference: ORACLE_DB_CONTAINER-73 Timeflows API Timeflow Names:DB_REFRESH@2016-09-28T00:13:13DB_PROVISION@2016-09-26T07:00:08DB_ROLLBACK@2016-09-26T07:45:30DB_REFRESH@2016-09-26T12:20:57DB_ROLLBACK@2016-09-27T12:29:47

Select Timeflow Name (copy-n-paste from above list):

CODE

DB_ROLLBACK@2016-09-26T07:45:30Timeflow Reference: ORACLE_TIMEFLOW-89TimeflowRanges for this timeflow ... {    "type": "ListResult",    "status": "OK",    "result": [        {            "type": "TimeflowRange",            "startPoint": {                "type": "OracleTimeflowPoint",                "location": "5474012",                "timestamp": "2016-09-26T15:30:35.000Z",                "timeflow": "ORACLE_TIMEFLOW-89"            },            "endPoint": {                "type": "OracleTimeflowPoint",                "location": "5482482",                "timestamp": "2016-09-26T21:15:17.000Z",                "timeflow": "ORACLE_TIMEFLOW-89"            },            "provisionable": true        }    ],    "job": null,    "action": null,    "total": 1,    "overflow": false}Timestamp Format "[yyyy][MM][dd]T[HH]:[mm]:[ss].[SSS]Z"Enter Timestamp between Start and End Point values (exclude quotes): 2016-09-26T15:45:00.000Zjson> {    "type": "OracleRollbackParameters",    "timeflowPointParameters": {        "type": "TimeflowPointTimestamp",        "timeflow": "ORACLE_TIMEFLOW-89",        "timestamp": "2016-09-26T15:45:00.000Z"    },    "username": ""}Job: JOB-515Current status as of Wed Sep 28 00:49:39 EDT 2016 : RUNNING 0% Completed. . .Current status as of Wed Sep 28 00:51:10 EDT 2016 : RUNNING 73% CompletedCurrent status as of Wed Sep 28 00:51:50 EDT 2016 : RUNNING 96% CompletedJob: JOB-515 COMPLETED 100% Completed ...Done ...
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.