bottle

List all bottles in account optionally filtering by year

get/cellar/accounts/{accountID}/bottles

Request

  • Base URL
    http://localhost:8081
  • URL
    http://localhost:8081/cellar/accounts/{accountID}/bottles
  • Auth
    none declared

Path parameters

accountIDinteger required

Account ID

Query parameters

yearsinteger[]

Filter by years

Response

OK

hrefstring required

API href of bottle

idinteger required

ID of bottle

namestring required
ratinginteger

Rating of bottle between 1 and 5

varietalstring required
vineyardstring required
vintageinteger required

Example response

[
  {
    "account": {
      "href": "/accounts/1",
      "id": 1,
      "name": "test"
    },
    "href": "/accounts/1/bottles/1",
    "id": 1,
    "links": {
      "account": {
        "href": "/accounts/1",
        "id": 1
      }
    },
    "name": "Number 8",
    "rating": 3,
    "varietal": "Merlot",
    "vineyard": "Asti",
    "vintage": 2012
  },
  {
    "account": {
      "href": "/accounts/1",
      "id": 1,
      "name": "test"
    },
    "href": "/accounts/1/bottles/1",
    "id": 1,
    "links": {
      "account": {
        "href": "/accounts/1",
        "id": 1
      }
    },
    "name": "Number 8",
    "rating": 3,
    "varietal": "Merlot",
    "vineyard": "Asti",
    "vintage": 2012
  }
]

Changes