UDMG Server Web Services


Introduction

The UDMG Server REST API is provided by the udmg-server daemon and provides all the operations that can be performed with the UDMG Client or with the UDMG Admin UI.

Authentication

Only Local User Account authentication is supported for the REST API.

SSO and LDAP authentication is only used for the Graphical User Interface.


The authentication of REST requests is done using basic HTTP authentication.

This authentication scheme is done using the HTTP Authorization header. To authenticate, the client must:

Step 1

Obtain user login and password.

Step 2

Build the user ID by concatenating the login, a colon (“:”) character and the password.

Step 3

Encode the obtained identifier in Base64.

Step 4

Prefix the encoded identifier with a declaration of the basic authentication scheme (“Basic”).

For example, if the user enters the name "Aladdin" and the password "open sesame", then the client must send the following header:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

If the authentication of a request fails, the server will respond with an HTTP code .401 - Unauthorized

By default, the UDMG Server has only one "admin" user (password: "admin_password") with all rights, in order to allow the initial configuration of the gateway to be set up. For security reasons, it is strongly recommended when installing the gateway to create new users with more restricted rights, then to delete this "admin" user.

Common Operations

Refer to the original version of the waarp-gatewayd v0.7.5 server documentation for the common operations:

  • Service Status
  • User Management
  • Transfer Management
  • History Management
  • Local Servers Management
  • Remote Partners Management
  • Rules Management
  • Configuration Override


Note

UDMG Server is customized, and the actual API request and response syntax may differ significantly from the original version. Please consult your Stonebranch contact or the Stonebranch Customer Portal for support.


UDMG Specific Operations

In addition to what is supported by the original version of the waarp-gatewayd server, the following commands have been added for UDMG:

PGP Key Management

PGP key records can be stored in the UDMG database and retrieved with the CLI or the REST API. The PGP key records can be used by scripts or by Universal Controller tasks without having to be stored in a local keyring.

Both private and public PGP keys can be stored in the database with AES encryption.

Add Key


Description

URI

http://host_name:port/api/sb_pgp

HTTP Method

POST

Description

Adds a new PGP key

Example URI

http://localhost:18080/api/sb_pgp

Authentication

HTTP Basic

Consume Content-Type application/json

Response Header

Location – The path to the newly created key

Example

See Add Key: JSON Example.

Properties

See Add Key: JSON Properties.

Add Key: JSON Example 

To create a public PGP key, the syntax is as follows:

