Ana içeriğe atla

Endpoint

Authentication

Requires a Personal API Access Token.

Request

Headers

Path Parameters

Request Body

The request body should contain a KeystoreCreateDTO object with the following structure:

Request Body Fields

Keystore Environment Object

Notes

  • Request Format: This API uses application/json content type. Unlike the Certificate API, files are not uploaded via multipart/form-data. Instead, keystore file content must be base64-encoded and included in the JSON body.
  • name must be unique within the project
  • Keystore is automatically deployed to all specified environments after creation
  • Keystore file must be provided as base64-encoded content in the file field
  • environmentName is used to identify the environment (not environmentId)
  • keyStoreType must match the actual keystore file format
  • To encode a keystore file to base64, you can use command-line tools like base64 (Linux/Mac) or certutil -encode (Windows), or any base64 encoding library in your programming language

Response

Success Response (200 OK)

Error Response (400 Bad Request)

cURL Example

Example 2: Create Keystore with Multiple Environments

Notes and Warnings

  • Keystore Name:
    • Must be unique within the project
    • Cannot be changed after creation
  • Keystore Type:
    • JKS: Java KeyStore format
    • PKCS12: PKCS#12 format (also known as .p12 or .pfx)
  • Environment Name:
    • Use environmentName (not environmentId) to specify the environment
    • Environment name must exist and be accessible
  • Keystore File:
    • Must be base64-encoded and included in the JSON body (not uploaded as a file)
    • Example: Read your keystore file and encode it to base64: base64 -i keystore.jks (Linux/Mac) or certutil -encode keystore.jks temp.txt && type temp.txt (Windows)
    • File content is encrypted before storage
    • keyStoreType must match the actual file format
    • Note: This API uses JSON body format. If you need to upload a file directly, consider using the Certificate API which supports multipart/form-data
  • Password:
    • Keystore password is required for each environment
    • Password is encrypted before storage
    • Different environments can have different passwords
  • Automatic Deployment:
    • Keystore is automatically deployed to all specified environments after creation
    • Deployment results are returned in the response

Permissions

User must have SECRETS + MANAGE permission in the project. For deployment operations (when deploying keystores to environments), user must also have SECRETS + DEPLOY_UNDEPLOY permission.