REST API:social group Resource

REST API:social group Resource

From LongJump Support Wiki

REST API:social group Resource
Jump to: navigation, search

Manage Relay groups using the REST API.

Learn more: REST API Conventions and Considerations.

Contents

Requirements

List All Groups

Method
GET
URI
https://na.longjump.com/networking/rest/social/group
Response
<platform>
    <social>
        <group>
            <date_created>2011-03-08T05:20:11.000Z</date_created>
            <date_modified>2011-03-08T05:20:11.000Z</date_modified>
            <created_id type="USER" uri="..." displayValue="...">...</created_id>
            <modified_id type="USER" uri="..." displayValue="...">...</modified_id>
            <groupId>198ad6628f3e4fe6b6a3d072bc0c1edd</groupId>
            <name>Our Great Group</name>
            <administrator type="USER" uri="..." displayValue="...">...</administrator>
            <description>
             This group is dedicated to ...
            </description>
            <photoId>...</photoId>
            <thumbnailPhotoId>...</thumbnailPhotoId>
        </group>
    </social>
    <social>
        <group>
         ...
        </group>
    </social>
     ...

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

List a Group's Followers

Method
GET
URI
  • https://na.longjump.com/networking/rest/social/getFollowers?type=2&id={group_id}
  • https://na.longjump.com/networking/rest/social/getFollowers?type=2&filter={filter_expression}
Query Parameters
  • type - The Relay Feed Type for a group
  • group_id - ID of a specific group
  • filter_expression - An expression that specifies selection criteria.
    (If the "type" argument is 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>
        <group>
            <groupId uri=..." displayValue="...">...group ID...</groupId>
        </group>
    </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 Group

Method
POST
URI
https://na.longjump.com/networking/rest/social/follow
Request
<platform>
    <social>
        <group>
           <groupId>...group id...</groupId>    
        </group>
    </social>
</platform>
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Get Group Information

Method
GET
URI
https://na.longjump.com/networking/rest/social/group/{groupId}
Response
<platform>
    <social>
        <group>
            <date_created>2010-11-30T01:56:00.000Z</date_created>
            <date_modified>2010-12-09T22:44:00.000Z</date_modified>
            <created_id type="USER"
              uri="https:/.../networking/rest/user/1234567"
              displayValue="...">1234567</administrator>
            <modified_id type="USER"
              uri="https:/.../networking/rest/user/1234567"
              displayValue="...">1234567</administrator>
            <groupId>123456789</groupId>
            <name>Management Group</name>
            <administrator type="USER"
              uri="https:/.../networking/rest/user/1234567"
              displayValue="...">1234567</administrator>
            <description>Group desc</description>
            <photoId>217a5ed46e854477bd330e4c95d79475</photoId>
            <thumbnailPhotoId>8446997bd1f449b6ab6e2efe80c61a78</thumbnailPhotoId>
            <privateGroup>false</privateGroup>
        </group>
    </social>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Create a New Group

Method
POST
URI
https://na.longjump.com/networking/rest/social/group
Request
<platform>
    <group>
        <field>data</field>
         ...
    </social/group>
</platform>
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
        <groupId>...</groupId>   <!-- ID of the newly created group -->
    </message>
</platform>
See also: REST API:Error Codes

Update a Group

Method
PUT
URI
https://na.longjump.com/networking/rest/social/group/{groupId}
Request
<platform>
    <group>
        <groupId>{groupId}</groupId>
         ...
    </social/group>
</platform>
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Delete a Group

Method
DELETE
URI
https://na.longjump.com/networking/rest/social/group/{groupId}
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Upload Group Photo

Method
POST
URI
https://na.longjump.com/networking/rest/social/group/{groupId}/photo
Request
Use a Multipart Request
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Upload Group Thumbnail

Method
POST
URI
https://na.longjump.com/networking/rest/social/group/{groupId}/thumbnail
Request
Use a Multipart Request
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Delete Group Photo

Method
DELETE
URI
https://na.longjump.com/networking/rest/social/group/{groupId}/photo
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Delete Group Thumbnail

Method
DELETE
URI
https://na.longjump.com/networking/rest/social/group/{groupId}/thumbnail
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Fields

Note: Unless otherwise indicated, the attribute for a field is "Editable on Add or Update".
NameTypeAttributeRequired on AddDescriptionAdditional Information
groupId String Read Only Group identifier
name String Group name
description String
administrator String Only the administrator can update or delete a group. During an add, the creator becomes the administrator. During an update, other users can be designated as administrators. User ID
privateGroup Boolean True if the group is private. False if public.
photoId String Read Only
thumbnailPhotoId String Read Only
date_modified Date Read Only UTC Format
date_created Date Read Only UTC Format
created_id Date Read Only UTC Format
modified_id Lookup Read Only User ID
Personal tools