Difference between revisions of "REST API:bulk record Resource"

From AgileApps Support Wiki
imported>Aeric
(Created page with "Manage multiple Object records at one time using the REST API. === About the Record Resource === ==== Available Objects ==== :These objects are available in the bulk re...")
 
imported>Aeric
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Manage multiple [[Object]] records at one time using the [[REST API]].
Manage multiple [[Object]] records using the [[REST API]].


=== About the Record Resource ===
=== About the Bulk Record Resource ===
 
==== Number of Records ====
Your [[Service Provider]] determines the maximum number of records that can be operated on at one time. The default value (and the value supported in the cloud) is 25.


==== Available Objects ====
==== Available Objects ====
:These objects are available in the bulk record Resource
:These objects are available in the record Resource
::*{{Type}}s (except the special {{Type}}s, listed below)
::*{{Type}}s (except the special {{Type}}s, listed below)
::*{{Type|}}s
::*{{Type|}}s
Line 26: Line 29:
:* Role - use the [[REST_API:role_Resource|role Resource]]
:* Role - use the [[REST_API:role_Resource|role Resource]]
:* Team - use the [[REST_API:team_Resource|team Resource]]
:* Team - use the [[REST_API:team_Resource|team Resource]]
:* USER_TEAM use the [[REST_API:userTeam_Resource|userTeam Resource]]
:* USER_TEAM - use the [[REST_API:userTeam_Resource|userTeam Resource]]


==== Requirements ====
==== Requirements ====
Line 32: Line 35:
{{:Record Access Permissions}}
{{:Record Access Permissions}}


===Retrieve a Record===
===Add Records===
Identifies and retrieves a single record in an [[Object]]
Adds records to an [[Object]].
 
;Method:GET
;URI:
:<tt>{{platformURL}}/rest/record/{objectName}/{recordId}</tt>
:<tt>{{platformURL}}/rest/record/{objectName}/{recordId}?retrieveRecordPermissions=true</tt>
 
:where the optional [[REST API:Retrieve Record Permissions Query Parameter|Retrieve Record Permissions Query Parameter]] adds extra data that tells whether the user has add or delete capabilities.
 
;Response:
:<syntaxhighlight lang="xml" enclose="div">
<platform>
  <record>
    <field1>...value...</field1>
    <field2>...value...</field2>
    <field3 displayValue="...">...value...</field3>
        …
  </record>
</platform>
</syntaxhighlight>
:'''Notes:'''
:* An enumerated field returns the field label in the <tt>displayValue</tt> attribute. The field value is returned as the data inside the tag.
:* A [[Multi Object Lookup]] field has two attributes, in addition to the <tt>type</tt> attribute that is specified when you do an add or update. The syntax looks like this:
::<syntaxhighlight lang="java" enclose="div">
<field_name type="{objectName}"
    uri="{REST_resource_record_id}"
    display_value="{textual_record_identifier}">{record_id}</field>
</syntaxhighlight>
::where the [[Record Locator]] is the information that is displayed for the selected record.
:* For example, in the [[Sample Order Processing System]], if priority tags were in a separate table, then the contents of the tag field might look like this:
::<syntaxhighlight lang="java" enclose="div">
<tag type="Priority_Tag"
    uri="https://{{domain}}/networking/rest/record/Priority_Tag/9467890"
    displayValue="Rush, Overnight">9467890</tag>
</syntaxhighlight>
 
===Dynamic Search===
;Method:GET
 
;URI:
:<tt>{{platformURL}}/rest/record/{objectOrView}?{query_params}</tt>
:<tt>{{platformURL}}/rest/record/{objectOrView}?{query_params}&retrieveRecordPermissions=true</tt>
:where:
::* <tt>{objectOrView}</tt> is an [[Object Type Identifier]] or [[Database View]] ID
::* The optional [[REST API:Retrieve Record Permissions Query Parameter|Retrieve Record Permissions Query Parameter]] adds extra data that tells whether the user has add or delete capabilities.
 
:;Sample Search:
:: <tt><nowiki>?fieldList=name,id & filter=name contains 'smith' & sortBy=id</nowiki></tt>
:: (See the object or view being searched for a list of field names.)
 
