Export GnuPG secret key

This function exports a GnuPG (GPG) secret key.

SecurityBasicAuth
Request
query Parameters
key_id
required
string

The ID of the GPG secret key that you wish to retrieve.

Example: key_id=48BEA5A16FCA746E
passphrase
string

The passphrase of the GPG secret key that you wish to retrieve.

Example: passphrase=whatever
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/GPG/export_secret_key
Request samples
uapi --output=jsonpretty \
  --user=username \
  GPG \
  export_secret_key \
  key_id='48BEA5A16FCA746E'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "export_secret_key",
  • "module": "GPG",
  • "result": {
    • "data": {
      • "key_data": "-----BEGIN PGP PRIVATE KEY BLOCK-----\nVersion: GnuPG v2.0.22 (GNU/Linux)\n\nlQNTBFzwFyMRCADgNf7GHvCgb2/HWBYVAzu408eXEO4ucWGfbD5c5BOHg7WBVOkh\nj+J0HYaeh9FwOXLJAzesiGtTU/HQ5wNkBbKRYR2oNEUbiefBgQhjllIGJNnFCQbD\nTcyxXjKUF4aQBw6InqzM9akVChLvGoCfom/y1fcwrQ5OQ46EEjhe9lSnj1E2DIi+\n0PvOsWeehChtn28WkmXPcl+XovfsCl5vh2RnJQeJwkSwBogA1GObj9fnPBbrIUt2\nF5JDaJ7/R8aDwV1Pg2mBmRqTBIKvx6gxEQgCL52OWCKVJfqy5oVGDl/2u0BGCaRt\n3Tnh9B14Lk8frBaOjYMtMq1Rl3rPDc3KCRnLAQC6dMNJCxIoyfeEFqj0HgwHETYn\nQNGwUaRrOGKLJbMnewf/Yq0S2R6YvMl8pDQeSExYJaqv/u2Hch6GM0f3CSvMnPSg\noB2c/h4MmhmiAbymSO5GBaM4Nx3NTNYU0JpghkTTJpucFZ8hK/aJ8PDQzBnS0zTY\nF8ZqSMFL84QB1NTd1nlJnilpKCkBC6NHUh76IyLQEsH7jgOG9L28qnLxm8bGHwaJ\nmhEH2Y859WzN9hUTZEMxdklI8uwdI+msI7md0uN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Qg5TMvICEhKp1NYtkcvCLG1K74c/psucm+Rpmc/sTilk4sAAwUH\n/2DmCrxyFsOP77Gy1DzJow3TH7J09IWg5S3qwkh4WPmS82EHc/+4QuELf+RL2hnl\n5MAD869E+D71TkFFAIrJLwzUnGEMUuSscqxwKqCpBeBAyfTMig6hDenRfSAzsbgN\nYNHDl+0xz5txo0YdwYzmh5zeY1ysE/OQrO4Y+7tavQpufUVMycESssaPXkd6STEf\nvBNFVvKEXv+zv0L4eeEoQ+zZH4FISFnK4kfTI6BqdIJ6Qjh+di633XMwiMwKFAuE\nNyZvNLAnmQKn+AjR2dE8asbsBvmZH2wgVYjOE1VwxLnwOCBDTJhLtmzVgy5Ea6zZ\nnvkuBxHjUbkoPBDqRVLsDyMAAVIC+56gmf2bW2mDuoFFUW6KT6jorvvbmXSZHi1L\nAGhQj/Q83gRejq2g+DYiFlCIZwQYEQgADwUCXPAXIwIbDAUJAeEzgAAKCRBIvqWh\nb8p0btGLAPsFHEqEg/qrEpjFu/9B8KvBWBgqIJm9XtDgaVaaHjzR4AD/XcrEvMuc\nPVYssXICwKbDwxWEYqhpI6ms0IOob0PH8hE=\n=W2NA\n-----END PGP PRIVATE KEY BLOCK-----"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}