(Quick Reference)

UserGroup

list

  • Path : /api/group
  • Parameters :
    • sGroup : filter by species group. Default is ALL
    • habitat : filter by habitat. Default is ALL
    • featureBy : true|false. default false
    • tag : tag name
    • name : query by group name string
    • user : filter by groups having user as member
    • observation : filter by groups by observation
    • max: limit of number of results. default 24
    • offset : offset in to the result set. default 0
    • sort: lastRevised|createsOn|visitCount. default lastRevised desc, id asc
  • REST method : GET
  • Headers Required : X-Auth-Token, Accept:application/json, text/json
  • Requests :

http://indiabiodiversity.org/api/group
  • Response :

{
    "success": true,
        "status": 200,
        "msg": "Success in executing list of userGroup",
        "model": {
            "userGroupInstanceList": [
            {
                "id": 1,
                "name": "The Western Ghats",
                "description": "<h2 style="margin: 10px 0px; font-family: Verdana, Helvetica, sans-serif; font-weight: normal; line-height: 40px; color: rgb(85, 85, 85); text-rendering: optimizelegibility; font-size: 31.5px; padding: 5px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(229, 229, 229);">rnt<span style="color: rgb(94, 94, 94); font-size: 14px;">The Western Ghats, a mountainous ridge running parallel to the west coast of India&rsquo;s ancient peninsula, has a rich and intriguing history.&nbsp;</span><span style="color: rgb(94, 94, 94); font-size: 14px;">The Western Ghat portal seeks to provide a platform for aggregating diverse information on the biodiversity of the Western Ghats. As interested, discerning readers, students and researchers we request you to participate and create an online open collaborative system for sharing biodiversity information.</span></h2>rn<p>rnt&nbsp;</p>rn",
                "domainName": "http://thewesternghats.indiabiodiversity.org",
                "webaddress": "the_western_ghats",
                "foundedOn": "2012-12-31T12:17:05Z",
                "icon": "/ca7dc494-eff4-4f49-b340-f69e8d543a75/resources/map-logo.gif"
            }
            ],
                "instanceTotal": 34,
                "queryParams": {
                    "isDeleted": false,
                    "max": 1,
                    "offset": 0
                },
                "activeFilters": {
                    "append": true
                },
                "resultType": "user group"
        }
}

show

  • Path : /api/group/id
  • Parameters :
    • id : long format or
  • webaddress : string
  • REST method : GET
  • Headers Required : X-Auth-Token, Accept:application/json, text/json
  • Request :

http://indiabiodiversity.org/api/group/3 or
http://indiabiodiversity.org/api/group/birdwatch
  • Response :
    • Successful response

{
    "success": true,
        "status": 200,
        "msg": "",
        "instance": {
            "id": 1,
            "name": "The Western Ghats",
            "description": "<h2 style="margin: 10px 0px; font-family: Verdana, Helvetica, sans-serif; font-weight: normal; line-height: 40px; color: rgb(85, 85, 85); text-rendering: optimizelegibility; font-size: 31.5px; padding: 5px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(229, 229, 229);">rnt<span style="color: rgb(94, 94, 94); font-size: 14px;">The Western Ghats, a mountainous ridge running parallel to the west coast of India&rsquo;s ancient peninsula, has a rich and intriguing history.&nbsp;</span><span style="color: rgb(94, 94, 94); font-size: 14px;">The Western Ghat portal seeks to provide a platform for aggregating diverse information on the biodiversity of the Western Ghats. As interested, discerning readers, students and researchers we request you to participate and create an online open collaborative system for sharing biodiversity information.</span></h2>rn<p>rnt&nbsp;</p>rn",
            "domainName": "http://thewesternghats.indiabiodiversity.org",
            "webaddress": "the_western_ghats",
            "foundedOn": "2012-12-31T12:17:05Z",
            "icon": "/ca7dc494-eff4-4f49-b340-f69e8d543a75/resources/map-logo.gif"
        }
}
    • in case of error

{
    "success": false,
        "status": 404,
        "msg": "Valid id is required",
        "errors": []
}

user

  • Path : /api/group/id/user
  • Parameters
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
    • max : integer. Default 12 and max 100
    • offset : integer. Default 0
    • sort : sort users on any of user properties
    • onlyMembers : true | false. return only members of the group. Default false returns all members including founders and moderators
  • REST method : GET
  • Headers Required : X-Auth-Token, Accept:application/json, text/json
  • Request :

http://indiabiodiversity.org/api/group/1/user
  • Response :
    • Successful response

{
    "result": [
    {
        "id": 6465,
            "name": "Sachin M H",
            "icon": "http://localhost/biodiv/users/user_large.png"
    },
    {
        "id": 6463,
        "name": "Deepika",
        "icon": "http://localhost/biodiv/users/user_large.png"
    }
    ]
}
    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}

founders

  • Path : /api/group/id/founders
  • Parameters
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
    • max : integer. Default 12 and max 100
    • offset : integer. Default 0
    • sort : sort users on any of user properties
  • REST method : GET
  • Headers Required : X-Auth-Token, Accept:application/json, text/json
  • Request :

