For password authenticated web applications it is possible by following these steps:

  1. All brokers effectively have Parameter UseSession = 1;
  2. REST web application and client web application allow only authenticated (i.e. password) access.
  3. REST web application and client web application have reasonable Session timeout (i.e. 900, 3600).
  4. REST web application and client web application have the same GroupById value.
  5. REST web application and client web application have the same cookie path.

If all these conditions are met, user would only consume one license slot per session and perform only one login.

Check out my upcoming webinar, we definitely would be discussing authentication.

Hello, everyone!

It's my first big webinar in English so I'm starting with the topic I'm familiar with  - REST APIs.

The main goal of this webinar is to  discuss REST APIs and how can we design them so they can evolve and grow without causing too much problems for everyone involved. Versioning, software layers separation, Broker separation - that kind of thing,

I would also like discuss some common challenges and how can we bypass them.

Then the tooling for the whole development life-cycle (dev-debug-test-document) would be presented.

And finally I'll show some REST API examples. Well, mainly UI clients for these APIs.

If you have a question about REST that sounds more or less relevant to the topics above - please post it here (or mail directly to me), I'll try to cover it too if possible.

First of all, you're calling class methods, so you don't need a file object. Instead of:

s file=##class(%File).%New()
d file.CopyFile(File,ArchivePath)
d file.Delete(File)

It's enough to write:

do ##class(%File).CopyFile(File,ArchivePath)
do ##class(%File).Delete(File)

Other things to consider:

  • You have file and File variables. That makes understanding what's going on more difficult than it should be.
  • Using full command names (set instead of s, do instead of d, etc.)

But, %File class has a method specifically for moving, so it's better to call it:

set Success = ##class(%File).Rename(File, ArchivePath, .RetCode)
write:(Success=$$$NO) "Rename failed with code: " _ RetCode