0% found this document useful (0 votes)
1 views

Data Protector Develop_Section

The document provides a comprehensive guide on developing custom application plugins for Data Protector version 25.1, detailing the Unified Agent Developer Kit, installation procedures, and backup workflows. It includes prerequisites, limitations, and instructions for using REST APIs and CLI commands for integration and management of plugins. The document emphasizes the importance of following specific steps for plugin registration and installation to ensure successful backup and restore functionalities.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Data Protector Develop_Section

The document provides a comprehensive guide on developing custom application plugins for Data Protector version 25.1, detailing the Unified Agent Developer Kit, installation procedures, and backup workflows. It includes prerequisites, limitations, and instructions for using REST APIs and CLI commands for integration and management of plugins. The document emphasizes the importance of following specific steps for plugin registration and installation to ensure successful backup and restore functionalities.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Develop

Data Protector
Version : 25.1

PDF Generated on : 03/25/2025

The Information Company

© Copyright 2025 Open Text


Data Protector 25.1

Table of Contents
1. Develop 3

1.1. Unified agent developer kit 4

1.1.1. Install custom application plugin 5

1.1.2. Develop and register a custom application plugin 8

1.1.3. Backup workflow for the custom application plugin 12

1.1.4. Restore workflow for the custom application plugin 15

1.2. REST API Reference 17

1.3. CLI - API bridge 23

1.3.1. command API 25

1.3.2. output API 29

1.3.3. settings API 32

1.3.4. settings API - GET 35

1.3.5. outputcatalog API 39

1.3.6. clean API 42

1.3.7. abortrun API 45

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 2
Data Protector 25.1

1. Develop
This section introduces you to REST Application Programming Interfaces (APIs)
available with Data Protector.

Related topics
REST API reference

CLI - REST API bridge

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 3
Data Protector 25.1

1.1. Unified agent developer kit


Data Protector provides built-in support for backing up and restoring various
applications such as OpenText Documentum, MongoDB, MySQL, and SQL Server.
To efficiently back up and restore data on the Linux applications for which Data
Protector doesn't provide built-in support, integrate the application with Data
Protector by using the Unified Software Development Kit (SDK).

This SDK includes a set of APIs and tools that you can use to create plugins for such
custom applications and then implement the backup and restore functionality for
them. Data Protector supports full and incremental backup and restore functionality
for custom Linux applications.

Use the information on the custom application plugin page in GitHub to develop and
register the custom application plugins with Data Protector, develop code for backup
and restore workflows, and trigger the backup or restore operations.

Prerequisites
Java Development Kit 17
A basic knowledge of Data Protector and Java development expertise
Apache Maven 3.6.3 or higher
Install and configure Data Protector with at least one UIC instance. See Install
Unified Agent.
Ensure time synchronization between the Cell Manager and the clients.

Limitations
The following list includes some current limitations that inevitably arises as the
result of design choices consciously made after careful evaluation of ROI and other
priorities. As priorities change, we might have remedy for the limitations:

No Web UI support for backup specification creation and restore workflows.


No support for stream-based transfer model for archives. So, it requires staging
the archive on the file system.
Supports only one custom application plugin on a Data Protector client.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 4
Data Protector 25.1

1.1.1. Install custom application


plugin
Before you develop a custom application plugin for integrating your application with
Data protector, review the following information to install Unified Agent on the client
where you want to develop the plugin. You can either locally or remotely install the
agent on the client.

Supported platforms
For a list of the supported platforms, see Support Matrix.

Prerequisites
Perform the following steps on the client on which you want to develop the custom
plugin:

1. To enable the dpuic service, which interacts with the client system to run as a
privileged user, do the following:
1. Run the following command to create a new user group named dpuic :
groupadd dpuic
2. Run the following command to add the dpuic user to the dpuic group:
useradd -g dpuic dpuic
2. To allow the dpuic user to access the client without entering a password, edit
the /etc/sudoers file by using visudo command to add the following line:
dpuic ALL=(ALL) NOPASSWD: ALL

Note

Ensure that you separate semicolon (:) and ALL with a space in the command,
else the operations might fail.

Local installation
Perform the following steps on the client to import the client to the CM

1. To locally install the Data Protector client, do the following:

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 5
Data Protector 25.1

1. Copy the downloaded Data Protector install package (tar) on the


