REST API:bulk record Resource

REST API:bulk record Resource

From LongJump Support Wiki

REST API:bulk record Resource
Jump to: navigation, search

Manage multiple Object records using the REST API.

Contents

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.

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 Built-in or CRM Objects

These Built-in or CRM 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:

File:Lock-tiny.gif

Access to records owned by other team members:

File:Lock-tiny.gif

Add Records

Adds records to an Object.

Method
POST
URI
https://na.longjump.com/networking/rest/record/{objectName}/bulk/add
https://na.longjump.com/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>
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://na.longjump.com/networking/rest/record/{objectName}/bulk/update
https://na.longjump.com/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>
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://na.longjump.com/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.
Personal tools