Example JSON
Example Request
 JSON
{
  "name": "test1",
  "owner_type": "users",
  "pgp_name": "test1",
  "pgp_email": "test1@example.com",
  "pgp_algorithm": "4096R",
  "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v2.0.22 (GNU/Linux)\n\nmQINBGKYo7EBEACuZBUPLMW0SZA6jrqP5S7RPObj3xInlYR4IsPJZVfmMhJddVIQ\nMDZYfnq5QaRU2qr6qnQo1OXZOMnde8PgjSE7U1g1hWFiMyfwwdsUpPWAJc2xAVTy\ncNbubVJFKoT5xzV5bMlaFOpeeqcNXsJJlpAXCA5MNXIJgvmG6qj2RtWZwhgQGplz\nIE11kt5aODlz5zFQ0TCNFrqq8oSy5OQTD+55HR/fCqvqfz4bphpvpqJgm8gTtDtT\nHLUyoKoQAsYKfMLxG23KxPEp7qwxLQtcpa76GeO1ndwi3iN3CcTATxZ/ezOxmBXT\n68EJAQ729Mh8DWQqK2LsoK27eeV6tfbvrD+ephbm9mMvvH9510stYAGlSMyLxaUj\n+lTGFzdkqKtbbVVj0N4Be3IYkHsZ7I1VBaJAUTmg0VI/giqN3G0ChWunX2GrDlwF\nw1FvRpUh9tNxy772kmpN0QHg7PIa1d4a7MHejv8AdVpho3u5Wqs9z87+jmYgzVUM\nFm3fU72cCFHdUrYRjybf+8yo4dMId1l/iM5fg7i+RuUlKIJK5dp9cSgovvFm399J\n6Gats+Mu7Sxg/OfJ+AnfioRVfgjZVner8RW2ipsq+Cqs/HreIs4TH6fIQfOMwynN\nSPUW4sJL9B6u0y03mgm68F3YN3L4jpsV9PC+eZ+inplcyOqZ1Jm25zcY8QARAQAB\ntCl0ZXN0MSAodGVzdDEgUEdQIGtleSkgPHRlc3QxQGV4YW1wbGUuY29tPokCOQQT\nAQIAIwUCYpijsQIbAwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEDPAvtC/\nQu1kgZoP/Rb/XFE9EojFDC/qf8zRtTiTB70Jf8rzJJ1wNLVhomYhm1iHDvd3S1cl\nStJvAkoKcUI3XXW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di4HU2h\nO8Ki6co/GHZlOYESbbY1ChhtMQZDQHizc59lYFEOXt0HCKJsqJNYPybrvTgHY7n0\n2YZ5AVANtgyLmZczXb/cX9Tr3A8bNcvAxb4r93uJezd9iwXydQlNlW82+MZJlIE0\nGYJtJ3DESmsp77vVr0r37a2PnTubBdM+WIggP8kGoWXUYLfWb7hFFrYhvDcptPVC\nxYI3lBH8SwFSUXziGTi1ntzxo4PRYBTbjeaTTPS3+2WEmQARAQABiQIfBBgBAgAJ\nBQJimKOxAhsMAAoJEDPAvtC/Qu1kFMwP/jpKHV282dlGjyKanfUqVYsXJuPbsWpn\no5w+0PMdj9KmxEAzhw6fEUs5eqIXX/+IQe2XehGVipaZZLcL70CmPhLRp2KfIQ7r\nEPRSQa2vfsRHk7MCcgcGIB/q0vRo8sGUkYJnBaPdxZZTLz7wHq45rSFg4F5ELWwE\nbWoSWHMzqJgDqfFHBUUdcH9s9CQEJgPoaQ63O3FYGdga4HBUc74ZNKTsvgobzgIY\n6NXSZK/JdG5O1jo76IqYGxyn6/Rk7UnFZZdAgAadiC73fgB6R7OXlX17hEKtfLy3\n/H2lLUkfjeaCLUYK+lQLi1+Qoovt38QvD47AaU2AZXMFJ3VJBkhfvf48Cu9JkVlL\nE5ny6qSiH/ve44uDeQbPHwbrmBZnqfH4FBu8FWsYgebe1u5BoxnlrdaQPpgJmqYz\naI7FFlwez/eKwPvFb5qyi9UCB3NcY8/ih2Pkfiq588EVXLbzW2STj3T+esHnwDm7\nAO7Xkz0pO5ly7uZFHz179uA1lXCLK5PFLn2ATU3haJBeOVWseQ9W7gMSXdVzvRco\npDMqfRPoLCO02cinCFGfQJNcfhIdqwahefjScM9rfZQiQTN8HqvhQIGSCroNe1cV\ntEbNp5hU2lxQmmGZfbFWNFattz18RsP9MMGXwnOkTC2R6aWaJxwoxEV5lHdV7OJF\n7VMDO1XPOgqd\n=hElb\n-----END PGP PUBLIC KEY BLOCK-----\n",
  "comment": "first test"
}
Example Response
 Headers
Location: /api/sb_pgp/test1

Add Key: Properties

Property

UI Field Name

Description

name Name The name of the key; must be unique.
pgp-name PGP Name The key username.
pgp-email Email The associated email.
pgp-algo PGP Algorithm The algorithm that was used for creating the key (free text, for reference).
valid-from Start Date The valid from date.
valid-to End Date The expiration date.
private-key Private Key The private key. It must be in ascii armored format.
public-key Public Key The public key. It must be in ascii armored format.
passphrase Passphrase The passphrase of the private key.
comment Comment An additional comment to describe the PGP key.

