URI

<groups_uri>/inviteinfo[.<format>]

Supported methods

GET, PUT, HEAD

Parent resource

groups

Introduction

groupsInvite resource is the group invitation resource. Support to get the invitation list info related to the current users. Support to update multiple group invitation status.

Supported Methods:

  • GET: Gets the invitation list info related to the current users.
  • PUT: Update the multiple groups invitation status.
  • HEAD: Check whether the groupsInvite resource exists. or to access the groupsInvite resource.

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.

http://supermapiportal:8090/iportal/web/groups/inviteinfo.rjson

GET request

Gets the invitation list info related to the current users.

Request parameter

If the parameters are not set, return all invitation list info related to the current users. After set the parameters, it will return the invitation list info specified by the current user. The request parameters should be included in the URI.

Name Type Description
currentPage int Query according to the current page.
pageSize int Query according to the page size.
feedbackStatus FeedbackStatus Query according to the feedback status. The status includes WAITING, ACCEPTED and REFUSED
orderType OrderType Query according to the ascending order or descending order.
orderBy InviteOrderby Query according to the sort type.
groupInviteRole GroupInviteRole Query according to group invite role type.

Response structure

Implement the GET request for the groupsInvite resource, return the application list info related to the current users. It consists of the following fields:

Field Type Description
content List<GroupInviteInfo> The page content.
currentPage int Current page.
pageSize int The page size.
searchParameter SearchParameter The search parameter of the current page.
total int Total records.
totalPage int Total pages.

Response example

The returned rjson format representation after implementing the GET request on the groupsInvite resource http://localhost:8090/iportal/web/groups/inviteinfo.rjson is as follows:

{

    "content": [

        {

            "feedbackInfo": null,

            "feedbackStatus": "WAITING",

            "feedbackTime": null,

            "groupId": 1,

            "groupName": "FA",

            "id": 1,

            "inviteReason": "",

            "inviteTime": 1415157749401,

            "invitee": "wanghl",

            "inviter": "admin"

        },

        {

            "feedbackInfo": null,

            "feedbackStatus": "WAITING",

            "feedbackTime": null,

            "groupId": 2,

            "groupName": "iPortal",

            "id": 2,

            "inviteReason": "",

            "inviteTime": 1415157824592,

            "invitee": "wanghl",

            "inviteeNick": "xiaowang",

            "inviterNick": "iportal"

            "inviterNick": "iportal"

        }

    ],

    "currentPage": 1,

    "pageSize": 9,

    "searchParameter": null,

    "total": 2,

    "totalPage": 1

}

If you want to get the specified invitation list info, such as the filter according to the group invitation role type and feedback status, it needs to set the groupInviteRole=INVITEE&feedbackStatus=WAITING, namely, implement the GET request for the groupsInvite resource: http://localhost:8090/iportal/web/groups/inviteinfo.rjson?groupInviteRole=INVITEE&feedbackStatus=WAITING. The returned rjson format is as follows:

{

    "content": [

        {

            "feedbackInfo": null,

            "feedbackStatus": "WAITING",

            "feedbackTime": null,

            "groupId": 1,

            "groupName": "FA",

            "id": 1,

            "inviteReason": "",

            "inviteTime": 1415157749401,

            "invitee": "wanghl",

            "inviter": "admin"

        },

        {

            "feedbackInfo": null,

            "feedbackStatus": "WAITING",

            "feedbackTime": null,

            "groupId": 2,

            "groupName": "iPortal",

            "id": 2,

            "inviteReason": "",

            "inviteTime": 1415157824592,

            "invitee": "wanghl",

            "inviteeNick": "xiaowang",

            "inviterNick": "iportal"

            "inviterNick": "iportal"

        }

    ],

    "currentPage": 1,

    "pageSize": 9,

    "searchParameter": null,

    "total": 2,

    "totalPage": 1

}

PUT request

Updates the multiple groups invitation status.

Request parameter

Following arguments need to be transmitted in the request sent:

Name Type Description
ids List<Integer> Invitation id.
feedbackStatus FeedbackStatus Feedback. It only can be ACCEPTED or REFUSED.
feedbackInfo String Feedback.

Response structure

The returned resource representation structure is as follows:

Field Type Description
succeed boolean Update whether the group invitation status is successful.
error Httperror Error. If the update the group invitation status successfully, it would not have this field.

Response example

Implement the PUT request for the groupsInvite   resource: :http://localhost:8090/iportal/web/groups/inviteinfo.rjson. Update the group invitation status. The request body is as follows:

{

    "ids": [1,2],

    "feedbackStatus": "ACCEPTED",

    "feedbackInfo": "ACCEPTED"

}

The response result in rjson format returned is as follows:

{"succeed": true}

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the groupsInvite resource exists, or if the groupsInvite resource can be accessed by clients. It can also determine if the groupsInvite resource supports an output format <format> if performed on a URI with .<format> included.

See