LeanIX API
-
PatrickHas successfully completed the online course Introduction1 year ago #39950
Hi,
I don’t know how to configure a rest connector in Simplifier to get a Bearer Access Token for LeanIX!
Here is the link to the documentation part of LeanIX:https://docs.leanix.net/docs/authentication
I set the following target URL to (xxx means our workspace):
https://xxx.leanix.net/services/mtm/v1/oauth2/token
I think at least the following parameters are required, right?:
verb = POST
postFormat = JSON
postBody = ?I tried to post the settings object (from the documentation) in postBody but it doesn’t work.
How to send the query params like the api token in headers (from our technical user in LeanIX) or the grant_type in data correctly?
Attachments:
You must be logged in to view attached files.Andreas DallnerHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification1 year ago #40103::Hi Patrick,
According leanix-docu you have to add the grant_type to the postbody.
You can do that e.g. in advanced mode with configuring parameter “postBody/grant_type” and the constant value “client_credentials” or by configuring the postbody via struct in standard mode.
For more details on how to configure the postbody see our documentation (https://community.simplifier.io/doc/current-release/integrate/connectors/rest-connector/rest-connector-calls/#1601990888609-6cd28084-0916)
For me it is not totally clear in leanix docu whether to use postFormat JSON or FORM. Just try both to see which one is working.
Have you already configured a login method with username “apitoken” and the apitoken as password and assigned it in the connector endpoint?
Kind regards,
AndreasPatrickHas successfully completed the online course Introduction1 year ago #40105::Hi Andreas,
perfect, thanks! With the parameter “postBody/grant_type”, the constant value “client_credentials” and the postFormat FORM it finally works – JSON doesn’t work!
We have also stored our apitoken in “headParams/authorization” as a constant value in Base64 encoding so that the access token can be retrieved at any time in the app. We also use a server-side business object to call the connector.
Best regards
PatrickAndreas DallnerHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification1 year ago #40109::Hi Patrick,
good to hear it is working now.
Just one hint: Setting auth header as fixed param is fine as long as you are only working with one LeanIX instances. As soon as you want to use another instance or user for testing purpose you should let do Simplifier the work and define the auth for each instance and assign it in the relevant endpoints.
Kind regards,
Andreas
You must be logged in to reply to this topic.