List Keys


Description

URI

http://host_name:port/api/sb_pgp

HTTP Method

GET

Description

Displays a list of all keys matching with the criteria below. The private key value is not returned.

Example URI

http://localhost:18080/api/sb_pgp

Authentication

HTTP Basic

Produce Content-Type application/json

Example

See List Keys: JSON Example.

URI Parameters

See List Keys: URI Parameters.

List Keys: JSON Example 

Example JSON
Example Response
 JSON
{
    "pgp": [
        {
            "name": "test1.key",
            "owner_type": "users",
            "pgp_name": "test1.key",
            "pgp_email": "test1@example.com",
            "pgp_algorithm": "rsa2048",
            "comment": "first test"
        },
        {
            "name": "test1.pub",
            "owner_type": "users",
            "pgp_name": "test1",
            "pgp_email": "test1@example.com",
            "pgp_algorithm": "rsa2048",
            "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQENBGKd5IMBCACz6jW8UpCGd5mVhqFVwNklZem7OAaOCG3LoIZK/EsI3b+ex0n4\nbQmXmKjZeCydqtVbeJl6INip9vlj0Tiz1k+eNqRsPbo5RtQk/ObPQz0uwmmK0Xuo\nAmG6ECsv+g1jG6B6Sz2Gq3HuUO7DA77ltVWqx7uQycMDGrJlgR9Gyplnc9Nuir+G\nsx1BYgcr5wpGOk/YdH94sGtIaYYhV7JMhVHhLFonhzEIwCpOx26ISd8XGoiAdW7V\n2X3DsmOuZJVBK8v2MGDu1TIa5/W/wF77RCZmYxULv7Xt8b/o91vz2a6dJcB1LDO6\nYNoqZAev4ynXxX6tC/tVrV1RoqmsFvQvCG8RABEBAAG0GXRlc3QxIDx0ZXN0MUBl\neGFtcGxlLmNvbT6JAVQEE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D0i4TiUnbPlW2s\noJAMZbc9WcQmr4X+kUgnG8C6LJw3x3kpU2AOGfQmF9uIM0bgIc0FclxtCc8OTq6A\nSReh9/IGRgoXDY9TKoU1h6fzAdH+xQv0WCmr0vyrI0akB0WFaPkLw6Xn5YBrqgPa\nyiaWoy3mBR5JDkBZXs72Eg3eibSuwVbCzNI4p73BpivL\n=rp6q\n-----END PGP PUBLIC KEY BLOCK-----",
            "comment": "first test"
        }
    ]
}

List Keys: URI Parameters

URI Parameter

Description

Specifications Required
limit The maximum number of keys allowed in the response. Set to 20 by default. String; URI parameter N
offset Index of the first returned entry. Set to 0 by default. String; URI parameter N
sort

The setting and order in which keys will be displayed.

String; URI parameter

Valid values:

  • ascending by key name: name+ 

  • Descending by key name: name- 

N

Get a Key


Description

URI

http://host_name:port/api/sb_pgp/key_name

HTTP Method

GET

Description

Retrieves a PGP key details

Example URI

http://localhost:18080/api/sb_pgp/test1.pub

Authentication

HTTP Basic

Produce Content-Type application/json

Example

See Get a Key: JSON Example.

Get a Key: JSON Example 

