Login to Swimlane using python scripts

Hi everyone,
I’m new to Swimlane and python.
I tried to use python script such as requests.post to login to Swimlane that runs on my testing server.
But It still has an error shown as “Response 401”.

Do you have any instruction or basic code for login to Swimlane using API?

Hi @pchanon_pk ,

Below is an example on how to connect to the Python driver.

from swimlane import Swimlane
#Connect Swimlane client
swimlane = Swimlane(‘https://192.168.1.1’, ‘username’, ‘password’)

More information can be found following this link Swimlane Client — Swimlane Python 10.12.0 documentation

Let me know if this help with what you’re trying to do.

Thank you,
Kevin Mata

As a side note I highly recommend not using the username / password method but the Personnel Access Token (PAT) for all scripts.

  1. One it is easier to revoke and rekey
  2. Your PAT cannot be used for interactive login

Tom Goetz
Senior SOAR Engineer
Phoenix CyberSecurity