REST API - HTTP GET Method
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