Canopy-Vision API
Get single dataset
1min
code examples curl location globoff '/api/datasets/{id}' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("/api/datasets/{id}", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("/api/datasets/{id}") http = net http new(url host, url port); request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = http request(request) puts response read body import requests import json url = "/api/datasets/{id}" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // ok { "annotations" \[ { "bounding boxes" \[ { "class label" "", "height" 0, "width" 0, "x" 0, "y" 0 } ], "class label" "", "dataset id" 0, "id" 0, "image id" 0 } ], "id" 0, "name" "", "type" "" }// bad request { "message" "" }// internal server error { "message" "" }