Example JSON
Example Response for a private key
 JSON
{
    "name": "test1.key",
    "owner_type": "users",
    "pgp_name": "test1.key",
    "pgp_email": "test1@example.com",
    "pgp_algorithm": "rsa2048",
    "private_key": "-----BEGIN PGP PRIVATE KEY BLOCK-----\n\nlQPGBGKd5IMBCACz6jW8UpCGd5mVhqFVwNklZem7OAaOCG3LoIZK/EsI3b+ex0n4\nbQmXmKjZeCydqtVbeJl6INip9vlj0Tiz1k+eNqRsPbo5RtQk/ObPQz0uwmmK0Xuo\nAmG6ECsv+g1jG6B6Sz2Gq3HuUO7DA77ltVWqx7uQycMDGrJlgR9Gyplnc9Nuir+G\nsx1BYgcr5wpGOk/YdH94sGtIaYYhV7JMhVHhLFonhzEIwCpOx26ISd8XGoiAdW7V\n2X3DsmOuZJVBK8v2MGDu1TIa5/W/wF77RCZmYxULv7Xt8b/o91vz2a6dJcB1LDO6\nYNoqZAev4ynXxX6tC/tVrV1RoqmsFvQvCG8R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VsLM0jinvcGmK8s=\n=7m6a\n-----END PGP PRIVATE KEY BLOCK-----",
    "passphrase": "hello",
    "comment": "first test"
}
Example Response for a public key
 JSON
{
    "name": "test1.pub",
    "owner_type": "users",
    "pgp_name": "test1",
    "pgp_email": "test1@example.com",
    "pgp_algorithm": "rsa2048",
    "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQENBGKd5IMBCACz6jW8UpCGd5mVhqFVwNklZem7OAaOCG3LoIZK/EsI3b+ex0n4\nbQmXmKjZeCydqtVbeJl6INip9vlj0Tiz1k+eNqRsPbo5RtQk/ObPQz0uwmmK0Xuo\nAmG6ECsv+g1jG6B6Sz2Gq3HuUO7DA77ltVWqx7uQycMDGrJlgR9Gyplnc9Nuir+G\nsx1BYgcr5wpGOk/YdH94sGtIaYYhV7JMhVHhLFonhzEIwCpOx26ISd8XGoiAdW7V\n2X3DsmOuZJVBK8v2MGDu1TIa5/W/wF77RCZmYxULv7Xt8b/o91vz2a6dJcB1LDO6\nYNoqZAev4ynXxX6tC/tVrV1RoqmsFvQvCG8RABEBAAG0GXRlc3QxIDx0ZXN0MUBl\neGFtcGxlLmNvbT6JAVQEEwEIAD4WIQTZR01OCmqYzlvbtAulzqxSXGHdlAUCYp3k\ngwIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRClzqxSXGHdlFNA\nB/0cNN5/ZfEdU31OBc806WR0/Z6tYCYot0a0XBGL3v8gVCgf9PAibVg3WxDH0YwB\nTy0pphu1YThZcBG//WZjWC2006nZUVgCBwb/phVozs1k5N8bHyO6jwywPz2nctX7\n5f2gTksNfJKbIm+3mt6SxmDC4cfmVzXDfEkr/d/6AZ/VX4gm5mApPyxiPW5U8M1Y\nDXwspo4h3cn1r37w8SZB0GBMQXVk1rCaIqXnw+kDNgjXFDsxJKQL/uEqPK12UP3P\nZPhz0pKKq8f8r0H9ctmee0J25lG/gPDt+Om8tGvbcIhrXHEE44dIMsE5tdcSM7zn\nCnpDA44AOzr9wxI8MA0IkicZuQENBGKd5IMBCAC5ToCtudbiZblXfgHhLS4bpG/M\nnClOalq4Zo5+vWJnXkavNUdvUz0v+2nChSCVg7XpQLelov4EyEbPFsZsCvisRSmW\nn2ECWKmIssT72/N1ml2elYopU9CFnSrpy8/49G5GvBjKlHS/OFtZNM8rbvPal5PQ\nUO5dZsFeZjGxFt99zFlt1BM5tWwd9cbD4FMSo2Dw6isE5ICqKVsnWnobr4USTuuT\n8Zi2O+Ze7leGSlM/dGdVwM39o4b8vO7nDly98ztRhfobjOQIG/n1pIvQmTAspgGL\nYkDnosF4gF5oa0LIG43FaK1OxCVHoGhnHvsPV4N0rcAHW0C+cblRO0+SjrqlABEB\nAAGJATwEGAEIACYWIQTZR01OCmqYzlvbtAulzqxSXGHdlAUCYp3kgwIbDAUJA8Jn\nAAAKCRClzqxSXGHdlGw7B/0XULMy9mDzQi9PN2i+QzQxKjAofSUJHYcl9tpsG+8D\nmQV2sNdGwrdTynKqGBIMcjY+ryY6Jjigqjwa2eg5d3AjGHCDdxJdBABJjyfHQxwE\nFqmAyipEW5z9HpKZS+mPva+6sINBXSvSoHgOkM1vwAIHRJc0tSD0i4TiUnbPlW2s\noJAMZbc9WcQmr4X+kUgnG8C6LJw3x3kpU2AOGfQmF9uIM0bgIc0FclxtCc8OTq6A\nSReh9/IGRgoXDY9TKoU1h6fzAdH+xQv0WCmr0vyrI0akB0WFaPkLw6Xn5YBrqgPa\nyiaWoy3mBR5JDkBZXs72Eg3eibSuwVbCzNI4p73BpivL\n=rp6q\n-----END PGP PUBLIC KEY BLOCK-----",
    "comment": "first test"
}

