Back to top

SpotMarketRequest

Spot Market Requests Management

Create a spot market request
/projects/{id}/spot-market-request

Creates a new spot market request. Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify { "features": { "tpm": "required" } } (or { "features": ["tpm"] } in shorthand). The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). The request will not fail if we have no servers with that feature in our inventory.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    spot_market_request
     (required) in body

    Spot Market Request to create

    {
    	"instance_attributes": "object",
    	"devices_min": "integer",
    	"devices_max": "integer",
    	"max_bid_price": "number",
    	"end_at": "string",
    	"facilities": [
    		"string"
    	]
    } 
  • Response  201   created
  • {
    	"id": "string",
    	"devices_min": "integer",
    	"devices_max": "integer",
    	"max_bid_price": "number",
    	"created_at": "string",
    	"end_at": "string",
    	"href": "string",
    	"facilities": {
    		"href": "string"
    	},
    	"project": {
    		"href": "string"
    	},
    	"instances": {
    		"href": "string"
    	}
    } 
  • Response  401   unauthorized
  • Response  422   unprocessable entity
  • Response  404   not found
List spot market requests
GET
/projects/{id}/spot-market-request

View all spot market requests for a given project.

  • Parameters
  • id
    string  (required) in path

    Project UUID

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"spot_market_requests": [
    		{
    			"id": "string",
    			"devices_min": "integer",
    			"devices_max": "integer",
    			"max_bid_price": "number",
    			"created_at": "string",
    			"end_at": "string",
    			"href": "string",
    			"facilities": {
    				"href": "string"
    			},
    			"project": {
    				"href": "string"
    			},
    			"instances": {
    				"href": "string"
    			}
    		}
    	]
    } 
  • Response  401   unauthorized
  • Response  404   not found
Retrieve a spot market request
GET
/spot-market-requests/{id}

Returns a single spot market request

  • Parameters
  • id
    string  (required) in path

    SpotMarketRequest UUID

    include
    string in query

    related attributes to include

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"id": "string",
    	"devices_min": "integer",
    	"devices_max": "integer",
    	"max_bid_price": "number",
    	"created_at": "string",
    	"end_at": "string",
    	"href": "string",
    	"facilities": {
    		"href": "string"
    	},
    	"project": {
    		"href": "string"
    	},
    	"instances": {
    		"href": "string"
    	}
    } 
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found
Delete the spot market request
/spot-market-requests/{id}

Deletes the spot market request.

  • Parameters
  • id
    string  (required) in path

    SpotMarketRequest UUID

    force_termination
    boolean in query

    Terminate associated spot instances

  • Response  204   no content
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found
Create a spot market request
/projects/{id}/spot-market-requests

Creates a new spot market request. Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan. The features attribute allows you to optionally specify what features your server should have. For example, if you require a server with a TPM chip, you may specify { "features": { "tpm": "required" } } (or { "features": ["tpm"] } in shorthand). The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below). The request will not fail if we have no servers with that feature in our inventory.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    spot_market_request
     (required) in body

    Spot Market Request to create

    {
    	"instance_attributes": "object",
    	"devices_min": "integer",
    	"devices_max": "integer",
    	"max_bid_price": "number",
    	"end_at": "string",
    	"facilities": [
    		"string"
    	]
    } 
  • Response  201   created
  • {
    	"id": "string",
    	"devices_min": "integer",
    	"devices_max": "integer",
    	"max_bid_price": "number",
    	"created_at": "string",
    	"end_at": "string",
    	"href": "string",
    	"facilities": {
    		"href": "string"
    	},
    	"project": {
    		"href": "string"
    	},
    	"instances": {
    		"href": "string"
    	}
    } 
  • Response  401   unauthorized
  • Response  422   unprocessable entity
  • Response  404   not found
List spot market requests
GET
/projects/{id}/spot-market-requests

View all spot market requests for a given project.

  • Parameters
  • id
    string  (required) in path

    Project UUID

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"spot_market_requests": [
    		{
    			"id": "string",
    			"devices_min": "integer",
    			"devices_max": "integer",
    			"max_bid_price": "number",
    			"created_at": "string",
    			"end_at": "string",
    			"href": "string",
    			"facilities": {
    				"href": "string"
    			},
    			"project": {
    				"href": "string"
    			},
    			"instances": {
    				"href": "string"
    			}
    		}
    	]
    } 
  • Response  401   unauthorized
  • Response  404   not found