Back to top

The Codero API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate the result of the API calls. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients. All responses will be returned in JSON, including errors.

API Endpoint: https://apis.codero.com

You can make use of Unirest’s lightweight HTTP libraries.

Authentication

Authentication to the Codero API is achieved by providing your API key in the request. All API requests must utilize HTTPS; any calls made via HTTP will fail. All requests to the API must be authenticated with your API key. For example:

curl -X GET "https://apis.codero.com/cloud/v1/servers" \
     -H "Authorization: <APIKEY>" \
     -m 30 \
     -v \

Errors

Codero uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Codero’s servers.

HTTP Status Code Summary

  • 200 OK - Everything worked as expected.
  • 202 Accepted - Request was accepted and a job ID has been returned.
  • 400 Bad Request - Often missing a required parameter.
  • 401 Unauthorized - No valid API key provided.
  • 402 Request Failed - Parameters were valid but request failed.
  • 404 Not Found - The requested item doesn’t exist.
  • 500, 502, 503, 504 Server errors - something went wrong on Codero’s end.

API Methods


Cloud 

A server is a virtual machine (VM) instance in the Codero Public Cloud environment. Here are the different calls you can perform to the API to manage your servers.

The current version of the Cloud API is v1.

Codelets

A codelet is a combination of an OS template with a certain disk size, RAM and CPU cores. The Create New Server API call requires a codelet as a parameter.

Codelet List 

List Codelets
/cloud/v1/codelets/

Retrieve all available codelets. Add any combination of filters as query parameters to narrow results.

Available filter options include operating system, disk size, number of cores, and RAM.

  • Parameters
  • os
    string (optional) Example: centos

    Desired OS

    Choices: centos ubuntu debian windows 12.04 etc. 

    disk
    number (optional) Example: 20

    Desired disk size

    cores
    number (optional) Example: 1

    Desired CPU cores

    ram
    number (optional) Example: 512

    Desired RAM

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/cloud/v1/codelets?ram=1024&os=windows" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
      "data": [
            {
              "bandwidth": 2,
              "codelet": "MwcgtgC0IOhdUDl2uk+KV2EhJ7A=",
              "cores": 1,
              "disk": 40,
              "os": "Windows Server 2008",
              "per_hour": 0.028,
              "per_month": 18.0,
              "ram": 1024
            },
            {
              "bandwidth": 3,
              "codelet": "obs0ZnsOBT1AmsYcMN0+ypTEcfA=",
              "cores": 2,
              "disk": 80,
              "os": "Windows Server 2008 w/ MSSQL 2008 Standard",
              "per_hour": 0.056,
              "per_month": 36.0,
              "ram": 2048
            },
            ...
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }  
    

Codelet Options List 

Codelet Options List
/cloud/v1/codelets/{os | disk | ram | cores}

Each codelet filter option (os, ram, disk, and cores) has a valid set of arguments that can be listed directly. In this way one can get a general lay of the land before filtering.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/cloud/v1/codelets/os" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
      "data": [
            {
              "id": 2700,
              "name": "Fedora 20",
              "price": {
                "hourly": 0.0,
                "monthly": 0.0
              },
              "type": "Fedora",
              "version": "20"
            },
            {
              "id": 2520,
              "name": "Windows 2012 w/ SQL 2008 Std",
              "price": {
                "hourly": 0.4493,
                "monthly": 328.0
              },
              "type": "Windows",
              "version": "2012 w/ SQL 2008 Std"
            },
            ...
        ]
    }
    

Servers 

Server List
/cloud/v1/servers

