REST API:socialRecord Element

REST API:socialRecord Element

From LongJump Support Wiki

REST API:socialRecord Element
Jump to: navigation, search

Work with record feeds in Relay, using the REST API.

Learn more: REST API Conventions and Considerations.

Contents

Requirements

List a Record's Followers

Method
GET
URI
  • https://na.longjump.com/networking/rest/social/getFollowers?type=3&object={object_name}&id={record_id}
  • https://na.longjump.com/networking/rest/social/getFollowers?type=3&filter={filter_expression}
Query Parameters
  • type - The Relay Feed Type for a record
  • object_name - Name of an object
  • record_id - ID of a specific record
  • filter_expression - An expression that specifies selection criteria.
    (If the other arguments are left off, the filter expression can be used to search for any number of things.)
For more information, see: Specifying Query Parameters in REST APIs
Response
<platform>
    <social>
        <socialUser>
            <socialUserId uri=..." displayValue="...">...user ID...</socialUserId>
        </socialUser>
    </social>
    <social>
        <socialUser>
         ...
        </socialUser>
    </social>
     ...

    <message>
        <code>0</code>
        <description>Success</description>
    </message>
    <recordCount>N</recordCount>      <!-- Number of followers -->
</platform>
See also: REST API:Error Codes

Follow a Record

Method
POST
URI
https://na.longjump.com/networking/rest/social/follow
Request
<platform>
    <social>
        <socialRecord>
           <object_id>...object name...</object_id>
           <socialRecordId>...record id...</socialRecordId>    
        </socialRecord>
    </social>
</platform>
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
        <socialRecordId>...</socialRecordId>   <!-- ID of the newly created record -->
    </message>
</platform>
See also: REST API:Error Codes
Personal tools