system and extract the files to a local directory.
2. From the LOCAL_INSTALL directory execute the omnisetup.sh command.
The syntax of the command is as follows:
omnisetup.sh [-source directory] [-install component_list] -pluginType None
where:
directory: location where you extract the installation package. If
you don't specify the directory, it uses the current directory by
default.
component_list: da,cc,unified_agent
2. Run the following command to establish secure communication between the
Cell Manager and the newly installed client.
omnicc -secure_comm -configure_peer clientname [-accept_host]

Perform the following steps on the Data Protector Cell Manager:

1. Run the following command to add the client host user to Data Protector Admin
users list:
omniusers -add -type U -name "root" -usergroup "admin" -group "root" -client clientnam
e -pass password
2. Use the GUI or CLI to import the client to Cell Manager. To import the client to
Cell Manager using the CLI, run the following command:
omnicc -import_host HostName [-virtual] [-accept_host]

Remote installation
To remotely install Data Protector with a UIC instance on the client system, use
either the GUI or the CLI:

Using the GUI


1. Start the Data Protector GUI by clicking Start > Programs > Data
Protector > Data Protector Manager.
2. In the Data Protector Manager, switch to the Clients context.
3. In the Scoping Pane, right-click Clients and click Add Clients.
4. Select a configured Unix Installation Server that you want to use for installing
the clients. Click Next.
5. Type the names of the clients or search for the clients (on Windows GUI only)
you want to install. Click Next.
6. Select the Data Protector components you want to install. You must select the

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 6
Data Protector 25.1

following components: User Interface, and Unified Agent.


7. Select the plugin type.
8. If you selected more than one client and you would like to install different
components on each client, click Specify components for each client
individually and then click Next. Select the components you want to install for
each client independently. Click Next.
9. Click Finish to start the installation.
10. During the installation, provide the data required (username, password) to
access the specific client system when prompted. Click OK.

Using the CLI


For information about using the ob2install command to install Data Protector
components on a remote system using an Installation Server, see ob2install

Related topics
For information about the Unified Agent Developer Kit and developing the
unified plugin for your application, see Develop UIC plugin.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 7
Data Protector 25.1

1.1.2. Develop and register a


custom application plugin

Develop a custom application plugin


Perform the following steps:

1. Use the Maven Archetype project to create a skeleton project and stub files.
Follow the instructions in the README.md located at the root of the GitHub
repository to install the archetype and use it to create a new plugin project. The
created project contains an example plugin named SampleFS.
For an example about how to use a skeleton project to implement a plugin,
see SampleFS. It might help to make a side-by-side comparison of the files in
the generated project with the files in the SampleFS project.
2. Follow the instructions in the README.md located at the root of the created
project to:
1. Ensure that you have met all the prerequisites.
2. Develop the plugin by implementing the code.

Note

For proper rendering of markdown files (README.md ) hosted on GitHub, view them
directly on GitHub using a browser. For viewing a markdown file in local filesystem, use
a browser extension that supports GitHub Flavored Markdown. For example, use
Markdown Viewer for Chrome and Firefox.

Build the custom application plugin


After you develop the plugin, follow the instructions in the README.md located at
the root of the created project and run the following command to build the plugin:

mvn clean package

After the plugin project successfully builds, it creates a ${pluginName}-${version}-dist.


tar.gz file in a target folder automatically created within the examples folders of the
plugin project.

To test and install the plugin, do the following:

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 8
Data Protector 25.1

1. Manually install the plugin: Perform the steps listed in Manual Installation to
manually install the plugin without the need to register it with Data Protector.
Follow this approach to initially verify if the plugin loads fine.
2. Integrate the plugin with Data Protector: After you have verified the
loading of plugin as mentioned in Manual Installation, integrate the plugin with
Data Protector by registering it and then install the plugin remotely by using
the Installation Server.

Integrate the plugin with Data Protector

To integrate the plugin with Data Protector, follow the topics to create a manisfest
file for registering the plugin and then registering the plugin:

Create a manifest file for the plugin


registration
To register the plugin with Data Protector, you need the manifest file for the plugin.
On the Installation Server, create a manifest.json file with the name, version, and an
optional description information of the plugin as shown in the following example for
Cassandra plugin. Ensure that you create the manifest.json file in the same location
of the Installation Server where you copied the built <pluginname>-<version>-dist.tar.g
z custom application plugin.

{
"pluginname":"Cassandra",
"version":"3.4",
"description":"Plugin for the cassandra"
}

Register the custom application plugin


After you use the Unified Agent SDK to create a custom plugin for your application,
you must register the plugin with Data Protector.

To register the plugin, run the following command on the Installation Server:

/opt/omni/sbin/pluginmanager.pl -register -input_path <input_path> [-help]

