Skip to content

Instantly share code, notes, and snippets.

@fosrias
Created October 29, 2014 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fosrias/6377469bf0e1d2fd10c7 to your computer and use it in GitHub Desktop.
Save fosrias/6377469bf0e1d2fd10c7 to your computer and use it in GitHub Desktop.

FORMAT: 1A

SampleAPI

Notes API is a short texts saving service similar to its physical paper presence on your table.

Group Notes

Notes related resources of the Notes API

Notes Collection [/notes]

List all Notes [GET]

  • Response 200 (application/json)

      [{
        "id": 1, "title": "Jogging in park"
      }, {
        "id": 2, "title": "Pick-up posters from post-office"
      }]
    

Create a Note [POST]

  • Request (application/json)

      { "title": "Buy cheese and bread for breakfast." }
    
  • Response 201 (application/json)

      { "id": 3, "title": "Buy cheese and bread for breakfast." }
    

Note [/notes/{id}]

A single Note object with all its details

  • Parameters
    • id (required, number, 1) ... Numeric id of the Note to perform action with. Has example value.

Retrieve a Note [GET]

  • Response 200 (application/json)

    • Header

        X-My-Header: The Value
      
    • Body

        { "id": 2, "title": "Pick-up posters from post-office" }
      

Remove a Note [DELETE]

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