Downloading Keys Created on AWS to CCKM
Use the get /v1/cckm/aws/keys/{id}/download-public-key
API to download a public key in PEM format, for an asymmetric key.
Syntax
curl -k '<IP>/api/v1/cckm/aws/keys/{id}/download-public-key'-H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id}
represents the key ID.
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/aws/keys/baf58871-2503-4d13-a84a-339aeb8fdfaf/download-public-key' -H 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI3NDQ4NzU1OS0yZjE1LTQwYWQtOThiNC1lODhiZTZiZjVmY2QiLCJzdWIiOiJsb2NhbHwxNjExOWRhNy1iOGZlLTQyYjAtYjIyNC0zODUzNzEwMWZkNDIiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJjbGllbnRfaWQiOiI4MzdjODQwZC03NWRkLTRiNGYtYTMxOC03OWNiMTZjYTI0OGQiLCJjbGllbnRfbmFtZSI6ImFwaS1wbGF5Z3JvdW5kIiwiY2xpZW50X3R5cGUiOiJwdWJsaWMiLCJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODM3Yzg0MGQtNzVkZC00YjRmLWEzMTgtNzljYjE2Y2EyNDhkIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6Ijc3OGNkYjc2LWMzZjItNDNhMi05NzQ5LThkMzBjNjdkNjk3ZSIsImlhdCI6MTcxMTM5MTU4OSwiZXhwIjoxNzExMzkxODg5fQ.D0tMllpJoIkrto3vdKJNzUCpnzoqUArO_Lolqq-A7e8HCwfQUNDh4mY1AVJv4BxT4-pnsw41XqgaemBXgpHE5g' -H 'accept: application/json' --compressed
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.