where the <input_path> refers to a location on the Installation Server that contains
the manifest.json file and the <pluginname>-<version>-dist.tar.gz file.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 9
Data Protector 25.1

If a plugin with the same name already exists during registration, it prompts whether
you want to overwrite the plugin or not. After you register the plugin, this plugin lists
when you select Unified Agent component while adding Data Protector components
on your system. If you make any changes to the already registered plugin, then you
must register it again.

Note

You might want to deregister the plugin in cases such as you no longer require the
plugin or when the name of the plugin changes. To deregister a custom plugin that you
have registered with Data Protector, run the following command:

pluginmanager.pl -deregister -pluginname [-help]

This removes the custom plugin from the Installation Server.

For example: To deregister a filesystem plugin named SampleFS, run the following
command:
pluginmanager.pl -deregister -pluginname SampleFS

Remotely install the custom application


plugin
To remotely install the registered plugin on a Data Protector client system:

Using GUI
1. Start the Data Protector GUI by clicking Start > Programs > Data
Protector > Data Protector Manager.
2. In the Data Protector Manager, switch to the Clients context.
3. In the Scoping Pane, right-click Clients and do one of the following depending
on whether you want to add a new client on add the plugin component on an
existing client:
To add components to an existing client, right-click the client and click
Add Components.
To add a new client, click Add Clients and type the names of the clients
or search for the clients (on Windows GUI only) you want to install.
Click Next.
4. Select the Data Protector components you want to install. You must select the
following components: Disk Agent, User Interface, and Unified Agent.
5. On selecting the Unified Agent component, select the custom plugin you want
to install. For example, if you developed the plugin for Cassandra, select

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 10
Data Protector 25.1

Cassandra from the list.


6. Click Finish to start the installation.

Using CLI
For information about using the ob2install command to install Data Protector
components on a remote system using an Installation Server, see ob2install.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 11
Data Protector 25.1

1.1.3. Backup workflow for the


custom application plugin

Create backup specification


To create or save the backup specification, use the following REST API. Make sure
you have appropriate permissions assigned. Read the REST API Reference
documentation on how to obtain auth tokens to invoke the APIs.

For the endpoint, launch the following URL:


https://<CM_hostname>:7116/dp-protection/restws/unified/v1/backupspecifications

where <CM_hostname> refers to the hostname of the Cell Manager.

Currently, you cannot create backup specification through the Graphical User
Interface (GUI). To view the schema (data models) associated with the backup
specification, access the Swagger UI at the following location and search for Unified
backup specification:

https://<CM_hostname>:7116/dp-apis

{
"specificationName": "${pluginNameLowerCase}-backup-spec-1",
"client": {
"appHost": "sles15.newton.novell.com",
"application": {
"type": "unifiedAgent",
"subType": "${pluginName}"
},
"appName": "myAppName",
"appOptions": {
"appName": "myAppName",
"appId": "myAppId",
"app-specific-key-for-spec-1": "app-specific-value-for-spec-1",
"app-specific-key-for-spec-2": "app-specific-value-for-spec-2",
"app-specific-key-for-spec-n": "app-specific-value-for-spec-n"
},
"args": {
"readstdin": true
},

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 12
Data Protector 25.1

"executable": "unified_bar_executor",
"protection": {
"type": "Permanent",
"until": 1,
"date": "2023-12-03T04:59:59.999Z"
},
"report": "Warning",
"isPublic": false,
"isProfileEnabled": false,
"isCompressionEnabled": false
},
"target": {
"loadBalancing": {
"min": 1,
"max": 5
},
"devices": [
{
"name": "DPFileLibrary_Writer0",
"type": "File Library"
}
]
},
"dataSecurity": "none",
"owner": {
"userName": "",
"group": "",
"client": ""
},
"postExec": {
"script": "",
"host": ""
},
"preExec": {
"script": "",
"host": ""
}
}

A few key points to pay attention to:

client.application.subType :The exact name of the plugin name in lower


case,which is the value of ${pluginNameLowerCase}.
client.appOptions.appId : An ID value that uniquely identifies the application or

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 13
Data Protector 25.1

the data source and shouldn't contain space.


In the case of SampleFS, the data source refers to the file system on the
machine that has the plugin installed. The client's hostname seems most
appropriate as the ID.
client.appOptions.appName : The name of the application or the data source. A
name is not necessarily unique for each data source and shouldn't contain
space.
client.appName : Same as client.appOptions.appName .
client.appOptions.dirPath : Denotes an existing directory (not a file) and this
implementation accepts only a single value.
client.appOptions : The backup_appOptions.schema.json file defines this content.
To get the details required for target.devices , access the Devices & Media context
in the Data Protector Manager, and review the information available under Envir
onment > Devices .

