Hi, I was navigating through this <https://www.go...
# gooddata-cloud
j
Hi, I was navigating through this https://www.gooddata.com/docs/cloud/manage-organization/set-up-cors-for-organization/ and there is a section where it shows an endpoint to enable CORS via API, but this endpoint doesn't seem to be present in the API docs
/api/v1/entities/admin/organizations/default
I also tried to make the request via Postman but it did not seem to work. Does anyone know if this API endpoint still a valid thing and I am maybe missing something, or is there another way to add a new CORS domain programmatically?
👀 1
j
Hi Jhonatan, Are you getting any error while using this endpoint or what exactly happens? Could you please share with us how your API body looks like (if needed please amend any sensitive data).
j
body:
Copy code
{
  "data": {
    "attributes": {
      "allowedOrigins": [
        "domain-xxx"
      ]
    },
    "id": "default",
    "type": "organization"
  }
}
response:
Copy code
{
  "detail": "The requested endpoint does not exist or you do not have permission to access it.",
  "status": 404,
  "title": "Not Found",
  "traceId": "ae4091626a76f63e2a1cab3fe4e61b1c"
}
👀 1
as I did not find the endpoint here: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all I figured this endpoint doesn't exist anymore? 🤔
j
I can confirm that the endpoint exists and works for me without any issue.
Have you added your organization ID in the end of the URL?
the whole URL should look like this:
https://<hostname>/api/v1/entities/admin/organizations/<orgID>