Geovisualization Developer's Guide

Permission

The permission response body is a JSON object returned by the Geovisualization REST API in response to a request for the permissions of a dataset, query or layer.

Table 1. Permission Response Elements
Element Data Type Description
kind String Type of response: the value is datalens#permissions when the request is successful
permissions Array An array of objects containing the following fields:
  • role - the role as defined in Permissions.
  • users - an array of user IDs who have this role.

The code example below illustrates a typical response to a successful request.

{
  "kind": "datalens#permissions",
  "permissions": [
  {
    "role": "owner",
    "users": ["{user_id_23}"]
  },
  {
    "role": "reader",
    "users": [
    "{user_id_7}",
    "{user_id_5}",
    "{user_id_42}"
    ]
  }
  ]
}