Delete a Key


Description

URI

http://host_name:port/api/sb_pgp/key_name

HTTP Method

DELETE

Description

Deletes the given key.

Example URI

http://localhost:18080/api/sb_pgp/test1.pub

Authentication

HTTP Basic


Audit Management

Audit records are automatically stored in the UDMG database after updates are made pertaining to a configuration item: user, server, partner, rule, and accounts.

List Audit Records

GET /api/sb_audit
         
  • Displays a list of all audit records meeting the criteria below.

Long Option

Description

limit= The maximum number of records allowed in the response. Set to 20 by default.
offset= Index of the first returned entry. Set to 0 by default.
sort=[id+|id-]

The setting and order in which records will be displayed. The possible choices are:

  • by record id (id+&id-)

Example

GET /api/sb_pgp?sort=id-&limit=2
{
    "audit": [
        {
            "id": 642,
            "action": "STOP",
            "table_name": "local_agents",
            "table_key": 49,
            "before": "{\"ID\":49,\"Owner\":\"mft-gw-0\",\"Name\":\"sftp_server_35281\",\"Address\":\"0.0.0.0:4003\",\"Protocol\":\"sftp\",\"Enabled\":{\"T\":true},\"RootDir\":\"rootdir_sftp\",\"ReceiveDir\":\"in\",\"SendDir\":\"out\",\"TmpReceiveDir\":\"tmp\",\"ProtoConfig\":{\"commands\":{}}}",
            "after": "",
            "status": "SUCCESS",
            "info": "",
            "user": 0,
            "date": "2024-01-16T11:13:13.7915008Z",
            "parent_id": ""
        },
        {
            "id": 641,
            "action": "CREATE",
            "table_name": "remote_accounts",
            "table_key": 28,
            "before": "",
            "after": "{\"ID\":0,\"RemoteAgentID\":42,\"Login\":\"user_35281\",\"Password\":\"password\"}",
            "status": "SUCCESS",
            "info": "",
            "user": 0,
            "date": "2024-01-16T11:12:58.8763191Z",
            "parent_id": ""
        }
    ]
}

Get an Audit Record

GET /api/sb_audit/<id>
         
  • Retrieves an audit records detail. 

Example

GET /api/sb_audit/1969
{
    "id": 1969,
    "action": "START",
    "table_name": "local_agents",
    "table_key": 86,
    "before": "{\"ID\":86,\"Owner\":\"mft-gw-0\",\"Name\":\"clibs_serv_ftp_server\",\"Address\":\"0.0.0.0:4060\",\"Protocol\":\"ftp\",\"Enabled\":true,\"RootDir\":\"clibs_ftp_dir\",\"ReceiveDir\":\"in\",\"SendDir\":\"out\",\"TmpReceiveDir\":\"tmp\",\"ProtoConfig\":{}}",
    "after": "",
    "status": "SUCCESS",
    "info": "",
    "user": 1,
    "date": "2023-05-02T14:56:55.70779Z",
    "parent_id": ""
}