Skip to content

Instantly share code, notes, and snippets.

@netmilk
Created October 8, 2013 14:08
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save netmilk/6885268 to your computer and use it in GitHub Desktop.
Save netmilk/6885268 to your computer and use it in GitHub Desktop.
Super simple example API Blueprint for testing REST APIs demo

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