API Request (users and AETs)

I don’t see anywhere in the API documentation that allows you to add RegisteredUsers to an Orthanc instance’s config, nor to add AETs.

Could I request that both be added please?

Thanks!

Dave

Hi Dave,

You can use the REST api to manage remote modalities (AETs). Refer to the documentation https://book.orthanc-server.com/users/rest.html#id2

Firstly, if you want the changes to persist, you will need to set DicomModalitiesInDatabase in the config file to true. You can then use the rest api (refer to /modalities endpoint listed https://docs.google.com/spreadsheets/u/1/d/e/2PACX-1vSBEymDKGZgskFEFF6yzge5JovGHPK_FIbEnW5a6SWUbPkX06tkoObUHh6T1XQhgj-HqFd0AWSnVFOv/pubhtml?gid=654036639&single=true)

Regarding managing users, I suspect you will need to create a script to update the config file with the additional users and restart orthanc. To the best of my knowledge there isn’t an endpoint to do this.

We use a separate authentication system that provides a JWT and in Orthanc authenticate by validating the JWT in the Authorization header.

Hope that helps.

Regards,

James

James,
Thanks for the feedback. From the spreadsheet I see that the modalities only has a GET method, which I had assumed meant that it was a “read only” from the system, rather than the ability to “PUT” (which I would’ve assumed to have been a POST method).

I will definitely have a pop at playing with this, thanks.

Dave

PS. On behalf of those around the world know that we’re appalled at the ferocity of what Australia is going through. I live in California and we get our fair share of wildfires, but what you’re experiencing is awful. Our thoughts and prayers are with you (I have family over there, on the East coast)

RTFM Dave …
Just re-read that page “The modalities can then be updated through the API too:” … that was a bit of a giveaway now, wasn’t it?

Dave,

I’m afraid the feature request to add registered users will be rejected.
See https://book.orthanc-server.com/faq/improving-interface.html
To perform this, you might better have just a single system registered user used by a plugin you would develop and which would handle actual users using Orthanc, with even more advanced permission management (with groups, and so forth).

As for the AET modalities, I guess you’ve read the doc know so you should be able to figure it out :).

Kind regards,

Michel