Brokkr API Documentation

💡
The Brokkr API is currently in beta. Expect continued improvements. We will attempt to maintain backward compatibility whenever possible, but there may be breaking changes until the first major release. See the postman collection for the source of truth.

Overview

The Brokkr Rest API provides access to view, create, and delete deployments, inventory, organizations, and SSH keys.

All requests should be directed to https://brokkr.hydrahost.com/api.

All routes except /login require a bearer token authorization header.

Postman Collection

The Brokkr API Postman Collection is an up-to-date reference to our production API. Login with your username and password using the authentication POST endpoint, then copy and paste your access token into the authentication header in the collection settings; the remaining endpoints will inherit the token.

Specification

Authentication

POST /login

Authenticates a user through email and password, returning an authorization token.

  • Request Data
    • {
        "email": "first.last@myemail.com",
        "password": "Sup3rS3cur3Passw0rd!"
      }
  • Response (200)
    • {
          "token": "eyxxx"
      }
  • Response (403)
    • {
          "status": 403,
          "message": "Error processing request."
      }

Organizations

GET /orgs

Return an array of organizations to which you are a member.

  • Response (200)
[
    {
        "id": "org_xxx",
        "name": "Personal"
    },
    {
        "id": "org_yyy",
        "name": "Business"
    }
]

SSH Keys

GET /sshkeys

Return an array of all your SSH keys.

  • Response (200)
    • [
          {
              "id": "00000000-0000-0000-0000-000000000000",
              "name": "My First Key",
              "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3",
              "created": "2024-02-07T03:41:52.721Z"
          },
          {
              "id": "00000000-1111-1111-0000-000000000000",
              "name": "My Second Key",
              "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4",
              "created": "2024-02-07T03:41:52.721Z"
          },
          {
              "id": "00000000-1111-1111-2222-000000000000",
              "name": "My Other Key",
              "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5",
              "created": "2024-02-07T03:41:52.721Z"
          }
      ]

POST /sshkeys

Add SSH keys to your account.

  • Request Data
    • [{
      	"name": "My Key",
      	"key": "ssh-rsa AAAAB3Nz..."
      }]
  • Response (200)
    • [
          {
              "id": "00000000-0000-0000-0000-000000000000",
              "name": "My Key",
              "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3",
              "created": "2024-02-07T03:41:52.721Z"
          }
      ]

DELETE /sshkeys/<SSH key ID>

Delete a single SSH key.

  • Response (200)
    • {
          "id": "00000000-0000-0000-0000-000000000000",
          "name": "My Key",
          "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3",
          "created": "2024-02-07T03:41:52.721Z"
      }

DELETE /sshkeys

Delete many SSH keys.

  • Request Data
["00000000-0000-0000-0000-000000000000","00000000-1111-1111-1111-000000000000"]
  • Response (200)
[
    {
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "My Key",
        "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3",
        "created": "2024-02-07T03:41:52.721Z"
    },
    {
        "id": "00000000-1111-1111-1111-000000000000",
        "name": "My Second Key",
        "fingerprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4",
        "created": "2024-02-07T03:41:52.721Z"
    }
]

Deployments

GET /deployments

Return an array of all deployments in your organizations.

  • Response (200)
    • [
          {
              "id": 100,
              "name": "mybox",
              "org": "org_xxx",
              "supplier": "Hydra Host",
              "marketplace_name": "HYD-CPU-16",
              "location": "Arizona",
              "vcpu_count": 16,
              "storage": "745GB",
              "memory": "64GB",
              "status": "provisioned"
          },
          {
              "id": 101,
              "name": "mygpubox",
              "org": "org_xxx",
      		    "supplier": "Hydra Host",
      		    "marketplace_name": "HYD-GPU-64",
      		    "location": "Arizona",
      				"gpu_model": "NVIDIA A100 SXM4 40 GB",
      		    "gpu_count": 8,
      		    "vcpu_count": 64,
      				"storage": "1490GB",
      		    "memory": "472GB",
      		    "status": "provisioned",
          }
      ]

GET /deployments/<device ID>

