U

1 Message

 • 

700 Points

Tuesday, September 3rd, 2024 10:05 PM

Using REST API with Python when Collibra is behind Okta authentication

I want to use Collibra's REST API through a Python script, but I cannot figure out how to log in/authenticate as my Collibra platform is behind Okta for authentication. I have seen the code samples in the API documentation but these do not work for my purposes as they do not account for Okta.

How would I go about authenticating and making requests based on what I explained?

86 Messages

 • 

3K Points

3 months ago

The API can accept a basic authentication:

session = requests.Session()
session.auth = (user, password)
response = session.get('http://' + hostname + '/rest/applications')

Beyond that you wouldn't want to program your user, password in plaintext so you would want to use a function with something like cryptography.fernet import Fernet to encrypt and decrypt your user/password.

Loading...