app


URI

<apps_uri>/{appId}[.<format>]

Supported methods

GET, PUT, DELETE, HEAD

Parent resource

apps

Introduction

application resource. supports viewing detail info about application editing or updating info ,and removing application.

Supported Methods:

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/apps/{appId}.rjson

GET request

Get detailed information of the specified application.

Request parameter

The structure of the response resource representation after implementing the GET request on the app resource will be as follows:

Name Type Description
address String Application URL.
appName String Application name.
createTime Long The time of application registered.
authorizeSetting List<IportalAuthorizeEntity> The authorization info. The app permission types include DELETE, READ, READWRITE.
description String The description of the application.
id Integer Application ID.
nickname String User's nickname.
tags List<String> Application tag.
thumbnail String Application thumbnail file path.
type AppType Application type.
updateTime Long Last updated time of application.
userName String User name.

Response example

The returned rjson format representation after implementing the GET request on the service app resource http://localhost:8090/iportal/web/apps/2.rjson is as follows:

{

    "address": "http://sonar.ispeco.com:9001/",

    "appName": "sonar",

    "authorizeSetting": [

        {

            "aliasName": "admin",

            "entityId": null,

            "entityName": "admin",

            "entityType": "USER",

            "permissionType": "DELETE"

        },

        {

            "aliasName": "GUEST",

            "entityId": null,

            "entityName": "GUEST",

            "entityType": "USER",

            "permissionType": "READ"

        }

    ],

    "createTime": 1473737277572,

    "description": "",

    "id": 2,

    "nickname": "admin",

    "tags": [

        "JavaScript"

    ],

    "thumbnail": "http://localhost:8090/iportal/services/../resources/thumbnail/app/app2.png",

    "type": null,

    "updateTime": 1473746891079,

    "userName": "admin"

}

PUT request

Edits and updates basic info of the specified application.

Request parameter

Following arguments need to be included in the request sent.

Field Type Description
application Name String Application name.
address String Application URL.

description

String The description of the application.

tags

List<String> Application tag.
thumbnail String Application thumbnail file path.

Response structure

The structure of the response resource representation is as follows:

Field Type Description
succeed boolean Whether the application has been updated successfully.
error Httperror Error information. This field will not be displayed if it is updated successfully.

Response example

Modify the service name, and execute PUT request for the app resource http://localhost:8090/iportal/web/apps/2.json . The request body is as follows:

{

    "appName": "sonar",

    "address": "http://sonar.ispeco.com:9001/",

    "description": "",

    "tags": [

        "JavaScript"

    ],

    "thumbnail": null

}

The rjson format returned is as follows:

{ "succeed": true}

DELETE request

Delete the application with specified ID.

Response structure

The structure of the response resource representation is as follows:

Field Type Description
succeed boolean Whether the application is successfully deleted.
error Httperror Error information. This field will not be displayed if the application is successfully deleted.

Response example

Implement the DELETE request on the app resource http://localhost:8090/iportal/web/apps/6.rjson. Return rjson results:

{ "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 whether the app resource exists, or whether the the client has the permission to access it. It can also determine if the app resource supports an output format <format> if performed on a URI with .<format> included.

See