REST API v1.0

NOTE: This documentation applies to Password Depot Enterprise Server up to and including version 19.0.4. For version 19.1.0 and later, please refer to the REST API v2.0 documentation.

The current version of Password Depot Enterprise Server implements, in addition to its internal custom TCP‑based communication protocol, a RESTful HTTPS interface for lightweight client access. This implementation follows REST principles and enables the creation of custom web services with Password Depot Enterprise Server serving as the backend.


What is the REST API used for?

In addition to its internal TCP‑based client/server protocol, Password Depot Enterprise Server provides an additional interface for access via HTTP/HTTPS. This implementation adheres to REST principles and makes it possible to access server data and functions using web technologies.

The REST API is used in particular for the following purposes:

  • Connecting the web client / web interface
    In the server settings, an "Origin URL" is configured for the REST server. This URL is exactly the address through which the Enterprise Server can be reached in conjunction with the web client.

  • Custom REST-based applications
    Using the documented endpoints (for example, /login, /list, /read, /modify), custom tools or web interfaces can access server databases, read, modify, or search entries, and thus integrate Password Depot functions into your own applications.

In combination with SSL/TLS for the REST server, communication via the REST API can also be encrypted, analogous to the secured connection used by the web client.


Enabling the REST Web Service

To activate the REST web service:

  1. Open the Server Manager and connect to your running Password Depot Enterprise Server.

  2. Navigate to: Manage → Server Settings → Connections → Supported Clients.

  3. Enable the Web Client option.


Important: SSL Certificate Requirement

Starting from version 18.0.0, a valid SSL certificate is mandatory. Modern browsers will reject SSL connections if the server certificate does not exactly match the domain name or IP address being used.

  • If you are using a certificate issued by a trusted Certification Authority (CA), ensure that the commonName and subjectAltName fields contain the correct domain or IP address of your Password Depot Enterprise Server.

  • Alternatively, you may generate a self-signed certificate via the Create Certificate Wizard in the Server Manager. Specify your server's domain name and IP address, then distribute the generated certificate to users as needed.

By default, the REST service listens on port 8714. To change this, edit the PortREST value in the pdserver.ini configuration file, save the file, and restart the server.


Communication with the REST Service

Base URLs

  • Main API path:
    <HTTPS>://<ADDRESS>:<PORT>/v1.0/
    Example: http://127.0.0.1:8714/v1.0/login?

  • For file resources (e.g., entry icons):
    <HTTPS>://<ADDRESS>:<PORT>/file/
    Example: http://127.0.0.1:8714/file/ico3.png

Supported HTTP Methods

  • GET, POST, PUT, DELETE, PATCH

Response Format

Each request returns a JSON response. On success, the response structure depends on the command. On error, the format is:

{
"code": <HTTP_ERROR_CODE>,
"error": "<DESCRIPTION>"
} 

Common Error Codes

  • 400 – Bad Request (e.g., unknown commands or paths)

  • 401 – Unauthorized (e.g., invalid credentials or expired tokens)

  • 403 – Forbidden (insufficient permissions)

  • 404 – Not Found (resource not found)

  • 459 – TFA Not Activated (QR code URL is returned)

  • 460 – TFA Code Required (additional authentication needed)

  • 501 – Not Implemented (unsupported command)

  • 500 – Internal Server Error


Client Authentication

Endpoint

POST /pdserver/v1.0/login

Request Body

A UTF-8 encoded JSON object with the following attributes:

{ 

"idp": "<IDP>", // Optional - Identity Provider ID (OIDC/Azure)

"id_token": "<TOKEN>", // Optional - OIDC/Azure token

"user": "<USERNAME>", // For standard/Windows authentication

"pass": "<PASSWORD>", // For standard/Windows authentication

"tfacode": "<2FA_CODE>" // Optional 6-digit TFA code

}

Successful Response

{
"access_token": "<ACCESS_TOKEN>",
"client_id": "<CLIENT_ID>"
} 

Use access_token and client_id in the HTTP headers of subsequent requests. Note that the access_token expires after 10 minutes of inactivity.


Two-Factor Authentication (2FA)

If 2FA is enabled but not yet initialized, the server may respond with:

459 - TFA Not Activated

{
"code": "459",
"error": "https://127.0.0.1/v1.0/temp/as123453456.png" 
} 

The error field contains the URL of the generated QR code with the 2FA secret. The user must scan this QR code with an authenticator app and return the resulting 6-digit code as the tfacode attribute.

If 2FA is enabled and the server already has a secret for the user, it may respond with:

460 - TFA Code Required

{
"code": "460",
"error": "Please enter the verification code from your Authenticator app." 
} 

In this case, the client must prompt the user for their 2FA code and resend the login request, including the tfacode attribute.

NOTE: The REST API does not support trusted devices. Users must supply a valid code upon each login.


Logout

To log out the user:

POST /pdserver/v1.0/logout

Include the client_id in the HTTP header.


Listing Available Databases

GET /pdserver/v1.0/list

Sample Response

{

"databases": [

{

"name": "db_1.pswe",

"fingerprint": "UUID",

"date": "2020-12-09T11:12:45.202Z",

"rights": "RMIDCFAPE-Y-HL",

"reasondelete": "1"

},

...

],

"infoclasses": "000007FF",

"policyforce": "1",

"policyminlength": "10",

"policyincludeatleast": "0",

"policymingroups": "3",

"policyselectedgroups": "15"

}


Listing Entries

In Root Folder:

GET /pdserver/v1.0/list?db=<DB_FINGERPRINT>

In Specific Folder:

GET /pdserver/v1.0/list?db=<DB_FINGERPRINT>&folder=<FOLDER_FINGERPRINT>

Sample Response:

{

"name": "New Group",

"parent": "UUID",

"entries":[

{

"name": "Example Entry",

"fingerprint": "UUID",

"rights": "RMID",

"itemclass": "0",

"login": "user1",

"url": "http://example.com",

"date": "2021-07-05T10:39:50.000Z",

"icon": "ico0.png",

"secondeye": "0"

}

],

"infoclasses": "000007FF",

"reasondelete": "1"

}


Searching Entries

GET /pdserver/v1.0/search?db=<DATABASE>&query=<SEARCH_TERM>[&parent=<PARENT_FOLDER>]

Returns results in the same format as folder listing.


Reading Entry Attributes

GET /pdserver/v1.0/read?db=<DB_FINGERPRINT>&entry=<ENTRY_FINGERPRINT>

Returns a JSON object with all fields of the entry, including custom fields and TANs.


Modifying an Entry

POST /pdserver/v1.0/modify?db=<DB_FINGERPRINT>&entry=<ENTRY_FINGERPRINT>

Submit a JSON object with updated attributes as returned by the read endpoint.


Creating an Entry

PUT /pdserver/v1.0/add?db=<DB_FINGERPRINT>&parent=<FOLDER_FINGERPRINT>

If the parent parameter is omitted, the entry is added to the root folder. Fields such as fingerprint and icon are generated by the server.


Deleting Entries

DELETE /pdserver/v1.0/delete?db=<DB_FINGERPRINT>

Request Body:

{

"reason": "<REASON>",

"entries": ["UUID1", "UUID2", ...]

}


Moving Entries

POST /pdserver/v1.0/move?db=<DB_FINGERPRINT>

Request Body:

{

"target": "<FOLDER_UUID>",

"entries": ["UUID1", "UUID2", ...]

}