Hi Andreas,
if you have shared assets in your tenant, then you get the data also via API calls.
If I try to access a shared asset via this call
/api/assetmanagement/v3/assets/{sharedAssetId}
i will get 404 Not found
If I do it this way
/api/assetmanagement/v3/assets/{sharedAssetId}?includeShared=true
I get 200 OK
Regards
Thilo
Depends on the security. We have a multitenant app. So each tenant only sees it's own data. But we have a country tabel that can be accessed by all the tenants. It would been a bit silly to duplicate that table for each tenant. But this can all be done in your security settings. Do note that multi tenant apps needs to check their security regurlaly. You can easily make mistakes. It would be nice if multitenancy got platform support so that the platform would handle all this stuff.
Regards,
Ronald
Hello Ronald,
thanks for your answer, but I don’t really untersand what that exactly means for my own application.
In my case, I’ve got two different Mindsphere Tenants.
Tenant 1 includes my assets.
Tenant 2 includes the developer cockpit.
So the developer cockpit isn’t in the same Tenant as my created Assets are. So I’ve shared the Assets. Now I can also see them and their data in my second Tenant.
But I’m not sure if I can get their data in to a mendix app (for the tenant with developer cockpit), due to the fact that they are shared Assets.
Best,
Andreas
Hi Andreas,
you should have mentioned that your are asking about MindSphere Assets in your first question to avoid confusion.
Per default the MindSphere Asset API does not include the shared assets.
You need to add the parameter includeShared=true to your API call.
Regards
Thilo
Hello Thilo,
sorry, thats my fault,
Thank you for the answer.
I have tried it but know I get the error 403- acces forbidden.
My conclusion is, that I have got the right URL for the API call.
But I am wondering if its possible to get data from those “shared assets” in general?
Or do I have to connect the Assets with the same Tenant in which I have got the developer cockpit?
best regards
Hello Thilo,
I found the error. I just forget the question mark in front of the “includeShared=true”.
Thank you very much!!!
best regards
Andreas