Keypairs API


Create a keypair

POST /keypairs

Parameters

public_key
required: false
scope: keypair
The public key of the keypair
name
required: false
scope: keypair
The name of the keypair

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "keypair": {
              "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
              "name": "id_rsa"
            }
          }
            
          

Response

          Status: 201 Created
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypair": {
              "id": 25,
              "application": null,
              "created_at": "2018-05-29T10:58:35+00:00",
              "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
              "name": "id_rsa",
              "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
              "updated_at": "2018-05-29T10:58:35+00:00",
              "user": "https://api.engineyard.com/users/21eecd7f-a226-45e5-bbe5-2766b15eb34c"
            }
          }
            
          








Create a keypair for a specific user

POST /users/:user/keypairs

Parameters

public_key
required: false
scope: keypair
The public key of the keypair
name
required: false
scope: keypair
The name of the keypair

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "keypair": {
              "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
              "name": "id_rsa"
            }
          }
            
          

Response

          Status: 201 Created
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypair": {
              "id": 26,
              "application": null,
              "created_at": "2018-05-29T10:58:37+00:00",
              "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
              "name": "id_rsa",
              "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
              "updated_at": "2018-05-29T10:58:37+00:00",
              "user": "https://api.engineyard.com/users/0f7b0662-9172-421a-96b2-176c734f6cf4"
            }
          }
            
          








Delete a user's keypair

DELETE /keypairs/:keypair_id

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 204 No Content
          Content-Type: 
          
            
          {
          }
            
          








List an environment's keypairs

GET /environments/:environment_id/keypairs

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 29,
                "application": null,
                "created_at": "2018-05-29T10:58:47+00:00",
                "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
                "name": "82a080310dee2ec41ddc",
                "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
                "updated_at": "2018-05-29T10:58:47+00:00",
                "user": "https://api.engineyard.com/users/0eb78e17-e699-4571-bab5-3b9298bca3f3"
              }
            ]
          }
            
          








Show a user's keypairs

GET /users/:user/keypairs

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 28,
                "application": null,
                "created_at": "2018-05-29T10:58:42+00:00",
                "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
                "name": "id_rsa",
                "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
                "updated_at": "2018-05-29T10:58:42+00:00",
                "user": "https://api.engineyard.com/users/5bbdda0e-b0c8-4a75-9cdf-cc472efd6250"
              }
            ]
          }
            
          








Show all keypairs

GET /keypairs

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 27,
                "application": null,
                "created_at": "2018-05-29T10:58:40+00:00",
                "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
                "name": "id_rsa",
                "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
                "updated_at": "2018-05-29T10:58:40+00:00",
                "user": "https://api.engineyard.com/users/f929405e-3330-4ec7-9b58-bf30661a4669"
              }
            ]
          }
            
          








Show an application's keypairs

GET /applications/:application/keypairs

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 24,
                "application": "https://api.engineyard.com/applications/24",
                "created_at": "2018-05-29T10:58:33+00:00",
                "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
                "name": null,
                "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwP3xABDWtk9+5k2LKV/pm6igfLd+NyM+vbnJpy5+PmCv1FGwL99I5EmNsOlbmooUFxtbn8cg595yy+kvB0ENLAYqBp3vaC/M/Vj4KTGd0xm/RIq0mAp5Jw8ZW+AmXxMOOoAxocaJ6m/kquF5W1kVUfq2IfMmCZEc86Bb/Wy9z6ntA4KKP0HTenzkTSVVRnuwR+DMSac9c3LMoUgULLCJ4+orFSifmin8wbO/cwOoo8T/UDWVeLPkPR+h9c5ne9cq0Lpx0MneqctU8tr/UwBGTStUVesC+h6A+iDZVHcIB5zlpc93KFXqEQSbauXnQE/mpZaJLCMJmV2NR2sv1VCeww==",
                "updated_at": "2018-05-29T10:58:33+00:00",
                "user": null
              }
            ]
          }