Help Search

List the OpenPGP Keys

You can get a list of all the GPG keys by making a GET request to /gpgkeys.json endpoint.

GET /gpgkeys.json

Request Parameters:

The endpoint takes the following parameters

Param Description Required Type
filter Filters the result based on child params No Array
filter[modified-after] Will only include keys modified after the given date No Unix Timestamp
filter[is-deleted] Will only include keys soft-deleted if true, or non soft-deleted otherwise No Boolean

Examples

Request with filters

So a request which fetch all the OpenPGP Keys

  • That are not soft-deleted
  • That were modified after a given date

Will look like this:

GET /gpgkeys.json?
  &filter[modified-after]=1554681600

And a request which fetch all the OpenPGP Keys

  • That are soft-deleted

Will look like this:

GET /gpgkeys.json?
  &filter[is-deleted]=1

Success response

A successful response will have an array of json objects. Each representing a GPG Key.

{
    "header": {
        "id": "09253c7e-19d8-4638-9860-1c5c7fb13ed9",
        "status": "success",
        "servertime": 1554986192,
        "action": "a8b75aae-cb86-5fda-a8b3-d36ae6155023",
        "message": "The operation was successful.",
        "url": "\/gpgkeys.json",
        "code": 200
    },
    "body": [
        {
            "id": "0239c721-8b7d-59fc-9bff-69e75aff349c",
            "user_id": "af5e1f70-a0ee-5b76-935b-c846f8a6a190",
            "armored_key": "-----BEGIN PGP PUBLIC KEY-----",
            "bits": 2048,
            "uid": "Passbolt dummy \u[email protected]\u003E",
            "key_id": "9B09131B",
            "fingerprint": "3657D402E639639657E314D1EC7BBEFF9B09131B",
            "type": "RSA",
            "expires": "2022-11-29T05:26:48+00:00",
            "key_created": "2018-11-29T05:26:48+00:00",
            "deleted": false,
            "created": "2019-04-04T12:05:49+00:00",
            "modified": "2019-04-04T12:05:49+00:00"
        },
        {
            "id": "04481719-5d9d-5e22-880a-a6b9270601d2",
            "user_id": "f848277c-5398-58f8-a82a-72397af2d450",
            "armored_key": "-----BEGIN PGP PUBLIC KEY-----",
            "bits": 4096,
            "uid": "Ada Lovelace \u[email protected]\u003E",
            "key_id": "5D9B054F",
            "fingerprint": "03F60E958F4CB29723ACDF761353B5B15D9B054F",
            "type": "RSA",
            "expires": "2019-08-09T12:48:31+00:00",
            "key_created": "2015-08-09T12:48:31+00:00",
            "deleted": false,
            "created": "2019-04-04T12:05:49+00:00",
            "modified": "2019-04-04T12:05:49+00:00"
        },
    ]
}

Last updated

This article was last updated on April 23rd, 2019.

For another perspective on the API you browse the OpenAPI 2.0 specifications using the dedicated API reference site (Swagger UI).

API Reference

You can also find the latest OpenAPI 2.0 specifications directly on the dedicated repository.

OpenAPI Specs repository
🍪   Do you accept cookies for statistical purposes? (Read more) Accept No thanks!