Geovisualization Developer's Guide

Publish Password-Protected Queries

The publish password-protected queries request body is a raw JSON object sent in the body of a Geovisualization REST API request to publish one or more queries with an associated password. The result is to make the queries available to the public, under the condition that users must provide basic authentication using the specified password when accessing those queries.

Note that a query can only be made password-protected once. To reset the password (thus making the resource private again), pass the password null.

The maximum number of queries you can specify per request is 50.

If one of the specified queries cannot be changed, no changes are made and an error is returned.

Table 1. Publish Password-Protected Queries Request Elements
Element Data Type Mandatory Description
queries Object Yes A list containing the following fields:
  • password – the password to set to the queries in the request. The password must be a minimum of six characters long. To reset the password, use "password": null
  • ids – a list of query IDs to be published

The code example below shows the data structure sent in a request to publish queries with a password.

  "queries": {
    "password": "s3cret",
    "ids": ["{query_id_1}", "{query_id_2}", "{query_id_3}"]