Trigger backup request


There are several ways to trigger a backup request

Use the REST API (served by the Application Server) to make a backup request
programmatically
Use the omnib command line interface.

Following is an example request URL and associated payload/body to the Application


Server REST API for programmatically triggering a backup request. Note that
the specificationName value should match the name of the backup specification
from the earlier example.

https://<CM_hostname>:7116/dp-protection/restws/unified/v1/backup

{
"specificationName": "${pluginNameLowerCase}-backup-spec-1",
"appSubType": "${pluginNameLowerCase}",
"mode": "full",
"load": "high",
"monitor": "show"
}

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 14
Data Protector 25.1

1.1.4. Restore workflow for the


custom application plugin
Use the REST API offered by the Application Server to trigger a restore request.
Currently, you can't initiate the restore request through the Graphical User Interface
(GUI).

Following is an example request URL and associated payload/body to the Application


Server REST API for programmatically triggering a restore request. Compare the
values with those in the example backup specification shown earlier.

https://<CM_hostname>:7116/dp-protection/restws/unified/v1/restore

where <CM_hostname> refers to the hostname of the Cell Manager.

{
"barhost": "sles15.newton.novell.com",
"appType": "${pluginNameLowerCase}",
"appOptions": {
"sessionId": "2023/01/24-2",
"host": "sles15.newton.novell.com",
"appName": "myAppName",
"appId": "myAppId",
"app-specific-key-for-restore-1": "app-specific-value-for-restore-1",
"app-specific-key-for-restore-2": "app-specific-value-for-restore-2",
"app-specific-key-for-restore-n": "app-specific-value-for-restore-n"
},
"report": "critical",
"monitor": "show",
"ownerName": "",
"ownerGroup": ""
}

A few key points to pay attention to:

appType : The exact name of the plugin name in lower case,which is the value
of ${pluginNameLowerCase}.
appOptions : The appName and appId must match the values given to the
corresponding backup specification respectively.
restoreDirPath : An existing and empty directory to restore the backup data
directly to it. Restores any (optional) incremental backups in the chain to a
temporary location within /var/opt/omni/tmp/samplefs/restore/<timestamp> and

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 15
Data Protector 25.1

then applies to the restoreDirPath directory one by one in ascending time order
within the chain.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 16
Data Protector 25.1

1.2. REST API Reference


Data Protector uses Swagger to document the framework for the RESTful APIs. You
can access it from the API Documentation in the Help menu option on the Data
Protector GUI. Alternatively, you can find the complete list of APIs in an interactive
format here. In addition to the well-defined REST endpoints in the reference you can
use the CLI-API Bridge to execute CLI commands on the Cell Manager in a RESTful
manner.

Prepare a user for REST API access


To access the Data Protector REST API you need to authenticate with the Application
Server to receive an OpenAPI Bearer token for all other operations. The Web user
name required to log in is in the Username|Group|Client format. You can create a new

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 17
Data Protector 25.1

user for this purpose or reset the password of a an existing user from the Users
context.

Getting Started with REST API


This section contains examples on how to interact with the Data Protector REST API.
In these examples, the sample REST call is done using cURL and PowerShell, but you
can use any other client application such as Postman.

Authenticate with the Application Server


To receive a Bearer access_token you have to authenticate with the Application
Server. Make sure to use the Web User name and password defined for this purpose.
In this example, the username is administrator|lejcm01|* and the password is MyP4ssw
*rd . You must use the same access_token in all subsequent calls so the Application
Server is aware that the request is coming from an authenticated client.

cURL command

curl --insecure -X POST "https://<Cell Manager>:7116/auth/realms/DataProtector/protoco


l/openid-connect/token" -H "accept: application/json" -d "username=administrator|lejcm
01|*&password=MyP4ssw*rd&refresh_token=string&client_id=dp-gui&grant_type=passw
ord"

PowerShell command

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Url = "https://<Cell Manager>:7116/auth/realms/DataProtector/protocol/openid-connect/
token"
$Body = @{
username = "administrator|lejcm01|*"
password = "MyP4ssw*rd"
refresh_token = "string"
client_id = "dp-gui"
grant_type = "password"
}
Invoke-RestMethod -Method 'Post' -Uri $url -Body $body | ConvertTo-Json

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 18
Data Protector 25.1

The result is as follows in both cases, while the access_token and fresh_token have
been truncated for better readability.

