Enable CORS For an Organization

In GoodData.CN you can enable cross-origin resource sharing (CORS) in an organization to get around the same-origin policy browser restrictions. With CORS enabled you can make GoodData.CN resources, which are hosted on one domain, accessible to you from any other domain listed in the CORS allowedOrigins list.

Add Allowed Origins To An Organization

To set allowed origins for an organization use the /api/entities/admin/organizations/default API endpoint:

curl -v -X PUT -H 'Content-type: application/vnd.gooddata.api+json' \
    -H "Authorization: Bearer <token>" \
    -d @organization.json $HOSTNAME/api/entities/admin/organizations/default

where organization.json contains

    "data": {
        "attributes": {
            "name": "Default Organization",
            "hostname": "<host-name>",
            "oauthClientId": "<client-id>",
            "allowedOrigins": [
        "id": "default",
        "type": "organization"