No documentation on how to logon/logoff when using gql directly
The documentation about the ScienceLogic GraphQL API only mentions a login procedure when using the /gql endpoint. There is no information about how to log on (or log off) on the ScienceLogic platform and then use the API.
Link to the documentation: https://docs.sciencelogic.com/latest/Content/Web_Content_Dev_and_Integration/GraphQL_API/graphql_introduction.htm#authentication-and-user-access
For Logon, I have found a way to achieve this:
- execute a GET request to <platformURI>/authenticate with basic authentication, using a valid SL1 Local user information.
- From the response received, save the cookie information for later
Any subsequent call to the /gql endpoint (inserting the cookie information on each request) allows me to execute gql queries/mutations. I can also reuse that same cookie information if I want to execute REST API actions.
However, I do not succeed in 'forcing' a logoff from my previously created session: whatever I do, my session remains active and usable in the System > Monitor > Audit Logs. Only when I explicitly kill the session in that screen is my session invalid and I must login again.
Can this be added to the documentation please?