Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Service API

John E. Vincent edited this page Apr 11, 2011 · 3 revisions

Service API

This is the final Service API documentation for 1.0

/services/

  • GET: returns JSON of all Service objects subgrouped by Host

    • payload: none

    • success: 200

        {
          "http": {
            "host3.domain.com": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "11",
              "links": [
      
              ],
              "status": "pending"
            },
            "host2.domain.com": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "7",
              "links": [
      
              ],
              "status": "pending"
            },
            "host1.domain.com": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "3",
              "links": [
      
              ],
              "status": "pending"
            }
          },
          "noah": {
            "localhost": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "2",
              "links": [
      
              ],
              "status": "up"
            }
          },
          "redis": {
            "localhost": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "1",
              "links": [
      
              ],
              "status": "up"
            }
          }
        }
      
    • 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.

/services/servicename

  • GET: returns JSON for all Services named servicename

    • payload: none

    • success: 200

        {
          "https": {
            "host3.domain.com": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "12",
              "links": [
      
              ],
              "status": "pending"
            },
            "host2.domain.com": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "8",
              "links": [
      
              ],
              "status": "pending"
            },
            "host1.domain.com": {
              "created_at": "2011-04-11 04:08:18 UTC",
              "updated_at": "2011-04-11 04:08:18 UTC",
              "tags": [
      
              ],
              "id": "4",
              "links": [
      
              ],
              "status": "pending"
            }
          }
        }
      
    • failure: 404

    • error: 500

  • PUT: Updates or optionally creates Service servicename. Does NOT create Host in payload.

    • require options: name, host, status

    • payload:

        {
          "name":"rundeck",
          "status":"pending",
          "host":"localhost"
        }
      
    • success: 200

        {
          "name": "rundeck",
          "result": "success",
          "action": "create",
          "id": "15",
          "host": "localhost"
        }
      
    • failure: 404

    • error: 500

  • POST: Not supported.

  • DELETE: Not supported

/services/servicename/hostname

  • GET: Returns Service servicename for Host hostname

    • payload: none

    • success: 200

        {
          "name": "rundeck",
          "updated_at": "2011-04-11 04:38:29 UTC",
          "tags": [
      
          ],
          "id": "15",
          "links": [
      
          ],
          "host": "localhost",
          "status": "pending"
        }
      
    • failure: 404

    • error: 500

  • PUT: Not supported. See Draft Host API

  • POST: Not supported. See Draft Host API

  • DELETE: Deletes Service servicename for Host hostname

    • payload: none

    • success: 200

        {
          "result": "success",
          "action": "delete",
          "id": "15",
          "host": "localhost",
          "service":"rundeck"
        }
      
    • failure: 404

    • error: 500

Clone this wiki locally