Integratec API Platform
resourcePut

Replaces a resource.

There are multiple variations of this method:

resourcePut(array resourceId, object resource)

Parameters
[in]resourceIdResource ID of the resource to replace.
[in]resourceJSON 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

1 call.resourcePut(
2  [ 'companies', '1234567890' ],
3  '{ \
4  "name" : "BCC Software", \
5  "ADDRESS" : "75 Josons Dr", \
6  "CITY" : "Rochester", \
7  "STATE" : "NY", \
8  "ZIP" : "14623" \
9  }'
10 )

Request

{
"method" : "resourcePut",
"params" : [
[ "companies", "1234567890" ],
{
"name" : "BCC Software",
"ADDRESS" : "75 Josons Dr",
"CITY" : "Rochester",
"STATE" : "NY",
"ZIP" : "14623"
}
]
}

Reply

{
"result" : null
}

resourcePut(array resourceId, array names, array values)

Parameters
[in]resourceIdResource ID of the resource to replace.
[in]namesProperty names of the JSON object representation of the resource to replace.
[in]valuesProperty 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

1 call.resourcePut(
2  [ 'companies', '1234567890' ],
3  [ 'name', 'ADDRESS', 'CITY', 'STATE', 'ZIP' ],
4  [ 'BCC Software', '75 Josons Dr', 'Rochester', 'NY", '14623' ]
5 )

Request

{
"method" : "resourcePut",
"params" : [
[ "companies", "1234567890" ],
[ "name", "ADDRESS", "CITY", "STATE", "ZIP" ],
[ "BCC Software", "75 Josons Dr", "Rochester", "NY", "14623" ]
]
}

Reply

{
"result" : null
}