Get a list of servers.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/cloud/v1/servers" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Example
    {
        "data": [
            {
                "domain": "20185",
                "domainid": "d4544eef-c7a3-4323-bedd-5196187d6f09",
                "templatename": "Ubuntu 12.04 20GB",
                "zoneid": "b756d586-a020-4e10-897f-149ce89a28f2",
                "cpunumber": 1,
                "passwordenabled": true,
                "instancename": "i-138-2160-VM",
                "id": "329e7b7b-9b81-4c12-bc1b-add8dd7eea13",
                "networkkbswrite": 5,
                "cpuused": "0.16%",
                "publicip": "64.150.179.90",
                "state": "Running",
                "guestosid": "8aaf616c-f916-4a53-8194-8ff8582958af",
                "details": {
                    "ip": "64.150.179.90",
                    "servicenet_ip": "10.144.0.68",
                    "nat_ip": "10.1.1.94",
                    "osName": "",
                    "serviceId": "",
                    "osVer": ""
                },
                "memory": 512,
                "serviceofferingid": "589c2d0a-5d6b-4d37-8242-1259579e7598",
                "zonename": "OPZoneOne",
                "displayname": "newserver",
                "nic": [{
                    "networkid": "5b991941-2bd3-4222-8f4b-b4d5ae2c04eb",
                    "macaddress": "06:23:fa:00:02:15",
                    "type": "Isolated",
                    "id": "65ad6d1c-f181-4aaf-849e-eb58c396f571",
                    "traffictype": "Guest",
                    "netmask": "255.255.255.224",
                    "ipaddress": "10.144.0.68",
                    "gateway": "10.144.0.65",
                    "isdefault": false
                }, {
                    "networkid": "dcbe434a-aeae-4a7f-9cfd-ea27f0848128",
                    "macaddress": "02:00:66:f1:00:49",
                    "type": "Isolated",
                    "id": "d9e70a65-4185-4ea5-8430-1b70adbeabf1",
                    "traffictype": "Guest",
                    "netmask": "255.255.255.0",
                    "ipaddress": "10.1.1.94",
                    "gateway": "10.1.1.1",
                    "isdefault": true
                }],
                "cpuspeed": 500,
                "templateid": "85038390-59e7-4d1f-b207-8009493f168d",
                "account": "20185",
                "hostid": "ea87a0c2-6308-4e1f-9b02-bb7a18b0fa11",
                "name": "newserver",
                "networkkbsread": 13,
                "created": "2014-04-22T11:53:05-0700",
                "publicipid": "715c74de-1db3-49c0-8fa2-1f536fcbb929",
                "serviceofferingname": "1 Core 512MB ",
                "templatedisplaytext": "Ubuntu 12.04"
            },
            {
                "domain": "20185",
                "domainid": "d4544eef-c7a3-4323-bedd-5196187d6f09",
                "templatename": "Ubuntu 12.04 20GB",
                "zoneid": "b756d586-a020-4e10-897f-149ce89a28f2",
                "cpunumber": 1,
                "passwordenabled": true,
                "instancename": "i-138-2161-VM",
                "id": "329e7b7b-9b81-4c12-bc1b-add8dd7eea14",
                "networkkbswrite": 5,
                "cpuused": "0.16%",
                "publicip": "64.150.179.91",
                "state": "Running",
                "guestosid": "8aaf616c-f916-4a53-8194-8ff8582958af",
                "details": {
                    "ip": "64.150.179.91",
                    "servicenet_ip": "10.144.0.69",
                    "nat_ip": "10.1.1.95",
                    "osName": "",
                    "serviceId": "",
                    "osVer": ""
                },
                "memory": 512,
                "serviceofferingid": "589c2d0a-5d6b-4d37-8242-1259579e7598",
                "zonename": "OPZoneOne",
                "displayname": "newserver2",
                "nic": [{
                    "networkid": "5b991941-2bd3-4222-8f4b-b4d5ae2c04eb",
                    "macaddress": "06:23:fa:00:02:15",
                    "type": "Isolated",
                    "id": "65ad6d1c-f181-4aaf-849e-eb58c396f571",
                    "traffictype": "Guest",
                    "netmask": "255.255.255.224",
                    "ipaddress": "10.144.0.69",
                    "gateway": "10.144.0.65",
                    "isdefault": false
                }, {
                    "networkid": "dcbe434a-aeae-4a7f-9cfd-ea27f0848128",
                    "macaddress": "02:00:66:f1:00:49",
                    "type": "Isolated",
                    "id": "d9e70a65-4185-4ea5-8430-1b70adbeabf1",
                    "traffictype": "Guest",
                    "netmask": "255.255.255.0",
                    "ipaddress": "10.1.1.95",
                    "gateway": "10.1.1.1",
                    "isdefault": true
                }],
                "cpuspeed": 500,
                "templateid": "85038390-59e7-4d1f-b207-8009493f168d",
                "account": "20185",
                "hostid": "ea87a0c2-6308-4e1f-9b02-bb7a18b0fa11",
                "name": "newserver",
                "networkkbsread": 13,
                "created": "2014-04-22T11:53:05-0700",
                "publicipid": "715c74de-1db3-49c0-8fa2-1f536fcbb930",
                "serviceofferingname": "1 Core 512MB ",
                "templatedisplaytext": "Ubuntu 12.04"
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
Create New Server
/cloud/v1/servers

ASYNC

Create a new server. You must specify a name and codelet reference. Optional parameters include billing terms and region.

This asynchronous call will return a job ID. You can check the job status with the Job API.

  • Parameters
  • name
    string (required) Example: www1

    Desired server name. The name can only contain alphanumeric characters and dashes. The name: must be less than 64 characters in length, must start with a letter and must not end with a dash.

    codelet
    string (required) Example: unfyCIAXboS0MXiMXDgF4WxnMNI=

    Codelet reference

    billing
    string (optional) Default: hourly Example: hourly

    Desired billing terms

    Choices: monthly hourly 

    region
    string (optional) Default: phx1 Example: phx1

    Desired region ID. Available regions may be retrieved with the Regions API

    Choices: us-west us-central 

  • Request  headers and bodyToggle
  • Headers
    Authorization: <APIKEY>
    Example
    {
        "name": "<servername>",
        "codelet": "<codelet reference>"
    }
    
  • Request  curl exampleToggle
  • Example
    curl -X POST "https://apis.codero.com/cloud/v1/servers" \
         -H "Content-Type: application/json" \
         -H "Authorization: <APIKEY>" \
         -d "{\"name\":\"www1\",\"codelet\":\"unfyCIAXboS0MXiMXDgF4WxnMNI=\"}" \
         -m 30 \
         -v \
    
  • Response  202Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": {
            "job_id": "b7d4261a-0efc-479d-a0d1-4376376b3c9c",
            "vm_id": "a9358548-4103-4762-9524-45de903728b7"
        }
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    

Server 

Server Details
/cloud/v1/servers/{id}

Get server details. A server’s ID may be obtained from the List Servers API.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/cloud/v1/servers/329e7b7b-9b81-4c12-bc1b-add8dd7eea13" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Example
    {
        "data": [
            {
                "domain": "20185",
                "domainid": "d4544eef-c7a3-4323-bedd-5196187d6f09",
                "templatename": "Ubuntu 12.04 20GB",
                "zoneid": "b756d586-a020-4e10-897f-149ce89a28f2",
                "cpunumber": 1,
                "passwordenabled": true,
                "instancename": "i-138-2160-VM",
                "id": "329e7b7b-9b81-4c12-bc1b-add8dd7eea13",
                "networkkbswrite": 5,
                "cpuused": "0.16%",
                "publicip": "64.150.179.90",
                "state": "Running",
                "guestosid": "8aaf616c-f916-4a53-8194-8ff8582958af",
                "details": {
                    "ip": "64.150.179.90",
                    "servicenet_ip": "10.144.0.68",
                    "nat_ip": "10.1.1.94",
                    "osName": "",
                    "serviceId": "",
                    "osVer": ""
                },
                "memory": 512,
                "serviceofferingid": "589c2d0a-5d6b-4d37-8242-1259579e7598",
                "zonename": "OPZoneOne",
                "displayname": "newserver",
                "nic": [{
                    "networkid": "5b991941-2bd3-4222-8f4b-b4d5ae2c04eb",
                    "macaddress": "06:23:fa:00:02:15",
                    "type": "Isolated",
                    "id": "65ad6d1c-f181-4aaf-849e-eb58c396f571",
                    "traffictype": "Guest",
                    "netmask": "255.255.255.224",
                    "ipaddress": "10.144.0.68",
                    "gateway": "10.144.0.65",
                    "isdefault": false
                }, {
                    "networkid": "dcbe434a-aeae-4a7f-9cfd-ea27f0848128",
                    "macaddress": "02:00:66:f1:00:49",
                    "type": "Isolated",
                    "id": "d9e70a65-4185-4ea5-8430-1b70adbeabf1",
                    "traffictype": "Guest",
                    "netmask": "255.255.255.0",
                    "ipaddress": "10.1.1.94",
                    "gateway": "10.1.1.1",
                    "isdefault": true
                }],
                "cpuspeed": 500,
                "templateid": "85038390-59e7-4d1f-b207-8009493f168d",
                "account": "20185",
                "hostid": "ea87a0c2-6308-4e1f-9b02-bb7a18b0fa11",
                "name": "newserver",
                "networkkbsread": 13,
                "created": "2014-04-22T11:53:05-0700",
                "publicipid": "715c74de-1db3-49c0-8fa2-1f536fcbb929",
                "serviceofferingname": "1 Core 512MB ",
                "templatedisplaytext": "Ubuntu 12.04"
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    
Destroy Server
/cloud/v1/servers/{id}

ASYNC

Destroy server. A server’s ID may be obtained from the List Servers API.

This asynchronous call will return a job id. You can check the job status with the Job API.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X DELETE "https://apis.codero.com/cloud/v1/servers/329e7b7b-9b81-4c12-bc1b-add8dd7eea13" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  202Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                "id": "27844397-168d-4b65-b22e-3fc690d9f2ce",
                "links": [
                    {
                        "description": "Retrieve a job",
                        "method": "GET",
                        "relative_url": "/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce",
                        "url": "https://apis.codero.com/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce"
                    }
                ]
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    
Start Server
/cloud/v1/servers/{id}

ASYNC

Start server. A server’s ID may be obtained from the List Servers API.

This asynchronous call will return a job id. You can check the job status with the Job API.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X PUT "https://apis.codero.com/cloud/v1/servers/329e7b7b-9b81-4c12-bc1b-add8dd7eea13/start" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  202Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                "id": "27844397-168d-4b65-b22e-3fc690d9f2ce",
                "links": [
                    {
                        "description": "Retrieve a job",
                        "method": "GET",
                        "relative_url": "/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce",
                        "url": "https://apis.codero.com/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce"
                    }
                ]
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    
Stop Server
/cloud/v1/servers/{id}

ASYNC

Stop server. A server’s ID may be obtained from the List Servers API.

This asynchronous call will return a job id. You can check the job status with the Job API.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X PUT "https://apis.codero.com/cloud/v1/servers/329e7b7b-9b81-4c12-bc1b-add8dd7eea13/stop" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  202Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                "id": "27844397-168d-4b65-b22e-3fc690d9f2ce",
                "links": [
                    {
                        "description": "Retrieve a job",
                        "method": "GET",
                        "relative_url": "/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce",
                        "url": "https://apis.codero.com/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce"
                    }
                ]
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    
Reboot Server
/cloud/v1/servers/{id}

ASYNC

Reboot server. A server’s ID may be obtained from the List Servers API.

This asynchronous call will return a job id. You can check the job status with the Job API.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X PUT "https://apis.codero.com/cloud/v1/servers/329e7b7b-9b81-4c12-bc1b-add8dd7eea13/reboot" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  202Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                "id": "27844397-168d-4b65-b22e-3fc690d9f2ce",
                "links": [
                    {
                        "description": "Retrieve a job",
                        "method": "GET",
                        "relative_url": "/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce",
                        "url": "https://apis.codero.com/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce"
                    }
                ]
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    
Reset Password for Server
/cloud/v1/servers/{id}

ASYNC

Reset password for server. A server’s ID may be obtained from the List Servers API.

This asynchronous call will return a job id. You can check the job status with the Job API.

The new password will be provided with the job results and will take effect after the server has been rebooted.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X PUT "https://apis.codero.com/cloud/v1/servers/329e7b7b-9b81-4c12-bc1b-add8dd7eea13/reset_password" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  202Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                "id": "27844397-168d-4b65-b22e-3fc690d9f2ce",
                "links": [
                    {
                        "description": "Retrieve a job",
                        "method": "GET",
                        "relative_url": "/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce",
                        "url": "https://apis.codero.com/cloud/v1/jobs/27844397-168d-4b65-b22e-3fc690d9f2ce"
                    }
                ]
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    

Jobs 

Asynchronous calls to the Codero API generate a job id that can be used to check the status and ultimately get the result of a long running process.

Job List 

List all Jobs
/jobs/v1/

List all completed, processing, and pending jobs.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/cloud/v1/jobs/f56827eb-9bf1-4137-877b-b2495cab0cce" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                ...
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    

Job Details 

Job Details
/jobs/v1/{id}

Get job details for specific job.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/cloud/v1/jobs/f56827eb-9bf1-4137-877b-b2495cab0cce" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                ...
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    

Hybrid Networks 

A hybrid network group links physical and virtual networks so that servers on these networks can communicate with each other instead of being restricted to their own network.

The current version of the Hybrid API is v1.

Network List 

List all networks and pertinent details. Servers listed under a network can intercommunicate.

List Networks
/hybrid/v1/networks

Retrieve a list of networks.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/hybrid/v1/networks" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Example
    {
      "data": [
        {
          "datacenter": "PHN3110B50",
          "distribution_group": "cloud1",
          "group_id": null,
          "id": "AAhatpW8w53Y6AMUrHZl28Cq8V4",
          "links": [
            {
              "description": "Retrieve a network",
              "method": "GET",
              "relative_url": "/hybrid/v1/networks/AAhatpW8w53Y6AMUrHZl28Cq8V4",
              "url": "https://apis.codero.com/hybrid/v1/networks/AAhatpW8w53Y6AMUrHZl28Cq8V4"
            },
            {
              "description": "Retrieve networks",
              "method": "GET",
              "relative_url": "/hybrid/v1/networks/",
              "url": "https://apis.codero.com/hybrid/v1/networks/"
            }
          ],
          "servers": [
            {
              "description": "demo-app",
              "group_ip": null,
              "service_id": 1911163,
              "type": "cloud"
            },
            ...
          ],
          "vlan_number": "2002"
        },
        {
          "datacenter": "PHN3110B50",
          "distribution_group": "dg4",
          "group_id": "1000000",
          "id": "mKiu4nvTaunldoAxdltOOV5ffpY",
          "links": [
            {
              "description": "Retrieve a network",
              "method": "GET",
              "relative_url": "/hybrid/v1/networks/mKiu4nvTaunldoAxdltOOV5ffpY",
              "url": "https://apis.codero.com/hybrid/v1/networks/mKiu4nvTaunldoAxdltOOV5ffpY"
            },
            {
              "description": "Retrieve networks",
              "method": "GET",
              "relative_url": "/hybrid/v1/networks/",
              "url": "https://apis.codero.com/hybrid/v1/networks/"
            }
          ],
          "servers": [
            {
              "description": "Dell T110",
              "group_ip": "192.168.117.5",
              "service_id": 194440,
              "type": "dedicated"
            },
          ],
          "vlan_number": "1150"
        }, ...
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    

Groups List 

Retrieve a list of Grouped Networks. Networks listed within the group can intercommunicate.

Network Groups List
/hybrid/v1/groups

List Network Groups.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/hybrid/v1/groups" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Example
    {
      "data": [
        {
          "id": "1000000",
          "links": [
            {
              "description": "Retrieve a group",
              "method": "GET",
              "relative_url": "/hybrid/v1/groups/1000000",
              "url": "https://apis.codero.com/hybrid/v1/groups/1000000"
            },
            {
              "description": "Update a group",
              "method": "PUT",
              "relative_url": "/hybrid/v1/groups/1000000",
              "url": "https://apis.codero.com/hybrid/v1/groups/1000000"
            },
            {
              "description": "Remove a group",
              "method": "DELETE",
              "relative_url": "/hybrid/v1/groups/1000000",
              "url": "https://apis.codero.com/hybrid/v1/groups/1000000"
            },
            {
              "description": "Retrieve groups",
              "method": "GET",
              "relative_url": "/hybrid/v1/groups/",
              "url": "https://apis.codero.com/hybrid/v1/groups/"
            }
          ],
          "name": "My Hybrid Network(cid20185-3)",
          "networks": [
            {
              "datacenter": "PHN3110B50",
              "network_id": "mKiu4nvTaunldoAxdltOOV5ffpY"
            }
          ],
          "service_id": 774324,
          "speed": "10"
        }, ...
            ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    

Group Details 

Group Details
/hybrid/v1/groups/{id}

Get details for specific Network Group.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/hybrid/v1/groups/{id}" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Example
    {
      "data": [
        {
          "id": "1000000",
          "links": [
            {
              "description": "Retrieve a group",
              "method": "GET",
              "relative_url": "/hybrid/v1/groups/1000000",
              "url": "https://apis.codero.com/hybrid/v1/groups/1000000"
            },
            {
              "description": "Update a group",
              "method": "PUT",
              "relative_url": "/hybrid/v1/groups/1000000",
              "url": "https://apis.codero.com/hybrid/v1/groups/1000000"
            },
            {
              "description": "Remove a group",
              "method": "DELETE",
              "relative_url": "/hybrid/v1/groups/1000000",
              "url": "https://apis.codero.com/hybrid/v1/groups/1000000"
            },
            {
              "description": "Retrieve groups",
              "method": "GET",
              "relative_url": "/hybrid/v1/groups/",
              "url": "https://apis.codero.com/hybrid/v1/groups/"
            }
          ],
          "name": "My Hybrid Network(cid20185-3)",
          "networks": [
            {
              "datacenter": "PHN3110B50",
              "network_id": "mKiu4nvTaunldoAxdltOOV5ffpY"
            }
          ],
          "service_id": 774324,
          "speed": "10"
        }, ...
            ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
      "data": {
        "message": "there is no group with id 'FF' []"
      },
      "status_code": 404,
      "success": false,
      "time_stamp": 1414787974,
      "transaction": "RjoxZQ"
    }
    
Edit Network Group
/hybrid/v1/groups/{id}

ASYNC

Assign a network to a network group.

  • Parameters
  • networks
    array (required) 

    A list of network IDs to be assigned to the network group.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
    Example
    {
        "networks": [
            "mKiu4nvTaunldoAxdltOOV5ffpY"
        ]
    }
    
  • Request  curl exampleToggle
  • Example
    curl -X PUT "https://apis.codero.com/hybrid/v1/groups/{id}" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
         -d "{\"networks\":[\"mKiu4nvTaunldoAxdltOOV5ffpY\"]}"
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                "added": [
                  "mKiu4nvTaunldoAxdltOOV5ffpY"
                ],
                "current": [
                  "mKiu4nvTaunldoAxdltOOV5ffpY"
                ],
                "removed": []
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": {
            "message": "there is no group with id 'FF' []"
        },
        "status_code": 404,
        "success": false,
        "time_stamp": 1414787974,
        "transaction": "RjoxZQ"
    }
    

Storage 

Codero Elastic Block Storage is completely flexible, enabling you to scale your performance (IOPS) up or down as needed.

The current version of the Storage API is v1.

Blocks 

Get a list of Block Storage devices.

Block Storage List
/storage/v1/blocks

Get a list of Block Storage.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/storage/v1/blocks" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Example
    {
      "data": [
        {
        ...
        }, ...
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    

Block Storage Detals 

Get Block Storage Details
/storage/v1/blocks/{id}

Get details for specific Block Storage.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/storage/v1/blocks/{id}" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Example
    {
      "data": [
        {
        ...
        }, ...
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    
Edit Block Storage
/storage/v1/blocks/{id}

Edit Block Storage parameters. Attach or detach Block Storage to or from a server.

  • Parameters
  • server_id
    string (optional) Example: "143552"

    Desired attached server ID.

    iops
    number (optional) Example: 2000

    Desired minimum IOPs. Only upgrades are available.

    size
    number (optional) Example: 512

    Desired capacity in Gigabytes. Only upgrades are available.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X PUT "https://apis.codero.com/storage/v1/blocks/{id}" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
         -d "{\"server_id\":\"143552\"}"
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": [
            {
                "attached_to": "143552",
            }
        ]
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    
Delete Block Storage
/storage/v1/blocks/{id}

Delete Block Storage.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X DELETE "https://apis.codero.com/storage/v1/blocks/{id}" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "data": {
            "removed": [
            ...
            ]
        }
    }
    
  • Response  401Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Unauthorized",
        "message": "Access Denied"
    }
    
  • Response  404Toggle
  • Headers
    Content-Type: application/json
    Example
    {
        "error": "Not Found",
        "message": "Not Found"
    }
    

Services 

General information shared among different services is grouped here.

The current version of the Services API is v1.

Regions 

Services can be located at different geographical regions.

List Regions
/services/v1/regions

Retrieve all currently available regions and their details.

  • Request  headersToggle
  • Headers
    Authorization: <APIKEY>
  • Request  curl exampleToggle
  • Example
    curl -X GET "https://apis.codero.com/services/v1/regions/" \
         -H "Authorization: <APIKEY>" \
         -m 30 \
         -v \
    
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Example
    {
      "data": [
            {
              "id": "us-west",
              "name": "US West",
              "services": [
                 "cloud",
                 "hybrid",
                 "block"
              ]
            },
            ...
        ]
    }
    

Generated by aglio on 19 Feb 2016