Skip to content

Worker API blueprint

John Vrbanac edited this page Aug 25, 2014 · 8 revisions

Get Version

GET http://{worker_address}/

Response:

{
    "current": "v1",
    "build": "201"
}

Get Available Worker Actions

GET http://{worker_address}/actions

Response:

{
    "available_actions": [
        "nova-soft-reboot",
        "nova-hard-reboot",
        "nova-terminate",
        "linux-service",
     ]
}

Execute Action

POST http://{worker_address}/actions/nova-soft-reboot

Request:

{
    "target": {
        {
            "name": "Apache node 2",
            "type": "cloud-server",
            "address": {
                   "nova": {
                   "name": "apache-02.ord.dev",
                "region": "DFW"
             }
        },
        "authentication": {
            "rackspace": {
                "username": "your_username",
                "api_key": "your_api_key"
            }
        }
    },
    "action": {
        "id": "2b9f9e3f-0b72-4edc-9c1d-dd643a8a4b2b",
        "type": "nova-soft-reboot",
        "parameters": {}
    }
}
Clone this wiki locally