View the Object Policy

GET /api/v1.2/object_policy/policy

Use this API to view a policy/policies set for an individual object. Since Qubole supports object policy API on notebooks, clusters, package management environments, and scheduler, you can see the policy set for them.

Parameters

Note

Parameters marked in bold are mandatory. Others are optional and have default values.

Parameter Description
source_id It specifies the ID of the object, a cluster, an environment, a notebook, or a scheduler based on the source_type.
source_type It specifies the object. The values are cluster, environment, note, and scheduler.

Required Role

The following users can make this API call:

  • Users who belong to the system-admin or system-user group.
  • Users who belong to a group associated with a role that allows viewing the object policy. See Managing Groups and Managing Roles for more information.

Request API Syntax

curl -X GET -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d `{"source_id":"<Object_ID>", "source_type": "<Object>"}` \ "https://gcp.qubole.com/api/v1.2/object_policy/policy"

Sample API Requests

Here is an example to see the object policy for a cluster with its ID as 2001.

curl -X GET -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d `{"source_id":"2001", "source_type": "cluster"}` \ "https://gcp.qubole.com/api/v1.2/object_policy/policy"

Here is an example to see the object policy for a notebook with its ID as 250.

curl -X GET -H "X-AUTH-TOKEN: <API-TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json" \
-d `{"source_id":"250", "source_type": "note"}` \ "https://gcp.qubole.com/api/v1.2/object_policy/policy"