API
SSH Keys
Create SSH key

Create a SSH Key

  • Name
    post
    Type
    /v1/ssh_keys
    Description

    Send a POST request to create a ssh key.

Request

Attributes

Required

  • Name
    name
    Type
    string
    Description

    The SSH key name given by the user at its creation.

  • Name
    public_key
    Type
    string
    Description

    This attribute contains the entire public key string that was uploaded, which is embedded into the root user's authorized_keys file if the user choose to include it during the Stacklet creation.

Optional

  • Name
    project_uuid
    Type
    string
    Description

    The project universal unique identifier where the load balancer will be placed. If the user didn't provide the UUID, the system will replace the load balancer in the user default project.

Example

curl -X POST "https://api.simplystack.com/v1/ssh_keys" \
  -H "Content-Type: application/json" \
  -H "Authorization: Token d359ad9cc9422b5ff07aede0cd2707da4ff82be0" \
  -d '{"name": "deploy01", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOpACbFjNiBrDdQZ1mBygO2FNLE3Z07+vHTQG9ojGwBU6ZY6qX5/oVo0O4hesh6++GKh03opunNnLzKYSz/y/KuIdjEqtBRcfsAHILNRCaL5vuvFLJTKie+srDA2T3E1J0YenTogkimJfgsfq9es5m+B3ibNYoLT/9DqHcSG6D8JiHJuorddx9slcXwDiks67AwZACisxz6nYD+HJzozR6N7k9mmXU2FxRVhjbvZTaotYqhN83Ufi4BfMA9jS7MdcaxVRa7HlBVOVttkvGjd/JYh5SXMrEFY01KDNTC49ufj4eol+r5ERbXZgqcDTetZ61bXofsKL/eU69u5ikAVjP"}'
 

Response

JSON object with a key named ssh_key which is an array of the following attributes:

Attributes

See SSH key model.

Example

json
{
  "ssh_key": {
    "id": 1,
    "name": "deploy01",
    "fingerprint": "3c:3c:97:63:c9:a9:12:f4:91:6a:6f:3d:86:e4:c1:a8",
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOpACbFjNiBrDdQZ1mBygO2FNLE3Z07+vHTQG9ojGwBU6ZY6qX5/oVo0O4hesh6++GKh03opunNnLzKYSz/y/KuIdjEqtBRcfsAHILNRCaL5vuvFLJTKie+srDA2T3E1J0YenTogkimJfgsfq9es5m+B3ibNYoLT/9DqHcSG6D8JiHJuorddx9slcXwDiks67AwZACisxz6nYD+HJzozR6N7k9mmXU2FxRVhjbvZTaotYqhN83Ufi4BfMA9jS7MdcaxVRa7HlBVOVttkvGjd/JYh5SXMrEFY01KDNTC49ufj4eol+r5ERbXZgqcDTetZ61bXofsKL/eU69u5ikAVjP",
    "created_at": "2018-02-01T12:14:47.134880Z"
  }
}