Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.elastic_ips.get_elastic_ip(elastic_ip_id="eip_KeQbB4BoO6x10")
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.ElasticIps.GetElasticIP(ctx, "eip_KeQbB4BoO6x10")
if err != nil {
log.Fatal(err)
}
if res.ElasticIP != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.elasticIps.getElasticIp({
elasticIpId: "eip_KeQbB4BoO6x10",
});
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/elastic_ips/{elastic_ip_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/elastic_ips/{elastic_ip_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/elastic_ips/{elastic_ip_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/elastic_ips/{elastic_ip_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/elastic_ips/{elastic_ip_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "eip_KeQbB4BoO6x10",
"type": "elastic_ips",
"attributes": {
"address": "177.54.156.7",
"family": "IPv4",
"prefix_length": 32,
"mode": "routed",
"status": "active",
"created_at": "2026-02-24T17:06:28.108Z",
"server": {
"id": "sv_2GmAlJ6BXlK1a",
"hostname": "my-server",
"primary_ipv4": "177.54.157.75"
},
"project": {
"id": "proj_AoW6vRnwkvLn0",
"name": "My Project",
"slug": "my-project"
},
"region": {
"id": "region_sa_sao_paulo",
"name": "São Paulo",
"location": {
"id": "site_sao",
"name": "São Paulo",
"slug": "SAO"
}
}
}
}
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Elastic Ips
Retrieve an Elastic IP
Returns a single Elastic IP by its ID.
GET
/
elastic_ips
/
{elastic_ip_id}
Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.elastic_ips.get_elastic_ip(elastic_ip_id="eip_KeQbB4BoO6x10")
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.ElasticIps.GetElasticIP(ctx, "eip_KeQbB4BoO6x10")
if err != nil {
log.Fatal(err)
}
if res.ElasticIP != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.elasticIps.getElasticIp({
elasticIpId: "eip_KeQbB4BoO6x10",
});
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/elastic_ips/{elastic_ip_id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/elastic_ips/{elastic_ip_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/elastic_ips/{elastic_ip_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/elastic_ips/{elastic_ip_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/elastic_ips/{elastic_ip_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "eip_KeQbB4BoO6x10",
"type": "elastic_ips",
"attributes": {
"address": "177.54.156.7",
"family": "IPv4",
"prefix_length": 32,
"mode": "routed",
"status": "active",
"created_at": "2026-02-24T17:06:28.108Z",
"server": {
"id": "sv_2GmAlJ6BXlK1a",
"hostname": "my-server",
"primary_ipv4": "177.54.157.75"
},
"project": {
"id": "proj_AoW6vRnwkvLn0",
"name": "My Project",
"slug": "my-project"
},
"region": {
"id": "region_sa_sao_paulo",
"name": "São Paulo",
"location": {
"id": "site_sao",
"name": "São Paulo",
"slug": "SAO"
}
}
}
}
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}Was this page helpful?
⌘I