I’ve been using the REST API lately, which has been a bit problematic for me.
Is there a way to change a single parameter for an object from a single REST call? For example, change the database name for a data store?
I suppose what I’m after is PATCH rather than PUT, as PUT is supposed to be atomic.
At the moment it looks like you would have to:
Do a GET to get the current config
Load the response to a data structure
Merge the response with your desired change (this would be a lot easier if the JSON was standard key:value)
Do a PUT to make the merged change active
As I said I can see why PUT shouldn’t do this, but to show what I mean here is an example of it not working from a PUT:
I’ve been using the REST API lately, which has been a bit problematic for me.
Is there a way to change a single parameter for an object from a single REST call? For example, change the database name for a data store?
I suppose what I’m after is PATCH rather than PUT, as PUT is supposed to be atomic.
At the moment it looks like you would have to:
Do a GET to get the current config
Load the response to a data structure
Merge the response with your desired change (this would be a lot easier if the JSON was standard key:value)
Do a PUT to make the merged change active
As I said I can see why PUT shouldn’t do this, but to show what I mean here is an example of it not working from a PUT:
The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today. http://sdm.link/attshape