URI

<groupMembers_uri>/applyinfo[.<format>]

Supported methods

GET, POST, PUT, HEAD

Parent resource

groupMembers

Introduction

The groupMembersApply resource is the request list information for users to apply to join in a certain group. The group creator (logged in) is allowed to acquire application list information of the current group. A user is allowed to join in a group. The group creator (logged in) is allowed to audit the application list in the current group.

Supported Methods:

  • GET: Get application list information of the current group.
  • POST: Apply to join in the group.
  • PUT: Audit the application list of the current group in batch.
  • HEAD: Check whether the groupMembersApply resource exists, or have permission to access the groupMembersApply 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/{id}/members/applyinfo.rjson

GET request

Get application list information of the current group, including applied, audited, and with permission to audit.

Request parameter

If the parameter has not been set, list information for all applications in the current group will be returned. If the parameter has been set, the specified application list information will be returned. Parameters must be contained in the URI.

Name Type Description
currentPage int Query according to current page.
pageSize int Query according to page size.
checkStatus GroupCheckStatus Query according to group audition status.
orderType OrderType Query according to sort ascending order.

Response structure

When you implement the GET request on the groupMembersApply Member resource to return application list information of the current group, the structure of the response is as follows:

Field Type Description
content List<GroupApplyInfo> The content for the page.
currentPage int The current page.
pageSize int The page size.
searchParameter SearchParameter The search parameters for the current page.
total int The total number of records.
totalPage int The total number of pages.

Response example

When you implement the GET request on the groupMembersApply resource http://localhost:8090/iportal/web/groups/3/members/applyinfo.rjson to acquire all application list information of current group FB, the rjson format representation is as follows:

{

    "content": [

        {

            "applicant": "wanghl",

            "applicantNick": "xiaowang",

            "applyReason": "Work",

            "applyTime": 1415264407787,

            "checkInfo": null,

            "checkStatus": "WAITING",

            "checkTime": 1415264407787,

            "checkUser": "null",

            "checkUserNick": "null",

            "groupId": 3,

            "groupName": "FB",

            "id": 14

        },

        {

            "applicant": "iportal",

            "applicantNick": "iportal",

            "applyReason": "Work",

            "applyTime": 1415264449699,

            "checkInfo": null,

            "checkStatus": "WAITING",

            "checkTime": 1415264449699,

            "checkUser": "null",

            "checkUserNick": "null",

            "groupId": 3,

            "groupName": "FB",

            "id": 15

        }

    ],

    "currentPage": 1,

    "pageSize": 0,

    "searchParameter": null,

    "total": 2,

    "totalPage": 0

}

If you want to acquire the specified application list information, filter according to sort order and group audition status for example, then you need to set orderType=ASC&checkStatus=WAITING, that is implementing the GET request on the groupMembersApply resource http://localhost:8090/iportal/web/groups/3/members/applyinfo.rjson?orderType=ASC&checkStatus=WAITING. The rjson format representation returned is as follows:

{

    "content": [

        {

            "applicant": "wanghl",

            "applicantNick": "xiaowang",

            "applyReason": "Work",

            "applyTime": 1415264407787,

            "checkInfo": null,

            "checkStatus": "WAITING",

            "checkTime": 1415264407787,

            "checkUser": "null",

            "checkUserNick": "null",

            "groupId": 3,

            "groupName": "FB",

            "id": 14

        },

        {

            "applicant": "iportal",

            "applicantNick": "iportal",

            "applyReason": "Work",

            "applyTime": 1415264449699,

            "checkInfo": null,

            "checkStatus": "WAITING",

            "checkTime": 1415264449699,

            "checkUser": "null",

            "checkUserNick": "null",

            "groupId": 3,

            "groupName": "FB",

            "id": 15

        }

    ],

    "currentPage": 1,

    "pageSize": 0,

    "searchParameter": null,

    "total": 2,

    "totalPage": 0

}

POST request

A user applies to join in the current group. If the group does not need audition, the user can directly joined into the group after application. However, if the group needs audition, the application needs to be approved by group creator before successfully joining the group.

Request parameter

Following arguments need to be included in the request sent.

Name Type Description
groupIds List<Integer> Group id applied to join in.
applyReason String Reason to join in the group.
applicant String Applicant.

Response structure

The representation structure of the resource returned is as follows:

Field Type Description
succeed boolean Whether the group application is successful or not.
error Httperror Error information. The field will not exist if the operation is successful.

Response example

When you implement the POST request on the groupMembersApply resource http://localhost:8090/iportal/web/groups/5/members/applyinfo.rjson to apply for joining into the current group, the request body sent is as follows:

{

    "groupIds": [5],

    "applyReason": "Cooperative Editing",

    "applicant": "wanghl"

}

The response result in rjson format returned is as follows:

{"succeed": true}

PUT request

Audit the applications of the current group in batch. It supports auditing specified application according to application id.

Request parameter

Following arguments need to be included in the request sent.

Name Type Description
ids List<Integer> Application id.
checkInfo String Audition information.
checkStatus GroupCheckStatus Audition result.

Response structure

The representation structure of the resource returned is as follows:

Field Type Description
succeed boolean Whether the application is successful or not.
error Httperror Error information. The field will not exist if the operation is successful.

Response example

When you implement the PUT request on the groupMembersApply resource http://localhost:8090/iportal/web/groups/5/members/applyinfo.rjson to audit appliations in batch for the current group, the request body sent is as follows:

{

    "ids": [1,2],

    "checkInfo": "ACCEPTED",

    "checkStatus": "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 groupMembersApply resource exists, or if the groupMembersApply resource can be accessed by clients. It can also determine if the groupMembersApply resource supports an output format <format> if performed on a URI with .<format> included.

See