Searching...

Infrastructure

Endpoints for managing infrastructure resources including creating, updating, retrieving, and deleting infrastructure configurations.

post /infrastructures

Create new infrastructure

Create new infrastructure resources in the Nebularis platform.

name string required

The name of the infrastructure

description string required

A brief description of the infrastructure

resources array required

Responses

Infrastructure created successfully

Response body Headers
id string

The unique identifier for the new infrastructure

name string

The name of the new infrastructure

description string

The description of the new infrastructure

resources array

This response does not contain any headers

Invalid input

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "name": "My Infrastructure",
  "description": "This is a description of my infrastructure.",
  "resources": [
    {
      "type": "vm",
      "configuration": {
        "vm_type": "t2.micro",
        "image_id": "ami-12345678",
        "instance_size": "small",
        "region": "us-west-2",
        "availability_zone": "us-west-2a",
        "tags": [
          "web-server",
          "production"
        ],
        "network_id": "net-12345678"
      }
    },
    {
      "type": "network",
      "configuration": {
        "cidr_block": "10.0.0.0/16",
        "subnets": [
          "10.0.1.0/24",
          "10.0.2.0/24"
        ],
        "security_groups": [
          "sg-12345678",
          "sg-87654321"
        ]
      }
    },
    {
      "type": "disk",
      "configuration": {
        "size": 100,
        "type": "ssd",
        "attached_vm_id": "i-12345678"
      }
    }
  ]
}

Response examples

Infrastructure created successfully

{
  "id": "infra_123",
  "name": "My Infrastructure",
  "description": "This is a description of my infrastructure.",
  "resources": [
    {
      "id": "vm_123",
      "type": "vm",
      "configuration": {
        "vm_type": "t2.micro",
        "image_id": "ami-12345678",
        "instance_size": "small",
        "region": "us-west-2",
        "availability_zone": "us-west-2a",
        "tags": [
          "web-server",
          "production"
        ],
        "network_id": "net-12345678"
      }
    },
    {
      "id": "net_123",
      "type": "network",
      "configuration": {
        "cidr_block": "10.0.0.0/16",
        "subnets": [
          "10.0.1.0/24",
          "10.0.2.0/24"
        ],
        "security_groups": [
          "sg-12345678",
          "sg-87654321"
        ]
      }
    },
    {
      "id": "disk_123",
      "type": "disk",
      "configuration": {
        "size": 100,
        "type": "ssd",
        "attached_vm_id": "i-12345678"
      }
    }
  ]
}
get /infrastructures/{id}

Get infrastructure information

Retrieve details of a specific infrastructure.

id string required

The unique identifier of the infrastructure

Responses

Infrastructure information retrieved successfully

Response body Headers
id string

The unique identifier of the infrastructure

name string

The name of the infrastructure

description string

The description of the infrastructure

resources array

This response does not contain any headers

Infrastructure not found

Response body Headers

This response is empty

This response does not contain any headers

Response examples

Infrastructure information retrieved successfully

{
  "id": "infra_123",
  "name": "My Infrastructure",
  "description": "This is a description of my infrastructure.",
  "resources": [
    {
      "id": "vm_123",
      "type": "vm",
      "configuration": {
        "vm_type": "t2.micro",
        "image_id": "ami-12345678",
        "instance_size": "small",
        "region": "us-west-2",
        "availability_zone": "us-west-2a",
        "tags": [
          "web-server",
          "production"
        ],
        "network_id": "net-12345678"
      }
    },
    {
      "id": "net_123",
      "type": "network",
      "configuration": {
        "cidr_block": "10.0.0.0/16",
        "subnets": [
          "10.0.1.0/24",
          "10.0.2.0/24"
        ],
        "security_groups": [
          "sg-12345678",
          "sg-87654321"
        ]
      }
    },
    {
      "id": "disk_123",
      "type": "disk",
      "configuration": {
        "size": 100,
        "type": "ssd",
        "attached_vm_id": "i-12345678"
      }
    }
  ]
}
delete /infrastructures/{id}

Delete infrastructure

Delete a specific infrastructure.

id string required

The unique identifier of the infrastructure

Responses

Infrastructure deleted successfully

Response body Headers

This response is empty

This response does not contain any headers

Infrastructure not found

Response body Headers

This response is empty

This response does not contain any headers

Response examples

patch /infrastructures/{id}

Update infrastructure

Update the details of a specific infrastructure.

name string required

The new name for the infrastructure

description string required

The new description for the infrastructure

resources array required
id string required

The unique identifier of the infrastructure

Responses

Infrastructure updated successfully

Response body Headers
id string

The unique identifier for the updated infrastructure

name string

The name of the updated infrastructure

description string

The description of the updated infrastructure

resources array

This response does not contain any headers

Invalid input

Response body Headers

This response is empty

This response does not contain any headers

Infrastructure not found

Response body Headers

This response is empty

This response does not contain any headers

Request examples

{
  "name": "Updated Infrastructure",
  "description": "This is an updated description of my infrastructure.",
  "resources": [
    {
      "id": "vm_123",
      "type": "vm",
      "configuration": {
        "vm_type": "t2.micro",
        "image_id": "ami-87654321",
        "instance_size": "medium",
        "region": "us-east-1",
        "availability_zone": "us-east-1b",
        "tags": [
          "app-server",
          "production"
        ],
        "network_id": "net-87654321"
      }
    },
    {
      "id": "net_123",
      "type": "network",
      "configuration": {
        "cidr_block": "10.0.1.0/24",
        "subnets": [
          "10.0.1.0/24",
          "10.0.2.0/24"
        ],
        "security_groups": [
          "sg-87654321",
          "sg-12345678"
        ]
      }
    },
    {
      "id": "disk_123",
      "type": "disk",
      "configuration": {
        "size": 200,
        "type": "ssd",
        "attached_vm_id": "i-87654321"
      }
    }
  ]
}

Response examples

Infrastructure updated successfully

{
  "id": "infra_123",
  "name": "Updated Infrastructure",
  "description": "This is an updated description of my infrastructure.",
  "resources": [
    {
      "id": "vm_123",
      "type": "vm",
      "configuration": {
        "vm_type": "t2.micro",
        "image_id": "ami-87654321",
        "instance_size": "medium",
        "region": "us-east-1",
        "availability_zone": "us-east-1b",
        "tags": [
          "app-server",
          "production"
        ],
        "network_id": "net-87654321"
      }
    },
    {
      "id": "net_123",
      "type": "network",
      "configuration": {
        "cidr_block": "10.0.1.0/24",
        "subnets": [
          "10.0.1.0/24",
          "10.0.2.0/24"
        ],
        "security_groups": [
          "sg-87654321",
          "sg-12345678"
        ]
      }
    },
    {
      "id": "disk_123",
      "type": "disk",
      "configuration": {
        "size": 200,
        "type": "ssd",
        "attached_vm_id": "i-87654321"
      }
    }
  ]
}