{{:REST API:Dynamic Search}}
:'''Note:''' When searching a multi-object lookup field, the object ID (not name) must be specified.<br>Syntax: <tt>{object_id}:{record_id}</tt>
 
;Response: Here is the response for a search on a custom object where ObjectName is the name of the custom object:
:<syntaxhighlight lang="xml" enclose="div">
<platform>
    <record>
        <field1>...value...</field1>
        <field2>...value...</field2>
        <field3 displayValue="...">...value...</field3>
    </record>
    ...
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
    <recordCount>30</recordCount>
</platform>
</syntaxhighlight>
:'''Notes:'''
:* An enumerated field returns the field label in the <tt>displayValue</tt> attribute. The field value is returned as the data inside the tag.
 
;Response: Here is the response for a search on a database view where ObjectName is the DatabaseViewId:
:<syntaxhighlight lang="xml" enclose="div">
<platform>
    <record>
        <alias1.fileName1>value1</alias1.fileName1>
        <alias1.fileName2>value1</alias1.fileName2>
        <alias2.fileName1>value1</alias2.fileName1>
        <alias2.fileName2>value1</alias2.fileName2>
        ...
    </record>
    <record>
    ...
    </record>
        <message>
            <code>0</code>
            <description>Success</description>
        </message>
    <recordCount>30</recordCount>
</platform>
</syntaxhighlight>
 
===Add a Record===
Adds a record to an [[Object]]


;Method:POST
;Method:POST
;URI:<tt>{{platformURL}}/rest/record/{objectName}?{query_parameters}</tt>
;URI:<tt>{{platformURL}}/rest/record/{objectName}/bulk/add</tt>
:<tt>{{platformURL}}/rest/record/{objectName}/bulk/add?{query_parameters}</tt>


{{Query Parameters|
{{Query Parameters|
Line 137: Line 47:
:**'''<tt>false</tt>''': the record is not returned (default)}}
:**'''<tt>false</tt>''': the record is not returned (default)}}


;Request:
;Request: One or more record structures that specify fields and a transaction ID for that record.
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
Line 144: Line 54:
         <field2>...</field2>
         <field2>...</field2>
         ...
         ...
        <__transaction_id__>nnn</__transaction_id__>
    </record>
    <record>
         ...
         ...
        <__transaction_id__>nnn+1</__transaction_id__>
     </record>
     </record>
      ...
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>
:'''Notes:'''
:{{:Common:record fields}}
:{{:Common:record fields}}


Line 158: Line 72:
         <description>Success</description>
         <description>Success</description>
     </message>
     </message>
     <id>...</id>    <!-- record ID -->
     <id>...</id>    <!-- record ID -->  
    ...
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>
:* If the <tt>retrieveRecord</tt> query parameter was specified, one <tt><nowiki><id></nowiki></tt> element is returned for each added record, giving its record ID.
:* If the <tt>retrieveRecord</tt> query parameter was specified, the response contains one <tt><nowiki><record></nowiki></tt> element for each record that was added. The <tt><nowiki><id></nowiki></tt> is contained within that element.


===Update a Record===
:* <tt>message</tt> elements are returned if there are any failures. Each element contains the error code, description, and the <tt><nowiki><__transaction_id__></nowiki></tt> to identify the record that failed.
Updates a record in an [[Object]].


;Method:PUT
===Update Record===
Updates records in an [[Object]].


;URI:<tt>{{platformURL}}/rest/record/{objectName}/{recordId}?{query_parameters}</tt>
;Method:POST
 
;URI:<tt>{{platformURL}}/rest/record/{objectName}/bulk/update</tt>
:<tt>{{platformURL}}/rest/record/{objectName}/bulk/update?{query_parameters}</tt>


{{Query Parameters|
{{Query Parameters|
Line 174: Line 95:
:**'''<tt>false</tt>''': the record is not returned (default)}}
:**'''<tt>false</tt>''': the record is not returned (default)}}


