Get all safe domains

get

/api/20210901/system/safeDomains

Return a list of all safe domains configured for an Analytics instance.

Request

There are no request parameters for this operation.

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Successful operation.
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : SafeDomainListItem
Type: object
Additional Properties Allowed
Show Source
Safe domain entry
Nested Schema : SafeDomain
Type: object
An object representing the properties of a safe domain.
Show Source

403 Response

Not authorized to view safe domains
Body ()
Root Schema : 403Forbidden
Forbidden (missing permissions for operation, request denied for unspecified reason, and so on).
Back to Top

Examples

In this example, you get a list of all the safe domains configured for the Analytics instance and their Content Security Policy (CSP) settings.

cURL Example:

curl -i \
--header 'Authorization: Bearer <token>' \
--request GET 'https://<hostname>/api/20210901/system/safeDomains'

Example of Request Body

Not applicable.

Example of Request Header

Not applicable.

Example of Response Body

If successful, the response body contains an array of safe domains configured for the Analytics instance with the following structure:
[    
 {     
    "domain": {        
        "img-src": Boolean,        
        "frame-src": Boolean,        
        "script-src": Boolean,        
        "font-src": Boolean,        
        "style-src": Boolean,        
        "media-src": Boolean,        
        "connect-src": Boolean,        
        "frame-ancestors": Boolean,        
        "form-action": Boolean     
      }   
 }
]

For example:

Status 200:

[  
  {     
      "api.mapbox.com": {        
        "img-src": true,        
        "frame-src": true,        
        "script-src": true,        
        "font-src": true,        
        "style-src": true,        
        "media-src": true,        
        "connect-src": true,        
        "frame-ancestors": false,        
        "form-action": false     
       }  
   },  
   {     
      "*.dropboxapi.com": {        
        "img-src": true,        
        "frame-src": false,        
        "script-src": false,        
        "font-src": false,        
        "style-src": false,        
        "media-src": false,        
        "connect-src": true,        
        "frame-ancestors": false,        
        "form-action": false     
       }  
    },  
    {...    
    }
] 
Back to Top