{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJVMGljTmZ
BTmhMMnRiWHUwZUlF...",
"expires_in": 1800,
"refresh_expires_in": 2592000,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJmYWFhNDk3Ny03M
jA5LTQwYTUtY...",
"token_type": "bearer",
"not-before-policy": 0,
"session_state": "54f4501c-3a27-44ac-b84f-f219a0cc841c",
"scope": "email profile"
}

Get Total Protected Data


With the access_token from the authentication request, you can issue a REST API call
to get the Total Protected Data.

cURL command

curl --insecure -X GET "https://<Cell Manager>:7116/idb/v2/dashboard/backup/dataprote


cted" -H "accept: application/json" -H "Authorization: Bearer <access_token>"

PowerShell command

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Url = "https://<Cell Manager>:7116/idb/v2/dashboard/backup/dataprotected"
$headers = @{
Authorization = "Bearer <access_token>"
accept = "application/json"
}
Invoke-RestMethod -Method 'GET' -Uri $url -Headers $headers | ConvertTo-Json

The result is as follows in both cases:

{
"size": "15144 GB"
}

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 19
Data Protector 25.1

Fetch backup objects for a client system


By using the access_token from the authentication request, you can issue a REST API
call to get all backup objects for a specific client system. You can use this
information for more advanced operations.

cURL command

curl --insecure -X GET "https://<Cell Manager>:7116/idb/restoretree/fs?host=<Client>" -


H "accept: application/json" -H "Authorization: Bearer <access_token>"

PowerShell command

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Url = "https://<Cell Manager>:7116/idb/restoretree/fs?host=<Client>"
$headers = @{
Authorization = "Bearer <access_token>"
accept = "application/json"
}
Invoke-RestMethod -Method 'GET' -Uri $url -Headers $headers | ConvertTo-Json

The result is as follows in both cases:

{
"type": "filesystem",
"hosts": [
{
"hostname": "lejcm01.mfdemo.local",
"sessions": [
{
"session_name": "2020/11/12-6",
"mountpoints": [
{
"copy_id": "de3bd081-8a10-4682-80df-33f363e2ae80/19808",
"device": "SOS_lejcm01",
"label": "C: [SYSTEM]",
"mountpoint": "/C",
"object_type": "winfs",
"tree": [

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 20
Data Protector 25.1

"/Folder1",
"/Folder2"
],
"diskagent_id": 1605184203
}
],
"session_type": 0
}
]
}
]
}

Fetch backed up folders of a backup object


on a client
By using the access_token from the authentication request and the information from
the previous call, you can issue a REST API call to get all containers (folders) backed
up in a particular timeframe.

cURL command

curl --insecure -X POST "https://<Cell Manager>:7116/idb/v1/catalog/backedupobjects/chi


ldren" -H "accept: application/json" -H "Authorization: Bearer <access_token>" -H "Cont
ent-Type: application/json" -d '{"hostName":"lejcm01.mfdemo.local","mountPoint":"/C","l
abel":"C: [SYSTEM]","parentPath":"/","intervalStartTime":"2020-11-01T10:00:00Z","inter
valEndTime":"2020-11-30T10:00:00Z","selectableOnly":true}'

PowerShell command

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$Url = "https://<Cell Manager>:7116/idb/v1/catalog/backedupobjects/children"
$headers = @{
Authorization = "Bearer <access_token>"
accept = "application/json"
}
$Body = @{
hostName = "lejcm01.mfdemo.local"
mountPoint = "/C"
label = "C: [SYSTEM]"

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 21
Data Protector 25.1

parentPath = "/"
intervalStartTime = "2020-10-12T10:00:00Z"
intervalEndTime = "2020-12-12T10:00:00Z"
selectableOnly = [bool] 1
}
$Body = $Body | ConvertTo-Json
Invoke-RestMethod -Method 'POST' -Uri $url -Headers $headers -Body $body -ContentType
"application/json" | ConvertTo-Json

The result is as follows in both cases.

{
"entries": [
{
"container": true,
"pathName": "/Folder1",
"mountPoint": "/C",
"selectable": true,
"objectName": "Folder1",
"label": "C: [SYSTEM]"
},
{
"container": true,
"pathName": "/Folder2",
"mountPoint": "/C",
"selectable": true,
"objectName": "Folder2",
"label": "C: [SYSTEM]"
}
],
"count": 2
}

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 22
Data Protector 25.1

1.3. CLI - API bridge


Application Programming Interface (API) is a set of developer tools and protocols
that help you build customized software applications by providing building blocks.
APIs govern how multiple software components and applications interact with each
other.

