The HTTP PATCH method allows you to update information based on data that you include in the body of the request.

For example, here is a list of artifacts included in the request body (in JSON format):

"Id": 220914,
"Properties": [
"PropertyTypeId": 9988,
"TextOrChoiceValue": "Traveler Booking 1"

XML data in the request body must adhere to the Blueprint REST API XML Schema.

Why should I do if I cannot use the PATCH method?

In some environments, the firewall may not support the PATCH method, or the PATCH method may be disabled. It is possible to use HTTP POST method instead of HTTP PATCH.

To submit information using the HTTP POST method instead of HTTP PATCH, you must add the following information to the request header to override the PATCH method:

X-HTTP-Method-Override: PATCH

Python Example

Below is a python example that submits an Update Artifacts request using the PATCH method.

def update_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 = '' + project_id + '/artifacts/'

# specify header parameters
'Authorization' : 'BlueprintToken ' + token,
'Accept' : 'application/json',
'Content-Type' : 'text/json'

# specify the uri parameters

# create the request uri with the uri parameters
request_uri = resource_uri + '?' + urllib.parse.urlencode(uri_parameters_list)

# the request body would generally built from external data instead of hardcoding it
# for demonstration purposes, an example is provided in both xml and json format
artifactid_to_update = "220914"
propertyid_to_update = "9988"
new_property_value = "Traveler Booking 1"
xml_request_body = ('''
<Artifacts xmlns:i="" xmlns="">
''')% (artifactid_to_update, propertyid_to_update, new_property_value)
json_request_body = ('''
"Id": %s,
"Properties": [
"PropertyTypeId": %s,
"TextOrChoiceValue": "%s"
''')% (artifactid_to_update, propertyid_to_update, new_property_value)
# set the request body to the proper format for Content-Type:text/json

# submit the request using HTTP PATCH method
response = requests.patch(request_uri, request_body, headers=request_header)

return response