> ## Documentation Index
> Fetch the complete documentation index at: https://www.latitude.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve server

> Returns a server that belongs to the team.




## OpenAPI

````yaml https://spec.speakeasy.com/latitude/latitude/latitude-sh-api-with-code-samples get /servers/{server_id}
openapi: 3.0.1
info:
  title: Latitude.sh API
  version: '2023-06-01'
  description: >-
    The Latitude.sh API is a RESTful API to manage your Latitude.sh account. It
    allows you to perform the same actions as the Latitude.sh dashboard.
servers:
  - url: https://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
  - url: http://api.latitude.sh
    variables:
      latitude_api_key:
        default: <insert your api key here>
security: []
tags:
  - name: API keys
  - name: Billing
  - name: Elastic Ips
  - name: Events
  - name: Firewalls
  - name: IP Addresses
  - name: Kubernetes Clusters
  - name: Operating Systems
  - name: Plans
  - name: Private Networks
  - name: Projects
  - name: Regions
  - name: Roles
  - name: SSH Keys
  - name: Servers
  - name: Storage
  - name: Tags
  - name: Teams
  - name: Team members
  - name: Traffic
  - name: User data
  - name: User profile
  - name: VPN Sessions
  - name: Virtual machines
paths:
  /servers/{server_id}:
    get:
      tags:
        - Servers
      summary: Retrieve server
      description: |
        Returns a server that belongs to the team.
      operationId: get-server
      parameters:
        - name: server_id
          in: path
          description: The Server ID
          required: true
          examples:
            Success:
              value: sv_VE1Wd3aXDXnZJ
          schema:
            type: string
        - name: extra_fields[servers]
          in: query
          required: false
          description: >-
            The `credentials` are provided as extra attributes that is lazy
            loaded. To request it, just set `extra_fields[servers]=credentials`
            in the query string.
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/vnd.api+json:
              examples:
                Success:
                  value:
                    data:
                      id: sv_VE1Wd3aXDXnZJ
                      type: servers
                      attributes:
                        tags: []
                        hostname: Hostname
                        label: 327106NODEQI
                        price: 599
                        role: Bare Metal
                        primary_ipv4: 9.120.132.45
                        primary_ipv6: 889e:8540:973b:5c04:abce:2551:47ae:a67e
                        status: 'on'
                        ipmi_status: Normal
                        created_at: null
                        scheduled_deletion_at: null
                        locked: false
                        rescue_allowed: false
                        region:
                          city: São Paulo 81
                          country: Mexico 73
                          site:
                            id: loc_GMy1DbNgDN50m
                            name: São Paulo 81
                            slug: SAO
                            facility: São Paulo 81
                            rack_id: rack_6VE1Wd37dXnZJ
                        team:
                          id: team_M2WyX3zpQMf5Wvaw6zkotLZx0Ne
                          name: 308 Team
                          slug: 308-team
                          description: 308 Team
                          address: >-
                            Suite 667 299 Enoch Lights, Lake Lilli, MT
                            24573-1532
                          currency:
                            id: cur_AW6Q2D9lqKLpr
                            code: BRL
                            name: Brazilian Real
                            currency_id: null
                          status: verified
                          feature_flags: []
                          limits:
                            bare_metal: null
                            bare_metal_gpu: 1
                            virtual_machine: 5
                            virtual_machine_gpu: 3
                            database: null
                            filesystem: null
                            block_storage: null
                        project:
                          id: proj_LMmAD8E4Owop2
                          name: Awesome Granite Chair
                          slug: awesome-granite-chair
                          description: Mediocre Paper Wallet
                          provisioning_type: on_demand
                          billing_type: Normal
                          billing_method: Normal
                          bandwidth_alert: false
                          environment: null
                          billing: {}
                          stats:
                            databases: 0
                            ip_addresses: 2
                            prefixes: 0
                            servers: 1
                            storages: 0
                            virtual_machines: 0
                            vlans: 0
                        plan:
                          id: plan_yQrJdN9JO30gv
                          name: c2.large.arm
                          slug: c2-large-arm
                          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: ''
                          disk: ''
                          ram: ''
                          nic: ''
                          gpu: null
                    meta: {}
              schema:
                $ref: '#/components/schemas/server'
      security:
        - Bearer: []
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from latitudesh_python_sdk import Latitudesh
            import os


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

                res = latitudesh.servers.get(server_id="sv_VE1Wd3aXDXnZJ")

                # Handle response
                print(res)
        - lang: go
          label: Go (SDK)
          source: "package main\n\nimport(\n\t\"context\"\n\t\"os\"\n\tlatitudeshgosdk \"github.com/latitudesh/latitudesh-go-sdk\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := latitudeshgosdk.New(\n        latitudeshgosdk.WithSecurity(os.Getenv(\"LATITUDESH_BEARER\")),\n    )\n\n    res, err := s.Servers.Get(ctx, \"sv_VE1Wd3aXDXnZJ\", nil)\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.Server != nil {\n        // handle response\n    }\n}"
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Latitudesh } from "latitudesh-typescript-sdk";

            const latitudesh = new Latitudesh({
              bearer: process.env["LATITUDESH_BEARER"] ?? "",
            });

            async function run() {
              const result = await latitudesh.servers.get({
                serverId: "sv_VE1Wd3aXDXnZJ",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    server:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/server_data'
        meta:
          type: object
    server_data:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
          properties:
            hostname:
              type: string
            label:
              type: string
              description: The server label
            status:
              type: string
              enum:
                - 'on'
                - 'off'
                - unknown
                - disk_erasing
                - deploying
                - failed_deployment
                - rescue_mode
              description: >
                `on` - The server is powered ON

                `off` - The server is powered OFF

                `unknown` - The server power status is unknown

                `disk_erasing` - The server is in reinstalling state
                `disk_erasing`

                `deploying` - The server is deploying or reinstalling

                `failed_deployment` - The server has failed deployment or
                reinstall

                `rescue_mode` - The server is in rescue mode
            ipmi_status:
              type: string
              enum:
                - Unavailable
                - Intermittent
                - Normal
            role:
              type: string
              description: The server role (e.g. Bare Metal)
            site:
              type: string
            locked:
              type: boolean
            rescue_allowed:
              type: boolean
            primary_ipv4:
              type: string
              nullable: true
            primary_ipv6:
              type: string
              nullable: true
            created_at:
              type: string
              nullable: true
            scheduled_deletion_at:
              type: string
              nullable: true
            plan:
              type: object
              properties:
                id:
                  type: string
                  description: The plan ID
                name:
                  type: string
                  description: The plan name
                slug:
                  type: string
                  description: The plan slug
                billing:
                  type: string
                  description: >-
                    hourly/monthly pricing. Defaults to `hourly`. Appliable for
                    `on_demand` projects only.
                  nullable: true
            operating_system:
              type: object
              properties:
                name:
                  type: string
                  description: The OS name
                slug:
                  type: string
                  description: The OS slug
                version:
                  type: string
                  description: The OS description
                features:
                  type: object
                  properties:
                    raid:
                      type: boolean
                    ssh_keys:
                      type: boolean
                    user_data:
                      type: boolean
                distro:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The OS Distro name
                    slug:
                      type: string
                      description: The OS Distro slug
                    series:
                      type: string
                      description: The OS Distro Series
            region:
              $ref: '#/components/schemas/server_region_resource_data'
            specs:
              type: object
              properties:
                cpu:
                  type: string
                  description: CPU model
                disk:
                  type: string
                  description: Disk quantity and size in GB (e.g. 2 x 500GB)
                ram:
                  type: string
                  description: RAM size in GB
                nic:
                  type: string
                  description: NIC quantity and speed
                gpu:
                  type: string
                  description: GPU model and quantity, if present
                  nullable: true
            interfaces:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                      - external
                      - internal
                      - ipmi
                      - unknown
                  name:
                    type: string
                  mac_address:
                    type: string
                    nullable: true
                  description:
                    type: string
            project:
              $ref: '#/components/schemas/project_include'
            team:
              $ref: '#/components/schemas/team_include'
    server_region_resource_data:
      type: object
      properties:
        city:
          type: string
        country:
          type: string
        site:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            slug:
              type: string
            facility:
              type: string
            rack_id:
              type: string
    project_include:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        description:
          type: string
          nullable: true
        billing_type:
          type: string
          nullable: true
        provisioning_type:
          type: string
          nullable: true
        billing_method:
          type: string
          nullable: true
        bandwidth_alert:
          type: boolean
        environment:
          type: string
          nullable: true
        billing:
          type: object
          properties:
            subscription_id:
              type: string
              nullable: true
            type:
              type: string
            method:
              type: string
        stats:
          type: object
          properties:
            ip_addresses:
              type: integer
            prefixes:
              type: integer
            servers:
              type: integer
            vlans:
              type: integer
    team_include:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        slug:
          type: string
        description:
          type: string
          nullable: true
        address:
          type: string
        currency:
          type: object
        status:
          type: string
        feature_flags:
          type: array
          items:
            type: string
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````