Get Started with PGP Key API
Everything you need to know to get started with the PGP Key API.
Get a Visier account
To use the APIs, you must have a Visier account with a profile that has the API capability. If you don't have an account, contact your administrator. They will create an account for you with permissions that allow you to view data.
Generate your API key and security token
To make an API request, you will need an API key and a security token. For more information about how to get an API key and request a security token, see API Authentication.
Note: If using Postman to send requests, you can request a security token directly in the tool, see Use Postman to Call Visier APIs.
Choose your tool
To use Visier APIs, you need to choose a tool to make your first request. This can be Postman or whichever method you usually use to make HTTP requests. For more information about using Postman for your first request, see Use Postman to Call Visier APIs.
Make your first request
To test that you have everything set up correctly, we'll create a request to retrieve all the PGP public keys in your Visier tenant using the /v1/api/pgpkey endpoint. For a complete list of available endpoints, see "PGP Key" in API Reference.
Replace {vanity_name} with your tenant name. The API key is expected as a header, while the security token is expected as a cookie.
Tip:
To find your vanity name:
- In Visier, in the global workspace, click Settings > Single Sign-On.
- Under Single Sign-On, find your service provider endpoint; for example, https://jupiter.visier.com/VServer/auth. In this example, jupiter is the vanity name.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/api/pgpkey' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
If everything was set up correctly and the request was successful, you should see a similar response if your tenant has no keys:
If everything was set up correctly and the request was successful, you should see a similar response if your tenant has keys:
{
"keys": [
{
"keyID": "9c84ec719fb0c0a9",
"dateGenerated": "1728595073157",
"expiryDate": "1797033600000",
"recipient": "WFF_j1r_1728595073157",
"publicKey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v@RELEASE_NAME@\n\De6TTBDOOpT6Cbsa...\n-----END PGP PUBLIC KEY BLOCK-----\n"
},
{
"keyID": "0d95fd820gc1d1b0",
"dateGenerated": "1729796973157",
"expiryDate": "1728033600000",
"recipient": "WFF_j1r_2839606184268",
"publicKey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v@RELEASE_NAME@\n\mQGNBGcITUYBDADz...\n-----END PGP PUBLIC KEY BLOCK-----\n"
}
]
}
Next steps
Now that you've successfully authenticated and completed your first API request, you can call more Visier APIs!
To learn more:
- Explore the PGP Key API Code Samples.
- Review the PGP Key API Reference.