DeferPanic IaaS API Documentation

Version: 0.1 - BETA

Get the Official DeferPanic IaaS Client here

Authorization

Set header DP-APIToken with API token for each request

Images

Images are immutable virtual machines that you can spin up in a project.

Create new image

URL: /v0.1/image/new
Method: POST
Content type: application/json

Request:

Parameters:

--------

Name - image name (string)

Source - repository URL (string)

Language - programming language (string)

Script - script executed during image building (string)

Addon - addon for prebuilt images (string)

Example for building image:

        
        {
          "Name":"MySample", 
          "Source":"https://github.com/mycompany/myapplication", 
          "Language":"go", 
          "Script":"version: 1\n\nscripts:\n  - name:library\n   command:git clone git://github.com/company/lib"
        }
        
      

Example for prebuilt image:

       
        {
          "Name":"MySample", 
          "Addon":"wordpress"
        }
        
      

Response:

Parameters:
       
        {
        }
        
      

HTTP Codes

--------

200 - OK. Response contains results

400 - Bad request. Wrong data

401 - Unauthorized.

500 - Internal server error

Display all images

URL: /v0.1/image/display
Method: GET
Content type: application/json

Request:

Parameters: not available

Response

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
401 - Unauthorized.
500 - Internal server error

View image making log

URL: /v0.1/image/makelog
Method: POST
Content type: application/json

Request:

Parameters:

Name - image name (string)

Example:
    
    {
      "Name":"MySample"
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Instances

Instances are instances of an image.

Scale up instance

URL: /v0.1/instance/scaleup
Method: POST
Content type: application/json

Request:

Parameters:

--------

Name - image name (string)

Count - number of instance (integer), default 1

Force - ignore errors (boolean), default false

Example:

    
    {
      "Name":"MySample",
      "Count": 2,
      "Force": true
    }
    
  

Response:

Parameters:
   
    {
    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Scale down instance

URL: /v0.1/instance/scaledown
Method: POST
Content type: application/json

Request:

Parameters:

Name - image name (string)

Domain - domain name of image instance (string)

Force - ignore errors (boolean), default false

Example For signle image instance

    
    {
      "Domain":"john-georgia",
      "Force": false
    }
    
  
For all image instances
    
    {
      "Name":"MySample",
      "Force": true
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

View Instance Log

URL: /v0.1/instance/log
Method: POST
Content type: application/json

Request:

Parameters:

Domain - domain name of image instance (string)

Example:
    
    {
      "Domain":"john-georgia"
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Display all Instances

URL: /v0.1/instance/show
Method: POST
Content type: application/json

Request:

Parameters:

Name - image name (string)

Example:
    
    {
      "Name":"MySample"
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Pause Instance

URL: /v0.1/instance/pause
Method: POST
Content type: application/json

Request:

Parameters:

Domain - domain name of image instance (string)

Example:
    
    {
      "Domain":"john-georgia"
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Resume Instance

URL: /v0.1/instance/resume
Method: POST
Content type: application/json

Request:

Parameters:

Domain - domain name of image instance (string)

Example:
    
    {
      "Domain":"john-georgia"
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Resources

Resources are images that are common to many people that aren't commonly hacked on such as databases.

Create New Resource

URL: /v0.1/resource/new
Method: POST
Content type: application/json

Request:

Parameters:
Name - resource name (string)
Owner - name of image owns resource (string)
Builtin - builtin name used for resource (string)
Example:
    
    {
      "Name": "MySqlResource",
      "Owner": "MySample",
    "Builtin": "mysql"
  }
  
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Display Resources

URL: /v0.1/resource/list
Method: POST
Content type: application/json

Request:

Parameters:
Owner - name of image owns resource (string)
Example:
    
    {
      "Owner": "MySample"
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Backups

Backups are block device backups of instances and can be restored at point in time.

Save Backup

URL: /v0.1/storage/save
Method: POST
Content type: application/json

Request:

Parameters:
Name - backup name (string)
Domain - domain name of image instance (string)
Example:
    
    {
      "Name": "MyBackup",
      "Domain":"john-georgia"
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Restore backup

URL: /v0.1/storage/restore
Method: POST
Content type: application/json

Request:

Parameters:
Name - backup name (string)
Domain - domain name of image instance (string)
Example:
    
    {
      "Name": "MyBackup",
      "Domain":"john-georgia"
    }
    
  

Response:

Parameters:
   
    {
    }
    
  

HTTP Codes

200 - OK. Response contains results
400 - Bad request. Wrong data
401 - Unauthorized.
404 - Not found. Missing requested data
500 - Internal server error

Show Backups

URL: /v0.1/storage/list
Method: GET
Content type: application/json

Request:

Parameters: not available
Example:
    
    {
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
401 - Unauthorized.
500 - Internal server error

Volumes

Volumes are block devices that you can attach to instances. Typically you'll always have at least one 'system' volume which holds files that give you access to the network, however, you are free to attach multiple other volumes to help ease deployment and configuration management or if you need to store large amounts of data (such as in a database).

Unlike other cloud vendors we believe the volume is a fundamentally different animal for unikernels given that you can't ssh into a unikernel. So we enable you to do a variety of operations you might not expect to be able to do. We also don't have size limits - you can create a volume of in the kilobyte range if you need to and it is very common to do so.

Create Volume

Attach Volume

Detach Volume

Remove Volume

List Volumes

Create Volume

Download Volume

Upload Volume

System

Show Available Languages

URL: /v0.1/system/languages
Method: GET
Content type: application/json

Request:

Parameters: not available
Example:
    
    {
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
500 - Internal server error

Display all addons

URL: /v0.1/system/addons
Method: GET
Content type: application/json

Request:

Parameters: not available
Example:
    
    {
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
500 - Internal server error

Show Available Addons

URL: /v0.1/system/builtins
Method: GET
Content type: application/json

Request:

Parameters: not available
Example:
    
    {
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results
500 - Internal server error

Show Status

URL: /v0.1/system/status
Method: GET
Content type: application/json

Request:

Parameters: not available
Example:
    
    {
    }
    
  

Response:

Parameters:
   
    {

    }
    
  

HTTP Codes

200 - OK. Response contains results