POST
/
project
/
{id}
/
share
/
policy
curl -X POST \
  'https://api.chartbrew.com/project/123/share/policy' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json'
{
  "id": 1,
  "entity_type": "Project",
  "entity_id": 123,
  "visibility": "private",
  "params": [],
  "allow_params": false,
  "password": null,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}
This endpoint creates a new SharePolicy for a dashboard, which enables advanced sharing features including:
  • Signed URL generation with expiration dates
  • Parameter passing to dashboard variables
  • Control over URL parameter allowance
  • Enhanced security for public dashboards

Parameters

id
string
required
The ID of the dashboard/project

Response

id
integer
The unique identifier of the created share policy
entity_type
string
The type of entity this policy applies to (always “Project” for dashboards)
entity_id
integer
The ID of the dashboard this policy applies to
visibility
string
The visibility setting for the share policy:
  • public: Anyone can view
  • private: Can be viewed with signed URL
  • password: Anyone can view with a password
  • disabled: The share policy is disabled
params
array
Array of parameter objects that will be passed to dashboard variables
allow_params
boolean
Whether to allow parameters to be passed via URL query parameters
password
string
Password for password-protected sharing (if applicable)
createdAt
string
ISO 8601 timestamp of when the share policy was created
updatedAt
string
ISO 8601 timestamp of when the share policy was last updated

Example

curl -X POST \
  'https://api.chartbrew.com/project/123/share/policy' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json'
{
  "id": 1,
  "entity_type": "Project",
  "entity_id": 123,
  "visibility": "private",
  "params": [],
  "allow_params": false,
  "password": null,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the project

Response

200
application/json

Created share policy

The response is of type object.