Return details about a deployment.

  • Response (200)
    • {
          "id": 101,
          "name": "mygpubox",
          "org": "org_xxx",
          "supplier": "Hydra Host",
          "marketplace_name": "HYD-GPU-64",
          "location": "Arizona",
      		"gpu_model": "NVIDIA A100 SXM4 40 GB",
          "gpu_count": 8,
          "vcpu_count": 64,
      		"storage": "1490GB",
          "memory": "472GB",
          "status": "provisioned",
          "network": {
              "ipv6": "2606:a5ff:01f4:45aa:8261:5fff:fe11:be27/64",
              "public_ipv4": "209.135.190.25/32",
              "private_ipv4": "172.16.26.195/22",
              "speedtest_upload_speed": 894852353,
              "speedtest_download_speed": 915372490,
              "speedtest_image_url": "http://www.speedtest.net/result/15858311494.png"
          },
      		"hardware": {
              "gpu_model": "NVIDIA A100 SXM4 40 GB",
              "gpu_count": 8,
              "cpu_model": "AMD EPYC 7542 32-Core Processor",
              "cpu_count": 2,
              "cores_per_cpu": 32,
              "ssd_count": 2,
              "ssd_size": 1490,
          },
      		"pricing": {
              "price": 14.56,
              "unit": "USD",
              "type": "Hourly"
          }
      }
  • Response (404)
    • {
          "status": 404,
          "message": "Device not found."
      }

DELETE /deployments/<device ID>

Decommission a deployment.

  • Response (202)
    • {
          "id": 101,
          "name": "mygpubox",
          "org": "org_xxx",
          "supplier": "Hydra Host",
          "marketplace_name": "HYD-GPU-64",
          "location": "Arizona",
      		"gpu_model": "NVIDIA A100 SXM4 40 GB",
          "gpu_count": 8,
          "vcpu_count": 64,
      		"storage": "1490GB",
          "memory": "472GB",
      		"status": "decommissioning",
          "network": {
              "ipv6": "2606:a5ff:01f4:45aa:8261:5fff:fe11:be27/64",
              "public_ipv4": "209.135.190.25/32",
              "private_ipv4": "172.16.26.195/22",
              "speedtest_upload_speed": 894852353,
              "speedtest_download_speed": 915372490,
              "speedtest_image_url": "http://www.speedtest.net/result/15858311494.png"
          },
      		"hardware": {
              "gpu_model": "NVIDIA A100 SXM4 40 GB",
              "gpu_count": 8,
              "cpu_model": "AMD EPYC 7542 32-Core Processor",
              "cpu_count": 2,
              "cores_per_cpu": 32,
              "ssd_count": 2,
              "ssd_size": 1490,
          },
      		"pricing": {
              "price": 14.56,
              "unit": "USD",
              "type": "Hourly"
          }
      }
  • Response (404)
    • {
          "status": 404,
          "message": "Device not found."
      }

DCIM

GET /dcim/devices

Return an array of all devices in your supplier organizations.

  • Response (200)
    • [
          {
              "id": 100,
              "org": "org_yyy",
      		    "serial": "MXQ63208PX",
      		    "primary_mac": "80:61:5C:18:BE:87",
      		    "name": "hydrahost-h-80615c18be87",
              "proxy_group": "hydrahost-arizona-1",
              "marketplace_name": "HYD-CPU-16",
              "location": "Arizona",
              "vcpu_count": 16,
              "storage": "745GB",
              "memory": "64GB",
              "status": "available"
          },
          {
              "id": 121,
              "org": "org_yyy",
              "serial": "LN6N1800056",
              "primary_mac": "18:C5:4D:2C:4C:A5",
              "name": "hydrahost-h-18c54d2c4ca5",
              "proxy_group": "hydrahost-arizona-1",
              "nickname": null,
              "marketplace_name": "HYD-GPU-64",
              "location": "Arizona",
              "gpu_model": "NVIDIA A100 SXM4 40 GB",
              "gpu_count": 8,
              "vcpu_count": 64,
              "storage": "1490GB",
              "memory": "472GB",
              "status": "provisioned"
          }
      ]

