Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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