;Request:
;Request: One or more record structures that specify fields to update and a transaction ID for that record.
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
     <record>
     <record>
        <id>...</id>              <!-- record ID -->
         <field1>...</field1>
         <field1>...</field1>
         <field2>...</field2>
         <field2>...</field2>
         ...
         ...
        <__transaction_id__>nnn</__transaction_id__>
    </record>
    <record>
        <id>...</id>
         ...
         ...
        <__transaction_id__>nnn+1</__transaction_id__>
     </record>
     </record>
      ...
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>
 
:* <tt><nowiki><__transaction_id__></nowiki></tt> elements are optional, but highly desirable. Each should have a unique value. When an error occurs, that value is included to identify the record that failed.
:'''Notes:'''
:{{:Common:record fields}}
:{{:Common:record fields}}


Line 198: Line 125:
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>
:* If the <tt>retrieveRecord</tt> query parameter was specified, the response contains one <tt><nowiki><record></nowiki></tt> element for each record that was added.


If the <tt><nowiki>?retrieveRecord=true</nowiki></tt> query is included:
:* <tt>message</tt> elements are returned if there are any failures. Each element contains the error code, description, and the <tt><nowiki><__transaction_id__></nowiki></tt> to identify the record that failed.
:*If <tt><nowiki>?retrieveRecord=true</nowiki></tt>, the record is also returned
:*If <tt><nowiki>?retrieveRecord=false</nowiki></tt> or is not present, the record is not returned


===Delete a Record===
===Delete Record===
Deletes a record in an [[Object]]
Deletes records in an [[Object]].


;Method:DELETE
;Method:POST
;URI:<tt>{{platformURL}}/rest/record/{objectName}/{recordId}</tt>
;URI:<tt>{{platformURL}}/rest/record/{objectName}/bulk/delete</tt>


;Request:
;Request: One or more record structures that specify the IDs of records to delete  and a transaction ID for that record.
No request body accompanies the resource.  
:<syntaxhighlight lang="xml" enclose="div">
<platform>
    <record>
        <id>...</id>
        <__transaction_id__>nnn</__transaction_id__>
    </record>
    <record>
        <id>...</id>
        <__transaction_id__>nnn+1</__transaction_id__>
    </record>
      ...
</platform>
</syntaxhighlight>
:* <tt><nowiki><__transaction_id__></nowiki></tt> elements are optional, but highly desirable. Each should have a unique value. When an error occurs, that value is included to identify the record that failed.  


;Response:
;Response:
Line 221: Line 160:
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>
 
:* <tt>message</tt> elements are returned if there are any failures. Each element contains the error code, description, and the <tt><nowiki><__transaction_id__></nowiki></tt> to identify the record that failed.
==Multipart Operations for Raw Data==
To include binary data in an XML stream, it is encoded and included in a ''multipart'' REST request (a request that contains a normal XML segment and an additional segment for each request field that holds raw data).
 
===Add a Multipart Record===
Adds a record to an [[Object]] when one or more fields contain raw data.
 
;Method:POST
 
;URI:<tt>{{platformURL}}/rest/record/{objectName}?{query_parameters}</tt>
 
{{Query Parameters|
:* <tt>isBase64Encoded</tt> (optional)
::*  <tt>true</tt>: File content is encoded binary data For example, an image.
::*  '''<tt>false</tt>''': File content is not encoded. For example, a text file. (default)
:* <tt>retrieveRecord</tt> (optional)
::*  <tt>true</tt>: the record is also returned
::*  '''<tt>false</tt>''': the record is not returned (default)}}
 
;Request:
:<syntaxhighlight lang="xml" enclose="div">
Content-Type: multipart/form-data; boundary=.............................103832778631715
 
--.............................103832778631715
Content-Disposition: form-data; name="__xml_data__"
content-type: application/xml
 
    <platform>
        <record>
            <field1>...</field1>
            <field2>...</field2>
            <image_field>image1.jpg</image_field>
            ...
        </record>
    </platform>
.............................103832778631715
Content-Disposition: form-data; name="image_field"; filename="image1.jpg"
content-type: application/octet-stream
 
{encoded contents of file}
.............................103832778631715--
</syntaxhighlight>
 
:The Content-type of the request is set to <tt>multipart/form-data</tt> with an appropriate boundary.
 
