Replaces a resource.
There are multiple variations of this method:
resourcePut(array resourceId, object resource)
- Parameters
-
[in] | resourceId | Resource ID of the resource to replace. |
[in] | resource | JSON object representation of the resource to replace. |
- Returns
- The return value is
null
.
- Usage
- The resource must not be a collection.
- Properties that are not specified are initialized to
null
. If a property is required, it must be given a value other than null
.
Examples
C#
call.resourcePut(
new string[] { "companies", "1234567890" },
"{" +
"\"name\" : \"BCC Software\", " +
"\"ADDRESS\" : \"75 Josons Dr\", " +
"\"CITY\" : \"Rochester\", " +
"\"STATE\" : \"NY\", " +
"\"ZIP\" : \"14623\" " +
"}"
);
Python
2 [
'companies',
'1234567890' ],
4 "name" : "BCC Software", \ 5 "ADDRESS" : "75 Josons Dr", \ 6 "CITY" : "Rochester", \ Request
{
"method" : "resourcePut",
"params" : [
[ "companies", "1234567890" ],
{
"name" : "BCC Software",
"ADDRESS" : "75 Josons Dr",
"CITY" : "Rochester",
"STATE" : "NY",
"ZIP" : "14623"
}
]
}
Reply
resourcePut(array resourceId, array names, array values)
- Parameters
-
[in] | resourceId | Resource ID of the resource to replace. |
[in] | names | Property names of the JSON object representation of the resource to replace. |
[in] | values | Property values of the JSON object representation of the resource to replace. |
- Returns
- The return value is
null
.
- Usage
- The resource must not be a collection.
- Properties that are not specified are initialized to
null
. If a property is required, it must be given a value other than null
.
Examples
C#
call.resourcePut(
new string[] { "companies", "1234567890" ],
new string[] { "name", "ADDRESS", "CITY", "STATE", "ZIP" },
new string[] { "BCC Software", "75 Josons Dr", "Rochester", "NY", "14623" }
);
Python
2 [
'companies',
'1234567890' ],
3 [
'name',
'ADDRESS',
'CITY',
'STATE',
'ZIP' ],
4 [
'BCC Software',
'75 Josons Dr',
'Rochester',
'NY", '14623
' ] Request
{
"method" : "resourcePut",
"params" : [
[ "companies", "1234567890" ],
[ "name", "ADDRESS", "CITY", "STATE", "ZIP" ],
[ "BCC Software", "75 Josons Dr", "Rochester", "NY", "14623" ]
]
}
Reply