Key

Create or update a Key from a raw key file

Changed on

Uploads the key material as a file (PEM, or Base64/DER which is normalized to PEM) instead of embedding it in a JSON body. The same file is written to every environment named in environmentList. With override=true an existing key of that name is updated; otherwise a new key is created.

post/apiops/projects/{projectName}/keys/import-file/

Request

Path parameters

projectNamestring required

Query parameters

keyNamestring required
keyTypestring required

SECRET_KEY | PRIVATE_KEY | PUBLIC_KEY

algorithmstring

AES | DES | DESede | RSA — REQUIRED for SECRET_KEY

environmentListstring

comma seperated environment name values. REQUIRED when a single file is uploaded; when the ZIP produced by export-file is uploaded the environments are read from the package and this field is ignored.

keyDescriptionstring
aliasstring
overrideboolean

If true, the existing key with the same name is updated; if false or omitted, a new one is created.

Request body multipart/form-data

keyFilestring binary required

Raw key file (PEM or Base64/DER)

environmentMappingstring

Optional JSON: environment name in the package -> environment name in this installation (example: {"UAT":"Production"}). An empty value means that environment is deliberately not transferred. Only meaningful when a ZIP is uploaded.

Response

successful operation!

status'SUCCESS' | 'FAILURE'
resultMessagestring
resultListstring[]
resultCountinteger
unresolvedReferencesstring[]

Changes