REST API - HTTP GET Method
1 min
the http get method lets you submit a request with all request data included in the uri the response includes the requested information in the body of the response python example def list projects() \# obtain a token from our get token() function token = get token() \# build the resource uri resource uri = 'https //production blueprintcloud com/api/v1/projects' \# build the request header request header={ 'authorization' 'blueprinttoken ' + token, 'accept' 'application/json' } \# specify the uri parameters uri parameters list={ 'location' 'true' } \# create the request uri request uri = resource uri + '?' + urllib parse urlencode(uri parameters list) output requesturi(request uri) \# submit the request using http get method response = requests get(request uri, headers=request header) return response