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": "2017-10-10T15:55:57+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": "2017-10-10T15:55:57+00:00",
              "user": "https://api.engineyard.com/users/43f09bd9-030f-4068-bce0-4a15295b378f"
            }
          }
            
          








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": "2017-10-10T15:55:59+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": "2017-10-10T15:55:59+00:00",
              "user": "https://api.engineyard.com/users/fa0afec0-0920-4975-ac6f-6fccae08090c"
            }
          }
            
          








Delete a user's keypair

DELETE /keypairs/:keypair_id

Response

          Status: 204 No Content
          Content-Type: 
          
            
          {
          }
            
          








List an environment's keypairs

GET /environments/:environment_id/keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 29,
                "application": null,
                "created_at": "2017-10-10T15:56:10+00:00",
                "fingerprint": "81:34:4c:ce:65:e0:a9:b0:59:a7:85:de:20:06:46:e2",
                "name": "3638b9d8abb9ffdd9a07",
                "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-10-10T15:56:10+00:00",
                "user": "https://api.engineyard.com/users/88889b5b-d875-49a3-8b78-f143ca0eb65e"
              }
            ]
          }
            
          








Show a user's keypairs

GET /users/:user/keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 28,
                "application": null,
                "created_at": "2017-10-10T15:56:05+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": "2017-10-10T15:56:05+00:00",
                "user": "https://api.engineyard.com/users/f6c86462-b4a5-404d-8d64-820c8f0f3b80"
              }
            ]
          }
            
          








Show all keypairs

GET /keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 27,
                "application": null,
                "created_at": "2017-10-10T15:56:02+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": "2017-10-10T15:56:02+00:00",
                "user": "https://api.engineyard.com/users/0d83cee7-059f-4843-92aa-bd3be7665d77"
              }
            ]
          }
            
          








Show an application's keypairs

GET /applications/:application/keypairs

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "keypairs": [
              {
                "id": 24,
                "application": "https://api.engineyard.com/applications/24",
                "created_at": "2017-10-10T15:55:54+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": "2017-10-10T15:55:54+00:00",
                "user": null
              }
            ]
          }