Data Protector REST APIs are a new REST endpoint that offers Data Protector CLI in a
RESTful manner. Operations that can be performed through CLIs are exposed
through a single REST endpoint. You can configure devices, run backups, monitor
sessions, etc in a RESTful manner.

Outputs are in the standard JSON format. There are additional supporting API
operations, to execute API in sync and async mode.

You can get, as well as set various counters and parameters.

Data Protector provides the following RESTful APIs:

API Description

command API Executes the CLI command.

output API Gets the output of the execution of a command.

settings API Sets the REST API bridge settings.

settings API (GET method) Gets the current settings of the REST API bridge.

outputcatalog API Lists the output catalog entries.

clean API Cleans the user work space.

abortrun API Aborts a running CLI session.

Limitations
The following limitations apply:

APIs work only for CLI commands that are installed on the Cell Manager. The

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 23
Data Protector 25.1

following commands can be executed:


1. omnib
2. omnistat
3. omnidb
4. omniabort
5. omnir
6. omnicheck
7. omnimm
8. omnimnt
9. omniminit
10. omnimver
11. omniobjcopy
12. omniobjverify
13. omniobjconsolidate
14. omnirpt
15. omnib2dinfo
16. omniusers
17. omnicellinfo
18. omnicreatedl
19. omnimlist
20. omniupload
21. omnidownload
22. omnimcopy
23. omnicjutil
24. omniamo
25. omnihealthcheck
Commands that require user interaction are not supported.

For example, omnidbinit -force requires the user to enter an option, yes or no.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 24
Data Protector 25.1

1.3.1. command API

Use this API to execute the CLI command.

Contents
1 URL
2 Method
3 Parameters
4 Header
5 JSON body
6 Response codes
7 Example

URL[edit]
https://<hostname>:<port>/dp-rest-cli-bridge/restws/command

Method[edit]
POST

Parameters[edit]
None

Header[edit]

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 25
Data Protector 25.1

Name Description

(Required)

Authenticates the request call to the API server and provides secure access to the
resources while protecting your user credentials.
X-Auth-
Token
Type: string

Attribute: <valid_token>

JSON body[edit]
{
"name": "omnidb",
"options": "-session 2018/11/08-1 -detail",
"wait": 3000
}

name : Specify the command to run.

options : Specify the parameter required to get the desired information.

wait : Specify the runtime waiting period. This field is specified in milliseconds.

Response codes[edit]
This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 26
Data Protector 25.1

Code Status Description

Returns the output as a a jsonarray named cli_output if the CLI is


complete.

200 SUCCESS
If the CLI is waiting for the completion even after the given waiting
time, then the reunId is returned. The output can be retrieved at a
later stage using the runId .

BAD Returns an error message describing the specific problem. This could
400
REQUEST be caused by an invalid URL or header sent in request.

NOT
401 The X-Auth-token used for authentication is incorrect.
AUTHORIZED

INTERNAL
500 SERVER Issues with the website's server.
ERROR

Example[edit]
https://iwf1114030.hostname.net:7116/dp-rest-cli-bridge/restws/command

Successful output:

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 27
Data Protector 25.1

{
"result": {
"cli_output": [
"",
"Object name : iwf1119076.hostname.net:/C 'C:'",
"\tObject type : WinFS",
"\tObject status : Completed",
"\tStarted : Thursday, November 8, 2018, 11:48:34 AM",
"\tFinished : Thursday, November 8, 2018, 11:49:23 AM",
"\tObject size : 2480352 KB",
"\tBackup type : Full",
"\tProtection : Protected permanently",
"\tCatalog retention : Same as data protection.",
"\tVersion type : Normal",
"\tAccess : Private",
"\tNumber of warnings : 0",
"\tNumber of errors : 0",
"\tDevice name : FLDevice1_Writer0",
"\tBackup ID : n/a",
"\tCopy ID : F064D90A-9E46-4E35-B9BD-470E1C9B8F06/1030 (Orig)",
"\tEncrypted : No",
"\tDiskAgent ID : 1541657913",
"\tPoint in time : Thursday, November 8, 2018, 11:48:34 AM"
],
"runid": "2018-11-08-2",
"command": "omnidb -session 2018/11/08-1 -detail",
"status": "complete"
}
}

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 28
Data Protector 25.1

1.3.2. output API

Use this API to get the output of a run. Use the runId of a previous run. The runId can
be obtained from the output catalog.

Contents
1 URL
2 Method
3 Parameters
4 Header
5 JSON body
6 Response codes
7 Example

