Manage Organization Assignments to Proxies using PAPI

As a Portal Admin, you can manage organization assignments to proxies using the
Proxies
resource for the Portal API (PAPI). Requests for organization assignment are handled by way of calls to the
/deployments/1.0/proxies/{uuid}/organizations
endpoint.
Retrieve the Organizations Assigned to a Proxy
Issue the following command:
curl -H "Authorization: Bearer {token}" https://{portalApiHost}/{tenantId}/deployments/1.0/proxies/{proxyUuid}/organizations
Example request:
curl -H "Authorization:Bearer 5d9646b0-6290-412c-98c3-82cba4c88fce" -request GET "https://apim-ssg-apim-uswest-prod.app.prod.w2.dev.ca.com:443/atenant/deployments/1.0/proxies/d55b86a3-e5ab-48e6-8762-7078ea23bc83/organizations for local environment: curl --include --header "Authorization:Bearer 70f8c255-8d0c-4362-95e9-652569c6e9e0" \ --request GET "https://apim-ssg.dev.ca.com:9443/t1/deployments/1.0/d55b86a3-e5ab-48e6-8762-7078ea23bc83/organizations"
Example response:
[ { "uuid": "2c7f1bbd-c79d-4202-83c8-e8aa7f8ce565" "name": "Organization A" }, { "uuid": "de484ed2-cea4-4adc-885b-bf495f94b9f7" "name": "Organization B" } ]
Assign an Organization to a Proxy
Issue the following command:
curl -X PUT -H 'Authorization: Bearer {token}' -H 'Content-Type:application/json;charset=utf-8' \ https://{portalApiHost}/{tenantId}/deployments/1.0/proxies/{proxyUuid}/organizations \ -d '{"orgUuid": "{orgUuid}"}'
Example request:
curl -X POST -H 'Authorization: Bearer 5d9646b0-6290-412c-98c3-82cba4c88fce' -H 'Content-Type:application/json;charset=utf-8' \ https://apim-ssg-apim-uswest-prod.app.prod.w2.dev.ca.com:443/atenant/deployments/1.0/proxies/d55b86a3-e5ab-48e6-8762-7078ea23bc83/organizations \ -d '{"orgUuid": "2c7f1bbd-c79d-4202-83c8-e8aa7f8ce565"}' for local environment: curl --include --header "Authorization:Bearer 70f8c255-8d0c-4362-95e9-652569c6e9e0" \ --data '2c7f1bbd-c79d-4202-83c8-e8aa7f8ce565' \ --request PUT "https://apim-ssg.dev.ca.com:9443/t1/deployments/1.0/proxies/d55b86a3-e5ab-48e6-8762-7078ea23bc83/organizations"
Unassign an Organization from a Proxy
You unassign organizations from proxies by editing the proxy using
API Portal
. For more information about how to edit proxies, see Manage Proxies.