List Keys
Overview
Retrieves all cryptographic keys for a specified project. Keys are used for encryption, decryption, signing, and verification operations.
Endpoint
GET /apiops/projects/{projectName}/keys/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
Query Parameters
None.
Response
Success Response (200 OK)
{
"success": true,
"resultList": [
{
"name": "my-key",
"description": "Key for API encryption",
"projectId": "project-id",
"keyType": "RSA",
"cryptoKeyInfoEnvironmentList": [
{
"environmentName": "production",
"publicKey": "base64-encoded-public-key",
"privateKey": "base64-encoded-private-key"
}
]
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request was successful |
| resultList | array[object] | List of keys |
Key Object
| Field | Type | Description |
|---|---|---|
| name | string | Key name |
| description | string | Key description |
| projectId | string | Project ID where key belongs |
| keyType | string | Key type (e.g., RSA, EC) |
| cryptoKeyInfoEnvironmentList | array[object] | List of key environments |
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/keys/" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes and Warnings
- Key Content:
- Key material is included in the response
- Handle key data securely
- Multiple Environments:
- Each key can be deployed to multiple environments
- Permissions:
- Requires
ROLE_API_SECURITYpermission - User must have access to the project
- Requires
Related Documentation
- Get Key - Get a specific key
- Create Key - Create a new key