:The first part contains the xml record post request and has a Content-type <tt>application/xml</tt> or <tt>application/json</tt>. The name of the part is either <tt>__xml_data__</tt> or <tt>__json_data__</tt>.
 
:The <tt><image_field></tt> field contains the file name: <tt>image1.jpg</tt>.
 
:The next part of the request is the actual file. The Content-type is <tt>application/octet-stream</tt>. Note that the 'name' attribute in the content disposition points to the image field tag in the xml of the first part (ie. 'image_field'). This links the file part to the respective field in the xml. The 'filename' attribute of the content disposition is the file name of the file being uploaded to that field (i.e. <tt>image1.jpg</tt>).
 
:Multiple files can be attached to their respective fields in that manner.
 
;Response:
:<syntaxhighlight lang="xml" enclose="div">
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
</syntaxhighlight>
 
:See also: [[REST API:Error Codes]]
 
;Sample Client:Here is a sample client that uploads an image to an image field.
 
:<syntaxhighlight lang="java" enclose="div">
import java.io.File;
 
import javax.ws.rs.core.MediaType;
 
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.URI;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.StringPart;
 
public class MultipartRecord
{
    public static void main(String[] args)
    {
        try
        {
            File f = new File("c:\\csvs\\image1.jpg");
           
            HttpClient client = new HttpClient();
 
            //Add a record to a custom object called "HOMEPAGE"
            PostMethod postMethod = new
                PostMethod("https://{{domain}}/networking/rest/record/HOMEPAGE/");
           
            //Set the session for this request.
            postMethod.setRequestHeader("Cookie", "JSESSIONID=A741270662A86F796DA16646F0708C43");
 
            //The first attribute of the FilePart constructor refers to the image field name
            //ie.image_field
            FilePart filePart = new FilePart("image_field", f);
           
            //Set the content type of the filePart
            filePart.setContentType(MediaType.APPLICATION_OCTET_STREAM);
 
            //Create the xml part of the request
            // __xml_data__ is required for the name attribute
            // If the content type is json, use __json_data__
            StringPart sp = new StringPart("__xml_data__",
              "<platform><record><field1>Some text field</field1>"
            + "<image_field>image1.jpg</image_field></record></platform>");
           
            //Set the Content-type of the xml part
            sp.setContentType(MediaType.APPLICATION_XML);
           
            final Part[] parts = { sp, filePart };
 
            postMethod.setRequestEntity(new MultipartRequestEntity(parts, postMethod.getParams()));
 
            int executeMethod = client.executeMethod(postMethod);
        }
        catch(Exception e)
        {
            System.out.println("Exception");
        }
    }
}
</syntaxhighlight>
 
===Update a Multipart Record===
Updates a record in an [[Object]] when one or more fields contain raw data.
 