http://indiabiodiversity.org/api/group/1/founders
  • Response :
    • Successful response

{
    "userGroupInstance": { ...},
        "userInstanceList": [
        {
            "id": 1117,
            "name": "R Prabhakar",
            "icon": "http://localhost/biodiv/users//100000607869577/resources/100000607869577_th1.jpg"
        },
        {
            "id": 797,
            "name": "ramesh.br",
            "icon": "http://localhost/biodiv/users/user_large.png"
        }
    ],
        "instanceTotal": 2,
        "foundersTotalCount": 2,
        "membersTotalCount": 1370,
        "expertsTotalCount": 4
}
    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}

moderators

  • Path : /api/group/id/moderators
  • Parameters
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
    • max : integer. Default 12 and max 100
    • offset : integer. Default 0
    • sort : sort users on any of user properties
  • REST method : GET
  • Headers Required : X-Auth-Token, Accept:application/json, text/json
  • Request :

http://indiabiodiversity.org/api/userGroup/moderators
  • Response :
    • Successful response

    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}

joinUs

  • Path : /api/group/id/joinUs
  • Parameters
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
  • REST method : GET
  • Headers Required : X-Auth-Token, Accept:application/json, text/json
  • Request :

http://indiabiodiversity.org/api/group/1/joinUs
  • Response :
    • Successful response

{
    "success": true,
        "status": 200,
        "msg": "You have joined SEE-U 2014 Biodiversity Research Team group. We look forward for your contribution."
}
    • in case of error

{ "success": false, "status": 200, "msg": "Already a member.", "errors": }

{
    "success": false,
        "status": 404,
        "msg": "UserGroup not found with id null",
        "errors": []
}

leaveUs

  • Path : /api/group/id/leaveUs
  • Parameters
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
  • REST method : GET
  • Permissions : logged in user
  • Request :

http://indiabiodiversity.org/api/group/1/leaveUs
  • Response :
    • Successful response

inviteMembers

  • Path : /api/group/id/inviteMembers
  • Parameters
    • memberUserIds : csv of userIds
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
  • REST method : GET
  • Permissions : logged in user
  • Request :

http://indiabiodiversity.org/api/group/1/inviteMembers
id:1
memberUserIds:2,3
  • Response :
    • Successful response

{
    "success": true,
        "statusComplete": true,
        "shortMsg": "Sent request",
        "msg": "Successfully sent invitation message to 2 member(s)"
}
    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}

inviteExperts

  • Path : /api/userGroup/inviteExperts
  • Parameters
    • memberUserIds : csv of userIds
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
  • REST method : GET
  • Permissions : logged in user
  • Request :

http://indiabiodiversity.org/api/userGroup/inviteExperts
id:1
memberUserIds:2,3
  • Response :
    • Successful response

{
    "success": true,
        "statusComplete": true,
        "shortMsg": "Sent request",
        "msg": "Successfully sent invitation message to 2 member(s)"
}
    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}

requestMembership

  • Path : /api/userGroup/requestMembership
  • Parameters
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
  • REST method : GET
  • Permissions : logged in user
  • Request :

http://indiabiodiversity.org/api/userGroup/requestMembership
  • Response :
    • Successful response

{
    "success": true,
        "statusComplete": true,
        "shortMsg": "Sent request",
        "msg": "Successfully sent invitation message to founders"
}
    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}

requestModeratorship

  • Path : /api/userGroup/requestModeratorship
  • Parameters
    • id : usergroup id
    • webaddress : usergroup webaddress. Either id or webaddress is required
  • REST method : GET
  • Permissions : logged in user
  • Request :

http://indiabiodiversity.org/api/userGroup/requestModeratorship
  • Response :
    • Successful response

{
    "success": true,
        "statusComplete": true,
        "shortMsg": "Sent request",
        "msg": "Successfully sent invitation message to founders"
}
    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}

bulkPost

  • Path : /api/userGroup/bulkPost
  • Parameters :
    • userGroups : csv's of usergroup ids
    • objectIds : csv's of object ids
    • objectType : object class name. Species|Observation|Document|Checklist
    • filterUrl : any filter parameters url applied on list api call
    • webaddress : the usergroup webaddress to which these objects belong
    • pullType : single | bulk
    • selectionType : selectAll |
    • sumbitType : post | remove
    • author : user id who has permission to post this object. default : current logged in user
    • REST Method : GET
    • Permissions :
  • Request :

  • Response :
    • on success

    • in case of error

getUserUserGroups

  • Path : /api/userGroup/getUserUserGroups
  • Parameters
    • id : user id
    • limit : integer. Default 9 and max 100
    • offset : integer. Default 0
  • REST method : GET
  • Request :

http://indiabiodiversity.org/api/userGroup/getUserUserGroups?id=1184
  • Response :
    • Successful response

    • in case of error

{
    "success": false,
        "msg": "UserGroup not found with id null"
}