REST API - HTTP POST Method
3 min
the http post method allows you to submit a request with request data included in both the uri and the body of the request the response includes the requested information in the body of the response if you are interested in using post instead of patch or delete, read more about how you can override the patch method docid\ rcjvhrlby6de zgkehxui or override the delete method docid\ vnmdtbrg59iwf4suh4zey and use the post method instead method override example for example, if you want to include the filter # parameter in your request, you must override the get method and use post instead to submit information using the http post method, you must add the following information to the request header to override the get method x http method override get then, you can include request data in the request body for example, the filter docid\ sv9gjverxczcgqdn28j7u parameter is always included in the request body using the http post method filter={artifact type eq (‘ui mockup'); python example def list artifacts() \# obtain a token from our get token() function token = get token() \# of course, this id would generally come from somewhere else instead of hardcoding it project id = "220870" \# build the resource uri for listing artifacts in a given project resource uri = 'https //production blueprintcloud com/api/v1/projects/' + project id + '/artifacts' \# specify header parameters request header={ 'authorization' 'blueprinttoken ' + token, 'accept' 'application/json', 'x http method override' 'get' } \# specify the uri parameters uri parameters list={ } \# create the request uri with the uri parameters request uri = resource uri + '?' + urllib parse urlencode(uri parameters list) output requesturi(request uri) \# create the request body request body = "filter={artifact type eq 'business process diagram';}" output requestbody(request body) \# submit the request using http post method response = requests post(request uri, request body, headers=request header) return response