Skip to content
This repository

Host API

This is the final Host API for release 1.0

/hosts/

  • GET: returns JSON of all Host objects including truncated (name and status) Service objects

        {
          "foo": {
            "created_at": "2011-04-20 04:50:41 UTC",
            "updated_at": "2011-04-20 04:50:41 UTC",
            "tags": [
    
            ],
            "id": "4af53f8d-36d2-2158-c4a1-514ff3578048",
            "links": [
    
            ],
            "services": {
            },
            "status": "up"
          },
          "bar": {
            "created_at": "2011-04-20 04:51:02 UTC",
            "updated_at": "2011-04-20 04:51:02 UTC",
            "tags": [
    
            ],
            "id": "5d42d211-209a-df58-d5de-bad76ab8ce21",
            "links": [
    
            ],
            "services": {
            },
            "status": "pending"
          }
        }
    
    • payload: none
    • success: 200

    • failure: 404

    • error: 500
  • PUT: Not supported. Possible future support for bulk operations

  • POST: not supported. Possible future support for bulk operations
  • DELETE: not supported.

/hosts/hostname

  • GET: returns JSON object for Host hostname including truncated Services

    • payload: none
    • success: 200

      {
        "name": "foo",
        "created_at": "2011-04-20 04:50:41 UTC",
        "updated_at": "2011-04-20 04:50:41 UTC",
        "tags": [
      
        ],
        "id": "4af53f8d-36d2-2158-c4a1-514ff3578048",
        "links": [
      
        ],
        "services": {
          "foo_service": "up"
        },
        "status": "up"
      }
      
    • failure: 404

    • error: 500
  • PUT: Updates or creates Host hostname with status in payload

    • require options: status
    • payload:

      {
        "status":"down" 
      }
      
    • success: 200

      {
        "name": "foo",
        "result": "success",
        "id": "4af53f8d-36d2-2158-c4a1-514ff3578048",
        "new_record": false,
        "status": "down"
      }
      
    • failure: 404

    • error: 500
  • POST: Not supported.

  • DELETE: Deletes Host object hostname and all dependent Service objects

    • payload: none
    • success: 200

      {
        "name": "foo",
        "result": "success",
        "id": "4af53f8d-36d2-2158-c4a1-514ff3578048",
        "service_count": "1"
      }
      

/hosts/hostname/services/servicename

  • GET: Returns Service servicename for Host hostname

    • payload: none
    • success: 200

      {
        "name": "bar_service",
        "updated_at": "2011-04-20 04:58:13 UTC",
        "tags": [
      
        ],
        "id": "c7c00132-b4b2-ad7b-f399-ded3ecc2ec48",
        "links": [
      
        ],
        "host": "bar",
        "status": "up"
      }
      
    • failure: 404

    • error: 500
  • PUT: Not supported. See Service API

  • POST: Not supported. See Service API
  • DELETE: Deletes Service object servicename from Host object hostname

    • payload: none
    • success: 200

      {
        "result": "success",
        "service": "bar_service",
        "action": "delete",
        "id": "c7c00132-b4b2-ad7b-f399-ded3ecc2ec48",
        "host": "bar"
      }
      
    • failure: 404

    • error: 500
Something went wrong with that request. Please try again.