POST Method
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 or override the DELETE method 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 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