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-04-12T18:03:09+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-04-12T18:03:09+00:00",
              "user": "https://api.engineyard.com/users/ab19074a-3459-416c-9316-9a0cf5b905cc"
            }
          }
            
          








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-04-12T18:03:12+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-04-12T18:03:12+00:00",
              "user": "https://api.engineyard.com/users/14b31599-0926-4652-8a4b-88b7d2c7206c"
            }
          }
            
          








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-04-12T18:03:21+00:00",
                "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
                "name": "6e7a411cd2567f9adb99",
                "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-04-12T18:03:21+00:00",
                "user": "https://api.engineyard.com/users/d0cd9a40-6dc7-44f1-986c-80de40d650bc"
              }
            ]
          }
            
          








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-04-12T18:03:16+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-04-12T18:03:16+00:00",
                "user": "https://api.engineyard.com/users/bc1e0fac-584a-4654-9fc5-29de8fa0fbab"
              }
            ]
          }
            
          








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-04-12T18:03:14+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-04-12T18:03:14+00:00",
                "user": "https://api.engineyard.com/users/a4ed5a97-60df-43e8-8f20-2e217b85b10c"
              }
            ]
          }
            
          








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-04-12T18:03:07+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-04-12T18:03:07+00:00",
                "user": null
              }
            ]
          }