Skip to main content
Question

Hello Team,In ML workbench i am getting pycelonis permission error.Can you please suggest how to solve this error?

  • March 15, 2024
  • 9 replies
  • 12 views

amey.punek12
Level 3
Forum|alt.badge.img

I want to know how to get the login history data using API. I have created the APP Key and also given the permission to the key but still when i am running it in ML Workbench i am getting pycelonis permission error. Can you please suggest to tackle this error.

9 replies

dennis.pflug
Level 10

Hi Amey,

 

when you saw you have given the permissions to the key you mean the steps described here I guess?

 

Connecting audit log, login history, and studio adoption APIs to Celonis Platform

 

Have you also performed the Test API with Swagger steps?

https://docs.celonis.com/en/connecting-audit-logs.html#UUID-b37da4e7-a606-2b05-413d-91f162c1a3b4_section-idm4647015716131233966360086594

 

BR

Dennis


mukesh.gupta11
Level 7
Forum|alt.badge.img+15

Hello Amay,

Provide the correct permission to ml workbench application. If you have taken the default app key for the ml workbench then application name would be similar to ml workbench name.


amey.punek12
Level 3
Forum|alt.badge.img
  • Author
  • Level 3
  • March 18, 2024

Hi Amey,

 

when you saw you have given the permissions to the key you mean the steps described here I guess?

 

Connecting audit log, login history, and studio adoption APIs to Celonis Platform

 

Have you also performed the Test API with Swagger steps?

https://docs.celonis.com/en/connecting-audit-logs.html#UUID-b37da4e7-a606-2b05-413d-91f162c1a3b4_section-idm4647015716131233966360086594

 

BR

Dennis

I am trying below code:

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)

 

After execution i am getting 'PyCelonisHTTPStatusError: ' Is there any way to resolve this error.


amey.punek12
Level 3
Forum|alt.badge.img
  • Author
  • Level 3
  • March 18, 2024

Hello Amay,

Provide the correct permission to ml workbench application. If you have taken the default app key for the ml workbench then application name would be similar to ml workbench name.

I am trying below code:

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)

 

After execution i am getting 'PyCelonisHTTPStatusError: ' Is there any way to resolve this error.


mukesh.gupta11
Level 7
Forum|alt.badge.img+15

I am trying below code:

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)

 

After execution i am getting 'PyCelonisHTTPStatusError: ' Is there any way to resolve this error.

use Bearer instead of Appkey since you are using userkey for the authentication.


amey.punek12
Level 3
Forum|alt.badge.img
  • Author
  • Level 3
  • March 19, 2024

I am trying below code:

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)

 

After execution i am getting 'PyCelonisHTTPStatusError: ' Is there any way to resolve this error.

We have given the authentication to the user. We have used the Bearer but we got the same error. We have used as below.

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"Bearer{API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)


mukesh.gupta11
Level 7
Forum|alt.badge.img+15

I am trying below code:

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)

 

After execution i am getting 'PyCelonisHTTPStatusError: ' Is there any way to resolve this error.

instead of this:

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

 

try this :

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"Bearer {API_KEY_USER}"

           }


amey.punek12
Level 3
Forum|alt.badge.img
  • Author
  • Level 3
  • March 20, 2024

I am trying below code:

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)

 

After execution i am getting 'PyCelonisHTTPStatusError: ' Is there any way to resolve this error.

Still we are getting the error.


mukesh.gupta11
Level 7
Forum|alt.badge.img+15

I am trying below code:

API_KEY_USER = "api"

 

header = {

   "Content-Type": "application/json",

   "Authorization": f"AppKey {API_KEY_USER}"

           }

url="https://YOUR-TEAM-DOMAIN.celonis.cloud/api/external/authentication-events"

 

b= c.client.request("GET" , url=url,headers=header)

 

After execution i am getting 'PyCelonisHTTPStatusError: ' Is there any way to resolve this error.

Check with the Service Desk, they might help you.