Turn the IP allowlist on or off for one of your Dynatrace dashboard shares with the Public Access API to restrict who can open the public link.
| PUT | SaaS | https://{your-environment-id}.apps.dynatrace.com/v1/shares/{shareId}/ip-allowlist |
You use the shareId path parameter to choose one of your dashboard shares and the enabled field in the request body to turn its IP allowlist on or off. With the allowlist on, only viewers from allowed IP addresses can open the public link. A 200 response confirms the new setting.
To execute this request, you need a platform token or OAuth access token with public-access:shares.ip-allowlist:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| shareId | string | The UUID of the share config | path | Required |
| body | object | - | body | Required |
RequestBody object| Element | Type | Description | Required |
|---|---|---|---|
| enabled | boolean | Enables or disables the IP allowlist for the share config | Required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"enabled": true}
| Code | Description |
|---|---|
| 200 | IP allowlist set |
| 404 | - |
| 4XX | - |
| 5XX | - |