You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to use exposed API in order to perform some actions in our reportportal instance.
We are trying to create a new user and then use this new user in order to perform other actions (like creating widjets, dashboards, etc.).
STEPS:
We Create a new user via {url}/api/v1/user.
Then we Create UI_token {url}/uat/sso/oauth/token. We take the access_token in order to use it for the Get API token call.
We are trying to get the api token through {url}/uat/sso/me/apitoken.
The problem is that we take error:
Code 404 - Not Found
Body: { "errorCode": 4046, "message": "User 'test' not found."}
As far as we can see, the calls are correct, but it seems that a step is required between steps 2 and 3.
To be more precise, if after step-2 we login manually to reportportal, then the step-3 will pass.
So, it seems that user is created but not "activated"...
Using reportportal UI
As we can see in the UI, the first time we login we can see 2 different apitoken calls. The first one fails with 404, and the second one passes. This is visible in "Network" tab but also in the errors in the "Console", as it is illustrated bellow:
ReportPortal version:
The text was updated successfully, but these errors were encountered:
istamoulis
changed the title
Cannot "activate a new created user through exposed API
Cannot 'activate' a new created user through exposed API
Apr 20, 2021
@istamoulis Faced the same problem. If you notice in the network tab the second apitoken call is a POST request instead of a GET. Just make it POST straight up the first time and it'll work. After that GET also works.
been a year so you probably figured that out yourself!
@joelpramos thanks for sharing. It has been almost a year, but since we did not use the script so much, we had not found a solution. I just tried the POST before the first GET and indeed it works! Thank you for sharing!
We are trying to use exposed API in order to perform some actions in our reportportal instance.
We are trying to create a new user and then use this new user in order to perform other actions (like creating widjets, dashboards, etc.).
STEPS:
The problem is that we take error:
Code 404 - Not Found
Body:
{ "errorCode": 4046, "message": "User 'test' not found."}
As far as we can see, the calls are correct, but it seems that a step is required between steps 2 and 3.
To be more precise, if after step-2 we login manually to reportportal, then the step-3 will pass.
So, it seems that user is created but not "activated"...
Using reportportal UI
As we can see in the UI, the first time we login we can see 2 different apitoken calls. The first one fails with 404, and the second one passes. This is visible in "Network" tab but also in the errors in the "Console", as it is illustrated bellow:
ReportPortal version:
The text was updated successfully, but these errors were encountered: