Skip to content

Instantly share code, notes, and snippets.

@jhliberty
Forked from netmilk/apiary.md
Last active August 29, 2015 14:15
Show Gist options
  • Save jhliberty/276e2bb4a91cae79eaa7 to your computer and use it in GitHub Desktop.
Save jhliberty/276e2bb4a91cae79eaa7 to your computer and use it in GitHub Desktop.

FORMAT: X-1A

Machines API

The Example API for Dredd API Blueprint testing tool

Group Machines

Machines collection [/machines]

Create a Machine [POST]

  • Request (application/json)

      {
        "type": "bulldozer",
        "name": "willy"
      }
    
  • Response 202 (application/json)

      {
        "message": "Accepted"
      }
    

Retreive all Machines [GET]

  • Response 200 (application/json)

      [{
          "_id": "52341870ed55224b15ff07ef",
          "type": "bulldozer",
          "name": "willy"
      }]
    

Machine [/machines/{name}]

  • Parameters
    • name (required,willy)

Retrieve a Machine [GET]

  • Response 200 (application/json)

      {
        "type": "bulldozer",
        "name": "willy",
        "_id": "5229c6e8e4b0bd7dbb07e29c"
      }
    

Delete Message [DELETE]

  • Response 204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment