POST
/ssh_keys/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/ssh_keys/?location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "label": "ssh_key_name", "ssh_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx user@hostname"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/ssh_keys/", params={"location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "label": "ssh_key_name", "ssh_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx user@hostname", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/ssh_keys/");url.search = new URLSearchParams({ location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "label": "ssh_key_name", "ssh_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx user@hostname" }),});console.log(await response.json());Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”location
required
string
Location
active_iam
integer
Active IAM ID (To access contact person account) Find your Active IAM ID here
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
label
required
string
Example
ssh_key_namessh_key
required
string
Example
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx user@hostnameResponses
Section titled “Responses”SSH key added successfully
Media typeapplication/json
object
code
integer
data
object
label
string
ssh_key
string
errors
object
message
string
Example
{ "code": 200, "data": { "label": "ssh_key_name", "ssh_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx user@hostname" }, "errors": {}, "message": "Your SSH Key has been added"}