Updating Resources
Many TIBCO Cloud™ Integration API resources support PUT methods. You must supply a model for the resource that you are updating:
- If you specify an ID value, it must match the ID value in the path or an error occurs.
- If you submit a value for a property that the PUT method generates, the value you specify is ignored.
- Any other values submitted by the PUT method update the corresponding property values in the model.
If you do not want to update a property, do one of the following:
- Do not provide the property in the model
- Set the model property value to null
If you want to clear a property, provide the default, non-null value for that property in the model, as follows:
- String = “”
- Numeric = 0
- Bool = false
- DateTime = DateMin
- ID = “” OR "00000000-0000-0000-0000-000000000000"
When a PUT operation is successful, it returns the HTTP Response either a 200 or a 202 code with a success message. For example, the following updates the model to change the app description for the app ID ctpzbxd3ixndbmceudmkjfmpj42negn4 and returns a success message.
curl -X PUT "https://api.cloud.tibco.com/tci/v1/subscriptions/0/apps/ctpzbxd3ixndbmceudmkjfmpj42negn4" -H "accept: application/json" -H "Authorization: Bearer <your-oauth-token>" -H "Content-Type: application/json" -d "{\"description\":\"This is an updated test App\"}"
{ "message": "App 'ctpzbxd3ixndbmceudmkjfmpj42negn4' updated successfully" }