← Back

Machine

API for machine operations

Version: 0.1.0

Server

  • URL: https://api.kopernik.us/v0
    • Kopernik.us API server

Paths

/resource/machine/{providerUid}

GET

List machines

List machines for the specified provider

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
nextToken query string Token for the next page of machines, if there are more items to fetch
maxResults query integer Maximum number of machines to fetch
jq query string JQ filter expression to filter the results. Only resources where the expression evaluates to a truthy value are included. The expression is applied to each resource’s JSON representation. Uses jq 1.7 syntax.

Responses:

POST

Create machine

Create a new machine for the specified provider

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider

Request Body:

Content Type: application/json

Schema: MachineCreate

Responses:

/resource/machine/{providerUid}/{resourceUid}

GET

Get machine

Get machine details

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
resourceUid path string Unique identifier of the machine

Responses:

  • 200: Machine details

  • 400: Argument validation error

  • 404: Machine not found

DELETE

Delete machine

Delete machine by its UID

Parameters:

Name In Type Required Description
providerUid path ProviderId Unique identifier of the provider
resourceUid path string Unique identifier of the machine to delete

Responses:

  • 200: Machine deleted

  • 400: Argument validation error

  • 404: Machine not found

Schemas

Machine

Machine

Composition: allOf

Type: object

Properties:

Name Type Required Description
machineTypeUid string ID of the hardware configuration
name string Name of the machine
status string Status of the machine
ipv4 array<NetworkAddress> IPv4 addresses of the machine
ipv6 array<NetworkAddress> IPv6 addresses of the machine
tags array Tags of the machine

NetworkAddress

Network address

Type: object

Properties:

Name Type Required Description
address string Host address
netmask string Netmask address
gateway string Gateway address
scope string enum Scope of the address

MachineCreate

Request to create a new machine

Type: object

Properties:

Name Type Required Description
regionUid string Region identifier where the machine will be created
imageUid string Image identifier for the machine operating system
machineTypeUid string Machine type identifier specifying hardware configuration
name string Name of the machine
firewallUid string Firewall identifier to associate with the machine
vpcUid string VPC identifier to place the machine in
vpcSubnetUid string VPC subnet identifier for the machine
userData string User data script to run on machine initialization
authorizedKeyUids array SSH key identifiers to authorize for the machine
tags array Tags for the machine
volumes array<BlockStorageCreate> Additional block storage volumes to attach to the machine

MachineResourceResponse

Response with machine

Composition: allOf

Type: object

Properties:

Name Type Required Description
resource Machine

MachinePagedResourceResponse

Response with paged machines

Composition: allOf

Type: object

Properties:

Name Type Required Description
resources array<Machine>