Jump to content

API Calls using APIKey method - session persistence


Recommended Posts

@Steve G

Can I just double check that when invoking API methods using the APIKey connection parameter, does the session persist?

I was thinking the session is closed after each method is invoked, but when looking at the User in the Admin Tool it is showing as Online.

If the session does persist, is there a method that is required to be called to terminate the session? The UserLogon/Logoff methods seem to only relate to sessions being made with username/password combinations.

Cheers

Martyn

Link to comment
Share on other sites

6 hours ago, Martyn Houghton said:

when invoking API methods using the APIKey connection parameter, does the session persist?

Yes. (as far as I know @Steve G ?)

6 hours ago, Martyn Houghton said:

I was thinking the session is closed after each method is invoked

No, it won't be.

6 hours ago, Martyn Houghton said:

is there a method that is required to be called to terminate the session?

Yes, as you noticed userLogoff can be used. There is also sessionClear.

7 hours ago, Martyn Houghton said:

The UserLogon/Logoff methods seem to only relate to sessions being made with username/password combinations

Why would you think this? I don't see anything in the API documentation that indicates as such...

 

This being said...why? Why would you want the session to be closed after an API call? In terms of session the platform is not aware or does not know if that session was created with an API key or not. It would be a nightmare for your server(s) if you were to close a session after each API call... 

Link to comment
Share on other sites

@Victor

The reasoning for my presumption was that in the code examples and API documentation UserLogon and UserLogoff appear to only apply to connections using username and password connections. There is no reference to using them with the API Key.

The UserLogoff call only appears to accept the a Input Parameters in relation to Support Passcodes.

I will take a look at the sessionClear, but it looks like the api documentation page which has been slow for a while is now timing out.

image.thumb.png.eba8784fd48ba882398f579455d5be40.png

Cheers

Martyn

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...