authorize


URI

<instances_uri>/authorize[.<format>]

Supported methods

POST

Parent resource

instances

Introduction

The authorize resource is used to authorize one or more service instances.

 Supported Methods:

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

Resource hierarchy

HTTP request methods

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

http://supermapiserver:8090/iserver/manager/instances/authorize.rjson

POST request

Authorize one or more service instances.

Request parameter

Following arguments need to be included in the request sent.

Name Type Description
instances String[] [Required]
The array of the service instances.
authorizeSetting AuthorizeSetting [Required]
The authorization information of the instances in this array.

Response structure

The response result is as follows after implementing the POST request.

Field Type Description
succeed boolean Whether the instance is successfully authorized.
postResultType String The value is CreateChild.
newResourceLocation String This field is meaningless in this resource.

Response example

Execute the POST request for the authorize resource http://localhost:8090/iserver/manager/instances/authorize.rjson. The request body is as follows:

{

    "instances": [

        "map-china400/rest",

        "map-china400/wms111",

        "map-china400/wmts-china",

        "map-jingjin/rest",

        "map-temperature/rest",

        "map-world/rest"

    ],

    "authorizeSetting": {

        "deniedRoles": [],

        "permittedRoles": [],

        "type": "PUBLIC"

    }

}

The response result returned in rjson format is as follows:

{

    "succeed": true,

    "postResultType": "CreateChild",

    "newResourceLocation": "null.json"

}

See