I am automating Tenant creation process through the REST API for DSM 20.0 and am getting an "error 500" when invoking the following call:
POST https://my-dsminstance.com/api/tenants?confirmationRequired=false&asynchronous=true
Headers:
api-version:v1
api-secret-key:xxxxxxxxxxx
Body:
{
"name": "TESTTENANT01",
"description": "",
"timeZone": "Europe/Madrid",
"locale": "en-US",
"demoMode": false,
"modulesVisible": ["all"],
"hideUnlicensedModules": true,
"tenantState": "active",
"administrator": {
"username": "basic_user",
"password": "-4o)mq!I",
"fullName": "",
"description": "",
"active": false,
"emailAddress": "test@test.com",
"roleID": 1
}
}
I think that this may be related to the multi-tenant license being expired (we are already dealing with that), but funny thing is that from the GUI, tenants may be created successfully, despite the license being expired.
Does this really have to do with the licensing or I am missing anything else?
Does this really have to do with licensing?
Maybe.
Looking at the provided example and your information, I don't see anything obviously incorrect or concerning. And it's certainly possible that the expired licensing could impact the API in ways it doesn't affect the GUI, but that isn't a known feature. So fixing that would be a great first step, but not a guarantee.
If the API is still not functioning, suggest contacting support and including logs from around the API call. Normally when a 500 error is returned to you, there is some logging indicating what happened to cause it. They can be tricky to solve without that info.
P.S. I work for Trend Micro R&D