My Keys

Feedback


When developing a Web GIS application, you can directly access the public service and data resources in the portal, but for the non-public services and data in the portal (including my private resources, shared with me, resources in my department, and my groups), you need to generate a Resource key in iPortal, and then use the resource address plus the key in your application to access these resources.

Resource Key is the password identification of resources. It is an access control mechanism to protect the security of data and service resources registered and managed by users in iPortal. Resource Key consists of 24 random letters and numbers and supports controlling access source, validity period, access content and access quota, etc. By default, iPortal provides 10,000 visits per day for each associated resource of the key (administrators can modify the default quota in the configuration file). In addition, iPortal also provides a quota review function. If the administrator has not enabled the quota review, users can set the quota by themselves; if the quota review function is enabled, the quotas set by users need to be approved by the administrator to take effect. When reviewing the quotas, the administrator needs to pay attention to the impact of the increased quotas on the operational stability and response speed of the entire portal software platform.

The following will introduce the generation, use, and management of Resource keys in iPortal.

Adding Resource Key

When generating the key, you need to set the name (it is recommended to be consistent with your actual project name or application scenario for easy management), request verification mode, key tags, expiration time, and association resources. There are two ways to request verification: "Site Access" and "Service Request." The details are as follows:

Steps:

  1. Click the "Add key" button to enter the add key page (when adding the key for the first time, the page displays "Get key" );
  2. Fill in the name of the key. To be more manageable, it is recommended you use the naming rule as [Project Name-Application Scenario];

  3. Select the request verification mode: site access or service request.

  1. Set the key tags. You can use the recommended tag or custom tag. Multiple tags should be separated by a comma, support up to 6 labels;

  2. Select the expiration time, optional. When you set it to empty, the expiration time will not be limited;

  3. Select the associated resources of the key, that is, the data and service resources that need to be accessed through the key in your Web GIS application. You can select one or more data and services, which support filtering by type or by name. Among them, "My Services/Data" lists all the private services/data resources you own in the portal, and "Shared Services/Data" lists all the services/data resources in the portal that you have permission to access, including Services/data shared with me, services/data in my department or group;

  4. Click "OK" to complete the addition of the key.

Managing Resource Key

The "My Keys" page will list all your keys. You can search for keys by tag filtering and keyword retrieval, view the basic information of keys and delete keys in batches.

For the single key, you can click the to modify the information, click the to view the access statistics, click the to view the information of the key associated resource, click "View Details" to view the key quota, and click the to set the key quota as needed.

View and set quota

By default, iPortal provides 10000 visits per day for each associated resource in the key. If the visit amount reaches the quota limit, you cannot continue to use the key to access the resource in your web application.

In each key, click "View Details," and the pop-up window will display the quota information of each associated resource, including the maximum quota and the remaining quota. You can monitor the usage of the quota here. If the current quota cannot meet your business needs, you can click the to reset the quota. If the administrator has enabled the quota review function, the quota application items will be synchronously recorded in My Application, and the administrator's approval result will be notified to you in the form of a message, which can be viewed in My Messages. Your application needs to be approved by the administrator before it becomes effective. The administrator needs to pay attention to the impact of the increased quotas on the operational stability and response speed of the entire portal software platform.

View the access statistics of Resource key

iPortal provides access statistics for a single key. You can click the  to view it in the pop-up window. The pop-up window will display the change curve of the number of accesses within a period, and support switching the statistical unit (hour/day/month) and statistical period, helping you grasp the usage of keys in different time dimensions.

View associated resource information

After adding the key, you can click the  to view all the services and data resources associated with the key, search for resources by keyword retrieval, copy the resource address with one click, and quickly use the key in development applications.

Among them, iPortal provides multiple data addresses for you to choose to meet different data access requirements. You can click the  to view the data addresses and related descriptions supported by the key in the pop-up window of "View Related Resource".

Table 1 Data addresses supported by Resource key

Data Address Description
http://{ip}:{port}/iportal/web/datas/{id}.json

Get detailed information about the data, including permission information.

http://{ip}:{port}/iportal/web/datas/{id}/content.json

Get the content of the specified data (currently only supports json, csv, shp).

http://{ip}:{port}/iportal/web/datas/{id}/download.json

Download data.

http://{ip}:{port}/iportal/web/datas/{id}/datasets.json

Get the data set information contained in the data

Data types that can be parsed:

(1) When storing in DATASTORE and opening the relationship, it supports the analysis of data sets of relational data (udb/csv/excel/geojson/workspace).

(2) The data set is contained in the registered hdfs data source.

http://{ip}:{port}/iportal/web/datas/{id}/datasets/{dataSetName}.json

Get detailed information on a specified data set.

http://{ip}:{port}/iportal/web/mycontent/datas/{id}.json Get detailed information about the data, including permission information.

http://{ip}:{port}/iportal/web/mycontent/datas/{id}/download.json

Download data.

http://{ip}:{port}/iportal/web/mycontent/datas/{id}/simpledata.json Get simpleData in HDFS.
http://{ip}:{port}/iportal/web/mycontent/datas/{id}/services.json

Get service information associated with data.

http://{ip}:{port}/iportal/web/mycontent/datas/{id}/digest.json

Get summary information on data storage.

http://{ip}:{port}/iportal/web/mycontent/datas/{id}/sharesetting.json

Get shared information of data.

Use the Resource Key in the development application

http://192.168.120.40:8195/iserver/services/map-HunanPopulationDensity/rest.rjson?key=v6ywlc7MJiAY6CQ0Ej4RXWD0

Among them, the part before "?" is the address of the service that needs to be called, and the part after it (key=......) is the key request parameter required for access, and the request can be accessed by sending the request with this URL.