GET /dcim/devices/<device ID>

Return details about a device.

  • Response (200)
    • {
          "id": 102,
          "serial": "LN6N1800172",
          "org": "org_yyy",
          "primary_mac": "18:C0:4D:8C:4C:D5",
          "name": "hydrahost-h-18c04d8c4cd5",
          "proxy_group": "hydrahost-arizona-1",
          "nickname": null,
          "marketplace_name": "HYD-GPU-64",
          "location": "Arizona",
          "gpu_model": "NVIDIA A100 SXM4 40 GB",
          "gpu_count": 8,
          "vcpu_count": 64,
          "storage": "1490GB",
          "memory": "472GB",
          "status": "provisioned",
          "network": {
              "ipv6": "2606:a5ff:01f4:45aa:8261:5fff:fe11:4cd5/64",
              "public_ipv4": "205.182.56.147/32",
              "private_ipv4": "172.16.26.92/22",
              "speedtest_upload_speed": 894852353,
              "speedtest_download_speed": 915372490,
              "speedtest_image_url": "http://www.speedtest.net/result/15858311494.png"
          },
      		"hardware": {
              "gpu_model": "NVIDIA A100 SXM4 40 GB",
              "gpu_count": 8,
              "cpu_model": "AMD EPYC 7542 32-Core Processor",
              "cpu_count": 2,
              "cores_per_cpu": 32,
              "ssd_count": 2,
              "ssd_size": 1490,
          },
      		"pricing": {
              "price": 14.56,
              "unit": "USD",
              "type": "Hourly"
          }
          "customer": {
              "email": "customer@email.com",
              "org": "Customer's Org",
              "device_name": "customergpubox"
          }
      }
  • Response (404)
{
    "status": 404,
    "message": "Device not found."
}

PUT /dcim/devices/<device ID>

Provision a device for internal use by your supplier organization.

  • Request Data
    • {
          "name": "mybox",
          "sshkeys": ["My First Key","My Second Key"],
          "os": "ubuntu2202"
      }
  • Response (202)
    • {
          "id": 100,
          "org": "org_yyy",
          "serial": "MXQ63208PX",
          "primary_mac": "80:61:5C:18:BE:87",
          "name": "hydrahost-h-80615c18be87",
          "proxy_group": "hydrahost-arizona-1",
          "marketplace_name": "HYD-CPU-16",
          "location": "Arizona",
          "vcpu_count": 16,
          "storage": "745GB",
          "memory": "64GB",
          "status": "provisioning"
      }

DELETE /dcim/devices/<device ID>

Decommission a device, sending it back to discovery.

  • Response (202)
{
    "id": 101,
    "org": "org_yyy",
    "name": "mygpubox",
    "supplier": "Hydra Host",
    "marketplace_name": "HYD-GPU-64",
    "location": "Arizona",
		"gpu_model": "NVIDIA A100 SXM4 40 GB",
    "gpu_count": 8,
    "vcpu_count": 64,
		"storage": "1490GB",
    "memory": "472GB",
		"status": "decommissioning",
    "network": {
        "ipv6": "2606:a5ff:01f4:45aa:8261:5fff:fe11:be27/64",
        "public_ipv4": "209.135.190.25/32",
        "private_ipv4": "172.16.26.195/22",
        "speedtest_upload_speed": 894852353,
        "speedtest_download_speed": 915372490,
        "speedtest_image_url": "http://www.speedtest.net/result/15858311494.png"
    },
		"hardware": {
        "gpu_model": "NVIDIA A100 SXM4 40 GB",
        "gpu_count": 8,
        "cpu_model": "AMD EPYC 7542 32-Core Processor",
        "cpu_count": 2,
        "cores_per_cpu": 32,
        "ssd_count": 2,
        "ssd_size": 1490,
    },
		"pricing": {
        "price": 14.56,
        "unit": "USD",
        "type": "Hourly"
    }
}
  • Response (404)
{
    "status": 404,
    "message": "Device not found."
}
 
Did this answer your question?
😞
😐
🤩

Last updated on August 4, 2021