Requirement is to create some Threshold profile folders, profiles and rules via API but for them to be associated only to a specific tenant.
The API endpoints used to fulfil this request are below:
http://<data_aggregator>:8581/rest/eventprofiles/documentation
http://<data_aggregator>:8581/rest/eventprofilegroups/documentation
http://<data_aggregator>:8581/rest/eventrules/documentation
If this task is done manually via the GUI (either from the Admin account and then Administering the Tenant or via logging in using one of the tenant Admin accounts), it works fine. Everything created stays only in the tenant it was created in and if you open up a new tenant configuration, it won't be visible.
However, when creating them via REST API calls, the problem is that they are associated and visible from any Tenant (default and all Tenants present in the application). If a profile, rule or folder is deleted from any tenant it will be removed from all other tenants as well.
How can this be changed to work the same as manually doing it from the GUI?
DX NetOps CAPM all supported releases
The URL has to contain the tenantID, as per the following sample
../rest/tenant/<tenantID>/discoverprofiles
It is important to know what ID the tenant has and also the IPDomain.
IPDoman: /rest/ipdomains
Tenants: /rest/tenants
To get the Tenant ID use the following URL in the Browser:
http://<Portal-server>:8181/pc/center/webservice/tenants
- shows a list of the known tenants with detailed information.
http://<Portal-server>:8181/pc/center/webservice/domains
- shows a list of the known domains with detailed information.
So, in this case:
http://<data_aggregator>:8581/rest/tenant/<tenantID>/eventprofiles/documentation
http://<data_aggregator>:8581/rest/tenant/<tenantID>/eventprofilegroups/documentation
http://<data_aggregator>:8581/rest/tenant/<tenantID>/eventrules/documentation