{{Note|Normal update rules are observed. For example, if an image field is specified, and the existing record field already contains an image, then the old image is deleted and the new one is uploaded in it's place.}}
 
;Method:PUT
 
;URI:<tt>{{platformURL}}/rest/record/{objectName}/{recordId}?{query_parameters}</tt>
 
{{Query Parameters|
:* <tt>isBase64Encoded</tt> (optional)
::*  <tt>true</tt>: File content is encoded binary data For example, an image.
::*  '''<tt>false</tt>''': File content is not encoded. For example, a text file. (default)
:* <tt>retrieveRecord</tt> (optional)
::*  <tt>true</tt>: the record is also returned
::*  '''<tt>false</tt>''': the record is not returned (default)}}
 
;Request:
:The format of the request is identical to that shown in [[#Add a Multipart Record|Add a Multipart Record]].
 
;Response:
:<syntaxhighlight lang="xml" enclose="div">
      <platform>
          <message>
              <code>0</code>
              <description>Success</description>
          </message>
      </platform>
</syntaxhighlight>
 
:See also: [[REST API:Error Codes]]
 
;Sample Client:Here is a sample client that updates an image in an image field.
:<syntaxhighlight lang="java" enclose="div">
import java.io.File;
 
import javax.ws.rs.core.MediaType;
 
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.URI;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.StringPart;
 
 
public class MultipartRecord
{
    public static void main(String[] args)
    {
        try
        {
            File f = new File("c:\\csvs\\image1.jpg");
           
            HttpClient client = new HttpClient();
 
            //Update a record in a custom object called "HOMEPAGE"
            PutMethod PutMethod =
              new PutMethod("https://{{domain}}/networking/rest/record/HOMEPAGE/{recordId}");
           
            //Set the session for this request.
            PutMethod.setRequestHeader("Cookie", "JSESSIONID=A741270662A86F796DA16646F0708C43");
 
            //The first attribute of the FilePart constructor refers to
            //the image field name ie.image_field
            FilePart filePart = new FilePart("image_field", f);
           
            //Set the content type of the filePart
            filePart.setContentType(MediaType.APPLICATION_OCTET_STREAM);
 
            //Create the xml part of the request
            // __xml_data__ is required for the name attribute
            // If the content type is json, use __json_data__
            StringPart sp = new StringPart("__xml_data__",
                "<platform><record><field1>Some text field</field1>"
              + "<image_field>image1.jpg</image_field></record></platform>");
           
            //Set the Content-type of the xml part
            sp.setContentType(MediaType.APPLICATION_XML);
           
            final Part[] parts = { sp, filePart };
 
            PutMethod.setRequestEntity(new MultipartRequestEntity(parts, PutMethod.getParams()));
 
            int executeMethod = client.executeMethod(PutMethod);
        }
        catch(Exception e)
        {
            System.out.println("Exception");
        }
    }
}
</syntaxhighlight>
<noinclude>
<noinclude>


[[Category:REST API|record Resource]]
[[Category:REST API|record Resource]]
</noinclude>
</noinclude>

Latest revision as of 03:10, 6 December 2014

Manage multiple Object records using the REST API.

About the Bulk Record Resource

Number of Records

Your Service Provider determines the maximum number of records that can be operated on at one time. The default value (and the value supported in the cloud) is 25.

Available Objects

These objects are available in the record Resource

Predefined Custom Object Fields

Every Custom Object is created with a number of fields that are automatically modified for each record.
Learn more: Custom Object#Predefined Fields

Data Format for Different Field Types

When adding and updating records, the field type determines the data format.
Learn more: REST API:Field Type Reference

Special Considerations for Enumerated Fields

When a record contains Enumerated Fields, there are additional factors to take into account.
Learn more: Enumerated Field Behavior For REST Web Services

Special System Objects

These System Objects can not be retrieved using the record Resource. They have specific resource URLs, instead:

Requirements

  • The logged-in user must have the permissions needed to access and/or modify the object in question.
Record access:

Lock-tiny.gif

  • In general, any user who can access an object can view all of the records it contains. (To access the object, they must be granted access to an application that contains it.)
  • One special case occurs when a record is owned by some other member of their team. In that case, the record becomes invisible, unless View permission has enabled in their Role Permissions, or unless their Access Profile gives them Global View permission.
  • Another special case occurs when Record Level Visibility has been enabled for an object, and visibility criteria has been specified for an individual record. In that case, a user who can see the record only when (a) They have been granted access to an application that contains the object, and (b) They match the visibility criteria specified for that record.
  • Users with Add permission enabled in Role Permissions or the Access Profile can add records
  • Users with Update permission enabled in Role Permissions or the Access Profile can update records
  • Users with Delete permission enabled in Role Permissions or the Access Profile can delete records 
Access to records owned by other team members:

Lock-tiny.gif

unless Record Level Visibility has been enabled, and visibility criteria has been specified for a record. (In that case, only users who match the criteria can read the record.)

Add Records

Adds records to an Object.

Method
POST
URI
https://{yourDomain}/networking/rest/record/{objectName}/bulk/add
https://{yourDomain}/networking/rest/record/{objectName}/bulk/add?{query_parameters}
Query Parameters
  • retrieveRecord (optional)
    • true: the record is also returned
    • false: the record is not returned (default)
For more information, see: Specifying Query Parameters in REST APIs
Request
One or more record structures that specify fields and a transaction ID for that record.
<platform>
    <record>
        <field1>...</field1>
        <field2>...</field2>
        ...
        <__transaction_id__>nnn</__transaction_id__>
    </record>
    <record>
        ...
        <__transaction_id__>nnn+1</__transaction_id__>
    </record>
      ...
</platform>
  • Each <fieldN> element has the name of a field in the object. For example:
<company_name>ABC Co.</company_name>
<street_address>21 Jump Street</street_address>
  • When specifying a Multi Object Lookup field, you specify the object identifier (name or ID) in the type attribute, and the record ID as the field value. The syntax looks like this:
<field_name type="{objectName}">{record_id}</field>
For example, in the Sample Order Processing System, if priority tags were in a separate table, then the field might look like this:
<tag type="Priority_Tag">9467890</tag>
  • To not trigger the rules via REST API, use the following parameter:
<PLATFORM.PARAMS.RECORD.DO_NOT_EXEC_DATA_POLICY>1</PLATFORM.PARAMS.RECORD.DO_NOT_EXEC_DATA_POLICY>
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
    <id>...</id>     <!-- record ID --> 
    ... 
</platform>
  • If the retrieveRecord query parameter was specified, one <id> element is returned for each added record, giving its record ID.
  • If the retrieveRecord query parameter was specified, the response contains one <record> element for each record that was added. The <id> is contained within that element.
  • message elements are returned if there are any failures. Each element contains the error code, description, and the <__transaction_id__> to identify the record that failed.

Update Record

Updates records in an Object.

Method
POST
URI
https://{yourDomain}/networking/rest/record/{objectName}/bulk/update
https://{yourDomain}/networking/rest/record/{objectName}/bulk/update?{query_parameters}
Query Parameters
  • retrieveRecord (optional)
    • true: the record is also returned
    • false: the record is not returned (default)
For more information, see: Specifying Query Parameters in REST APIs
Request
One or more record structures that specify fields to update and a transaction ID for that record.
<platform>
    <record>
        <id>...</id>              <!-- record ID -->
        <field1>...</field1>
        <field2>...</field2>
        ...
        <__transaction_id__>nnn</__transaction_id__>
    </record>
    <record>
        <id>...</id>
        ...
        <__transaction_id__>nnn+1</__transaction_id__>
    </record>
      ...
</platform>
  • <__transaction_id__> elements are optional, but highly desirable. Each should have a unique value. When an error occurs, that value is included to identify the record that failed.
  • Each <fieldN> element has the name of a field in the object. For example:
<company_name>ABC Co.</company_name>
<street_address>21 Jump Street</street_address>
  • When specifying a Multi Object Lookup field, you specify the object identifier (name or ID) in the type attribute, and the record ID as the field value. The syntax looks like this:
<field_name type="{objectName}">{record_id}</field>
For example, in the Sample Order Processing System, if priority tags were in a separate table, then the field might look like this:
<tag type="Priority_Tag">9467890</tag>
  • To not trigger the rules via REST API, use the following parameter:
<PLATFORM.PARAMS.RECORD.DO_NOT_EXEC_DATA_POLICY>1</PLATFORM.PARAMS.RECORD.DO_NOT_EXEC_DATA_POLICY>
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
  • If the retrieveRecord query parameter was specified, the response contains one <record> element for each record that was added.
  • message elements are returned if there are any failures. Each element contains the error code, description, and the <__transaction_id__> to identify the record that failed.

Delete Record

Deletes records in an Object.

Method
POST
URI
https://{yourDomain}/networking/rest/record/{objectName}/bulk/delete
Request
One or more record structures that specify the IDs of records to delete and a transaction ID for that record.
<platform>
    <record>
        <id>...</id>
        <__transaction_id__>nnn</__transaction_id__>
    </record>
    <record>
        <id>...</id>
        <__transaction_id__>nnn+1</__transaction_id__>
    </record>
      ...
</platform>
  • <__transaction_id__> elements are optional, but highly desirable. Each should have a unique value. When an error occurs, that value is included to identify the record that failed.
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
  • message elements are returned if there are any failures. Each element contains the error code, description, and the <__transaction_id__> to identify the record that failed.