Keypairs API


Show a user's keypairs

GET /users/:user/keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 10,
                "application": null,
                "created_at": "2017-02-22T17:04:33+00:00",
                "fingerprint": "f9:77:74:8f:c5:c8:ef:1e:52:aa:82",
                "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": "2017-02-22T17:04:33+00:00",
                "user": "https://api.engineyard.com/users/35e7a1a1-521f-4420-8f56-c401cc6bb550"
              }
            ]
          }
            
          








Delete a user's keypair

DELETE /keypairs/:keypair_id

Response

          Status: 204 No Content
          Content-Type: 
          
            
          {
          }
            
          








Show an application's keypairs

GET /applications/:application/keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 6,
                "application": "https://api.engineyard.com/applications/6",
                "created_at": "2017-02-22T17:04:01+00:00",
                "fingerprint": "f9:77:74:8f:c5:c8:ef:1e:52:aa:82",
                "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": "2017-02-22T17:04:01+00:00",
                "user": null
              }
            ]
          }
            
          








List an environment's keypairs

GET /environments/:environment_id/keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 11,
                "application": null,
                "created_at": "2017-02-22T17:04:44+00:00",
                "fingerprint": "f9:77:74:8f:c5:c8:ef:1e:52:aa:82",
                "name": "dfb9ed538b7ff72b23fc",
                "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": "2017-02-22T17:04:44+00:00",
                "user": "https://api.engineyard.com/users/c2e42a06-3a06-46b7-be2b-48122c4c20a8"
              }
            ]
          }
            
          








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": 7,
              "application": null,
              "created_at": "2017-02-22T17:04:10+00:00",
              "fingerprint": "f9:77:74:8f:c5:c8:ef:1e:52:aa:82",
              "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": "2017-02-22T17:04:10+00:00",
              "user": "https://api.engineyard.com/users/03bc10ee-475a-41d8-b2a2-1ea34db342c8"
            }
          }
            
          








Show all keypairs

GET /keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 9,
                "application": null,
                "created_at": "2017-02-22T17:04:25+00:00",
                "fingerprint": "f9:77:74:8f:c5:c8:ef:1e:52:aa:82",
                "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": "2017-02-22T17:04:25+00:00",
                "user": "https://api.engineyard.com/users/a0afa8ae-008a-4d5d-9afb-7b73d9be6b7d"
              }
            ]
          }
            
          








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": 8,
              "application": null,
              "created_at": "2017-02-22T17:04:17+00:00",
              "fingerprint": "f9:77:74:8f:c5:c8:ef:1e:52:aa:82",
              "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": "2017-02-22T17:04:17+00:00",
              "user": "https://api.engineyard.com/users/ad7efb45-048b-44bc-bd43-1d310e8b04bd"
            }
          }