URL[edit]
https://<hostname>:<port>/dp-rest-cli-bridge/restws/output?runId=<run-id>

Method[edit]
GET

Parameters[edit]
None

Header[edit]

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 29
Data Protector 25.1

Name Description

(Required)

Authenticates the request call to the API server and provides secure access to the
resources while protecting your user credentials.
X-Auth-
Token
Type: string

Attribute: <valid_token>

JSON body[edit]
None

Response codes[edit]
Code Status Description

200 SUCCESS Returns the list of Cell Manager(s).

BAD Returns an error message describing the specific problem. This could
400
REQUEST be caused by an invalid URL or header sent in request.

NOT
401 The X-Auth-token used for authentication is incorrect.
AUTHORIZED

INTERNAL
500 SERVER Issues with the website's server.
ERROR

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 30
Data Protector 25.1

Example[edit]
https://iwf1114030.hostname.net:7116/dp-rest-cli-bridge/restws/output?runId=2018-10-16
-01

Successful output:

{
"output": {
"output": [
"WARNING Calculation of total protected data size may take some time."
]
"command": "omnicc -check_lic"
}
}

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 31
Data Protector 25.1

1.3.3. settings API

Use this API to set the REST Bridge settings.

Contents
1 URL
2 Method
3 Parameters
4 Header
5 JSON body
6 Response codes
7 Example

URL[edit]
https://<hostname>:<port>/dp-rest-cli-bridge/restws/settings

Method[edit]
POST

Parameters[edit]
None

Header[edit]

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 32
Data Protector 25.1

Name Description

(Required)

Authenticates the request call to the API server and provides secure access to the
resources while protecting your user credentials.
X-Auth-
Token
Type: string

Attribute: <valid_token>

JSON body[edit]
{
"max_concurrent_sessions": "100"
}

max_concurrent_sessions : Specifies the maximum number of concurrent sessions that


can be triggered.

Response codes[edit]
Code Status Description

200 SUCCESS On success, it returns to the Bridge settings after the update.

BAD Returns an error message describing the specific problem. This could
400
REQUEST be caused by an invalid URL or header sent in request.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 33
Data Protector 25.1

Code Status Description

NOT
401 The X-Auth-token used for authentication is incorrect.
AUTHORIZED

INTERNAL
500 SERVER Issues with the website's server.
ERROR

Example[edit]
https://iwf1114030.hostname.net:7116/dp-rest-cli-bridge/restws/settings

Successful output:

{
"status_check_interval": "100",
"defaultwait": "1000",
"max_concurrent_sessions": "10",
"maxoutputs": "1000"
}

status_check_interval : Checks the status internally.

defaultwait : Specifies the default waiting time, which is 1000 milliseconds. This can
be changed according to your requirement.

max_concurrent_sessions : Specifies the maximum number of concurrent sessions that


can be triggered.

maxoutputs : Specifies the maximum number of outputs that can be stored.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 34
Data Protector 25.1

1.3.4. settings API - GET

Use this API to get the current settings of the REST Bridge.

Contents
1 URL
2 Method
3 Parameters
4 Header
5 JSON body
6 Response codes
7 Example

URL[edit]
https://<hostname>:<port>/dp-rest-cli-bridge/restws/settings

Method[edit]
GET

Parameters[edit]
None

Header[edit]

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 35
Data Protector 25.1

Name Description

(Required)

Authenticates the request call to the API server and provides secure access to the
resources while protecting your user credentials.
X-Auth-
Token
Type: string

Attribute: <valid_token>

JSON body[edit]
None

Response codes[edit]
Code Status Description

200 SUCCESS Gets the current settings of the REST Bridge.

BAD Returns an error message describing the specific problem. This could
400
REQUEST be caused by an invalid URL or header sent in request.

NOT
401 The X-Auth-token used for authentication is incorrect.
AUTHORIZED

INTERNAL
500 SERVER Issues with the website's server.
ERROR

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 36
Data Protector 25.1

Example[edit]
https://iwf1114030.hostname.net:7116/dp-rest-cli-bridge/restws/settings

Successful output:

{
"appconfig":{
"cliworkspace": "cliws",
"status_check_interval": "100",
"defaultwait": "1000",
"max_concurrent_sessions": "100",
"maxoutputs": "10"
}
}

cliworkspace : Specifies where the output catalog information is stored. The storage
location cannot be changed.

The information is stored in the following locations:

For Windows:

C:\ProgramData\OmniBack\CliBridgeWorkspaces\administrator-<hostname>-<hostn
ame>

