Skip to main content
GET
/
servers
Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.servers.list(filter_project="proj_g1mbDwrZqLv5B", filter_region="SAO", filter_ram_eql=32, filter_ram_gte=40, filter_ram_lte=40, filter_tags="tag_0yrQNVQRLwHy0XwEGM6ESwLrW2PA", page_size=20, page_number=1)

    while res is not None:
        # Handle items

        res = res.next()
{
  "data": [
    {
      "id": "sv_lxWpD6xKdm6rk",
      "type": "servers",
      "attributes": {
        "tags": [
          {
            "id": "tag_Az0EY3zglei3jVBY1LroSWNyanye",
            "name": "tag1",
            "description": "Rerum harum saepe eum.",
            "color": "#e4e7e7"
          },
          {
            "id": "tag_GXK6NGol1jF2xre0JrB0fK6wg0p",
            "name": "tag2",
            "description": "Facere atque voluptatum iste.",
            "color": "#939595"
          }
        ],
        "hostname": "Hostname",
        "label": "474495NODEMC",
        "price": 599,
        "role": "Bare Metal",
        "primary_ipv4": "204.198.2.102",
        "primary_ipv6": "941c:f42a:460b:db1e:bde3:f7d4:c0cd:fd66",
        "status": "on",
        "ipmi_status": "Normal",
        "created_at": null,
        "scheduled_deletion_at": null,
        "locked": false,
        "rescue_allowed": false,
        "region": {
          "city": "São Paulo",
          "country": "United States",
          "site": {
            "id": "loc_RMLydp20DQKr1",
            "name": "São Paulo",
            "slug": "SAO",
            "facility": "São Paulo",
            "rack_id": "rack_VLMmAD8EOwop2"
          }
        },
        "team": {
          "id": "team_JrVbpk7aNltMLVVPwmWkfyZb5Q1",
          "name": "254 Team",
          "slug": "254-team",
          "description": "254 Team",
          "address": "95005 Krajcik Trace, Rennerview, DE 88944",
          "currency": {
            "id": "cur_AW6Q2D9lqKLpr",
            "code": "BRL",
            "name": "Brazilian Real",
            "currency_id": null
          },
          "status": "verified",
          "feature_flags": []
        },
        "project": {
          "id": "proj_8NkvdyMKdeLpx",
          "name": "Incredible Bronze Bench",
          "slug": "incredible-bronze-bench",
          "description": "Practical Silk Gloves",
          "provisioning_type": "on_demand",
          "billing_type": "Normal",
          "billing_method": "Normal",
          "bandwidth_alert": false,
          "environment": null,
          "billing": {},
          "stats": {
            "databases": 1,
            "ip_addresses": 8,
            "prefixes": 0,
            "servers": 3,
            "storages": 0,
            "virtual_machines": 0,
            "vlans": 0
          }
        },
        "plan": {
          "id": "plan_g1mbDw8BOLv5B",
          "name": "g3.h100.large-38",
          "slug": "plan-slug",
          "billing": "hourly"
        },
        "interfaces": [
          {
            "role": "ipmi",
            "name": "IPMI",
            "mac_address": "00:11:22:33:44:55",
            "description": "IPMI Interface"
          },
          {
            "role": "internal",
            "name": "PXE",
            "mac_address": "66:77:88:99:aa:bb",
            "description": "PXE Interface"
          }
        ],
        "operating_system": {
          "name": "Ubuntu (18.04 x64 LTS)",
          "slug": "ubuntu_18_04_x64_lts",
          "version": "18.04 x64 LTS",
          "features": {
            "raid": true,
            "ssh_keys": true
          },
          "distro": {
            "name": "Ubuntu",
            "slug": "ubuntu",
            "series": "bionic"
          }
        },
        "specs": {
          "cpu": "Xeon E-2186G CPU @ 3.80GHz (6 cores)",
          "disk": "500 GB SSD",
          "ram": "32 GB",
          "nic": "",
          "gpu": null
        }
      }
    }
  ],
  "meta": {}
}

Authorizations

Authorization
string
header
required

Query Parameters

filter[project]
string

The project ID or Slug to filter by

filter[region]
string

The region Slug to filter by

filter[hostname]
string

The hostname of server to filter by

filter[created_at_gte]
string

The created at greater than equal date to filter by

filter[created_at_lte]
string

The created at less than equal date to filter by

filter[label]
string

The label of server to filter by

filter[status]
string

The status of server to filter by

filter[plan]
string

The platform/plan name of the server to filter by

filter[gpu]
boolean

Filter by the existence of an associated GPU

filter[ram][eql]
integer

Filter servers with RAM size (in GB) equals the provided value.

filter[ram][gte]
integer

Filter servers with RAM size (in GB) greater than or equal the provided value.

filter[ram][lte]
integer

Filter servers with RAM size (in GB) less than or equal the provided value.

filter[disk]
integer

The disk size in Gigabytes to filter by, should be used with the following options: [eql] to filter for values equal to the provided value. [gte] to filter for values greater than or equal to the provided value. [lte] to filter by values lower than or equal to the provided value.

filter[tags]
string

The tags IDs to filter by, separated by comma, e.g. filter[tags]=tag_1,tag_2will return servers with tag_1 AND tag_2

extra_fields[servers]
string

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

page[size]
integer
default:20

Number of items to return per page

Required range: x >= 1
page[number]
integer
default:1

Page number to return (starts at 1)

Required range: x >= 1

Response

200 - application/vnd.api+json

Success

data
object[]
meta
object
I