Simple Test

Make your first API call

It is time to make your first test call. In this example, you will retrieve a list of Vineyards you currently have at Wine Open API.

  • To begin, your first request may look like this (Python code):
  • import http.client
    import json
        
    conn = http.client.HTTPSConnection("app.gustos.life")
        
    conn.request("GET", "/en/api/v1/vineyard/list?offset=0&limit=5&order=asc")
        
    res = conn.getresponse()
    data = res.read()
        
    parsed = json.loads(data.decode("utf-8"))
    print(json.dumps(parsed, indent=4))
  • Console output:
  • {
        "items": [
            {
                "id": 2,
                "name": "Cricova",
                "country": 1065,
                "region": "no info",
                "phone": "22604027",
                "description": "The wine cellars of Cricova is the second largest wine cellar in Moldova, after Milestii Mici (largest in the world). It boasts 120 kilometres (75 mi) of labyrinthine roadways, versus MM's 200 kilometres (120 mi), tunnels have existed under Cricova since the 15th century, when limestone was dug out to help build Chi\u015fin\u0103u. They were converted into an underground wine emporium in the 1950s.\r\n\r\nHalf of the roadways are used for wine storage. The roads are named by the wines they store. This \"wine city\" has its warehouses, tasting rooms and other facilities underground. It goes down to 100 metres (330 ft) below ground and holds 1.25 million bottles of rare wine. The oldest wine dates back to 1902. The temperature is maintained at about 12 \u00b0C (54 \u00b0F) all year round (which is perfect for wine). The winery was used for hiding Jews in wine barrels during the Nazi invasion of the Soviet Union.\r\n\r\nLegend has it that in 1966 cosmonaut Yuri Gagarin entered the cellars, re-emerging (with assistance) two days later. Russian president Vladimir Putin celebrated his 50th birthday there.[1]\r\n\r\nThe territory used to be a mine for limestone, a building material. In some branches excavation is still active, so the cellar is still growing. Other famous wineries in Moldova include Coju\u015fna and Mile\u015ftii Mici.\r\n\r\nThe largest importer of Cricova wines is Kazakhstan. Previously Russia was the main importer, however this changed in 2014 when Russia imposed embargoes on Moldovan wine in retaliation for Moldova making moves towards joining the European Union.",
                "logo": {
                    "name": "1426513_586950411354402_55560215_n-1.jpg",
                    "url": "https://app.gustos.life/files/vineyard/1426513_586950411354402_55560215_n-1.jpg",
                    "mime": "image/jpeg"
                },
                "created": 1534165542,
                "updated": 1544440645,
                "website": "www.cricova.md",
                "photos": [
                    {
                        "name": "2128907_w640_h640_b9v4078.jpg",
                        "url": "https://app.gustos.life/files/vineyard/additional/2128907_w640_h640_b9v4078.jpg",
                        "mime": "image/jpeg"
                    },
                    {
                        "name": "Cricova_cellar_winery__6____Copy.jpg",
                        "url": "https://app.gustos.life/files/vineyard/additional/Cricova_cellar_winery__6____Copy.jpg",
                        "mime": "image/jpeg"
                    },
                    {
                        "name": "wine-tour-to-cricova-winery-from-chisinau-in-cricova-274631.jpg",
                        "url": "https://app.gustos.life/files/vineyard/additional/wine-tour-to-cricova-winery-from-chisinau-in-cricova-274631.jpg",
                        "mime": "image/jpeg"
                    },
                    {
                        "name": "welcome-to-cricova-and.jpg",
                        "url": "https://app.gustos.life/files/vineyard/additional/welcome-to-cricova-and.jpg",
                        "mime": "image/jpeg"
                    }
                ]
            },
            {
                "id": 3,
                "name": "Chateau de Hanaseni",
                "country": 1065,
                "region": "Haneseni, Cantemir district",
                "phone": "+37360001122",
                "description": "The winery \"Imperial Vin\" (until 1998 the name \"Strugur Solaris\") was founded in 1977. The winery is located in the south of Moldova, between the villages Pleshen and Haneseni, Cantemir district. Vineyards are located along the river \"Prut\", near to specially protected landscape reserve \"Codrii Tigheciului\".\r\n\r\nThe sum of active temperatures ranges from 3,100 oC in the Codru area to 3,300-3,400 oC in the Prut areas. Monthly average temperature of the warmest month - July  is from +22 to +25 oC. The coldest temperature in winter is from -18.5 to -21.5 \u00b0 C. The duration of the vegetation period is 180 days, during which 270 mm of precipitation falls.",
                "logo": {
                    "name": "logo.png",
                    "url": "https://app.gustos.life/files/vineyard/logo.png",
                    "mime": "image/png"
                },
                "created": 1535706149,
                "updated": 1535706450
            },
            ...
        ],
        "count": 5,
        "total": 190
    }

Get to know the API

Now that you learned how to use our API, you may want to take a look to our complete API References.

API Libraries

Get Python API Library
Get C# API Library