For Linux:

/var/opt/omni/log/CliBridgeWorkspaces/root-any-<hostname>

maxoutputs : Specifies the maximum number of outputs that can be stored.

status_check_interval : Checks the status internally.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 37
Data Protector 25.1

defaultwait : Specifies the default waiting time, which is 1000 milliseconds. This can
be changed according to your requirement.

max_concurrent_sessions : Specifies the maximum number of concurrent sessions that


can be triggered.

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 38
Data Protector 25.1

1.3.5. outputcatalog API

Use this API to get the output catalog. The output catalog keeps catalog of the CLI
runs that are executed through the bridge.

Contents
1 URL
2 Method
3 Parameters
4 Header
5 JSON body
6 Response codes
7 Example

URL[edit]
https://<hostname>:<port>/dp-rest-cli-bridge/restws/workspace/outputcatalog

Method[edit]
GET

Parameters[edit]
None

Header[edit]

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 39
Data Protector 25.1

Name Description

(Required)

Authenticates the request call to the API server and provides secure access to the
resources while protecting your user credentials.
X-Auth-
Token
Type: string

Attribute: <valid_token>

JSON body[edit]
None

Response codes[edit]
Code Status Description

200 SUCCESS Lists the catalog entries in the output catalog.

BAD Returns an error message describing the specific problem. This could
400
REQUEST be caused by an invalid URL or header sent in request.

NOT
401 The X-Auth-token used for authentication is incorrect.
AUTHORIZED

INTERNAL
500 SERVER Issues with the website's server.
ERROR

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 40
Data Protector 25.1

Example[edit]
https://iwf1114030.hostname.net:7116/dp-rest-cli-bridge/restws/workspace/outputcatalog

Successful output:

{
"outputcatalog":{
"entries": [
{
"runId": "2018-09-13-1",
"command": "omnicc -check_lic",
"status": "complete"
}
]
}
}

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 41
Data Protector 25.1

1.3.6. clean API

Use this API to clean the workspace.

Contents
1 URL
2 Method
3 Parameters
4 Header
5 JSON body
6 Response codes
7 Example

URL[edit]
https://<hostname>:<port>/dp-rest-cli-bridge/restws/workspace/clean

Method[edit]
POST

Parameters[edit]
None

Header[edit]

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 42
Data Protector 25.1

Name Description

(Required)

Authenticates the request call to the API server and provides secure access to the
resources while protecting your user credentials.
X-Auth-
Token
Type: string

Attribute: <valid_token>

JSON body[edit]
{

Response codes[edit]
Code Status Description

200 SUCCESS Cleans the user work space.

BAD Returns an error message describing the specific problem. This could
400
REQUEST be caused by an invalid URL or header sent in request.

NOT
401 The X-Auth-token used for authentication is incorrect.
AUTHORIZED

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 43
Data Protector 25.1

Code Status Description

INTERNAL
500 SERVER Issues with the website's server.
ERROR

Example[edit]
https://iwf1114030.hostname.net:7116/dp-rest-cli-bridge/restws/workspace/clean

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 44
Data Protector 25.1

1.3.7. abortrun API

Use this API to abort a running CLI session.

Contents
1 URL
2 Method
3 Parameters
4 Header
5 JSON body
6 Response codes
7 Example

URL[edit]
https://<hostname>:<port>/dp-rest-cli-bridge/restws/abortrun/{runId}

Method[edit]
PUT

Parameters[edit]
None

Header[edit]

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 45
Data Protector 25.1

Name Description

(Required)

Authenticates the request call to the API server and provides secure access to the
resources while protecting your user credentials.
X-Auth-
Token
Type: string

Attribute: <valid_token>

JSON body[edit]
{

Response codes[edit]
Code Status Description

200 SUCCESS Returns the list of Cell Manager(s)

BAD Returns an error message describing the specific problem. This could
400
REQUEST be caused by an invalid URL or header sent in request.

NOT
401 The X-Auth-token used for authentication is incorrect.
AUTHORIZED

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 46
Data Protector 25.1

Code Status Description

INTERNAL
500 SERVER Issues with the website's server.
ERROR

Example[edit]
https://iwf1114030.hostname.net:7116/dp-rest-cli-bridge/restws/abortrun/{runId}

Successful output:

{
"status": "success"
}

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 47
Data Protector 25.1

© Copyright 2025 Open Text


For more info, visit https://docs.microfocus.com

This PDF was generated on 03/25/2025 for your convenience. For the latest documentation, always see https://docs.microfocus.com. Page 48

You might also like