Ana içeriğe geç

List Keys

Endpoint

GET /apiops/projects/{projectName}/keys/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject 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": [
{
"environmentId": "env-id-123",
"content": "encrypted-key-content",
"alias": "my-key-alias"
}
]
}
]
}

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful
resultListarray[object]List of keys

Key Object

FieldTypeDescription
namestringKey name
descriptionstringKey description
projectIdstringProject ID where key belongs
keyTypestringKey type: SECRET_KEY, PRIVATE_KEY, or PUBLIC_KEY
cryptoKeyInfoEnvironmentListarray[object]List of key environments

Key Environment Object

FieldTypeDescription
environmentIdstringEnvironment ID (internal identifier)
contentstringEncrypted key content (base64-encoded)
aliasstringKey alias (optional identifier)

Note: Response contains environmentId (not environmentName). To get environment names, use the Get Key endpoint or refer to environment management APIs.

cURL Example

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/keys/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Key Content:

    • Key content is encrypted and included in the response
    • Handle key data securely
    • Content is base64-encoded and encrypted
  • Multiple Environments:

    • Each key can be deployed to multiple environments
    • Each environment has separate key configuration
  • Environment ID:

    • Response contains environmentId (internal identifier)
    • To get environment names, use the Get Key endpoint

Permissions

User must have any permission in the project (read access).