Skip to main content
GET
/
ips
/
{ip_id}
Go (SDK)
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.IPAddresses.Get(ctx, "<id>", nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.IPAddress != nil {
        // handle response
    }
}
{
  "id": "<string>",
  "attributes": {
    "address": "<string>",
    "cidr": "<string>",
    "family": "IPv4",
    "gateway": "<string>",
    "netmask": "<string>",
    "type": "Public",
    "public": true,
    "management": true,
    "project": {
      "id": "<string>",
      "name": "<string>"
    },
    "region": {
      "id": "<string>",
      "name": "<string>",
      "location": {
        "id": "<string>",
        "name": "<string>",
        "slug": "<string>"
      }
    },
    "available": true,
    "assignment": {
      "server_id": "<string>",
      "hostname": "<string>",
      "assigned_at": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

ip_id
string
required

The IP Address ID

Query Parameters

extra_fields[ip_addresses]
string

The region and server are provided as extra attributes that are lazy loaded. To request it, just set extra_fields[ip_addresses]=region,server in the query string.

Response

200 - application/vnd.api+json

Success

id
string
attributes
object