-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Create remote dashboard #2416
Comments
@caiohcl - you need to create an api token for yourself. Log in as admin, then go your admin settings. Then click Generate API tokens > New. Enter the username you want to use then set your expiration date to an acceptable future date, click Create. Write you token down as you will not be able to see it again. Now take that token and insert it into this command: Now when you issue create dashboard requests you need to set two headers. |
@matthewbeasley , it worked! Thank you!!! |
Hi caiohcl |
Hey @alekya123
|
@caiohcl - i tried doing
PFA the values passed in the request and the 401 response i get... what am i missing? Please let me know. |
Hey @chenthilan , First off, log into your Hygieia instance as admin. Then, go to Settings -> Generate ApiTokens -> New. Save the apiUser you created and the apiKey generated. After that, open your CLI and run the following command: This command will generate two lines, something like this: Join them, and use the result as apiToken. Your Rest API call should be something like this:
You should be authorized now. Let me know if you face any other issue. |
hello, I am trying to use the above Authorization token for github webhook. There is no option to set it up within in github webhook setup interface. Is there a way to set it up please? |
@hammad-bbc github webhook does not require web token. However it needs |
@rvema thanks for your reply. our url is www.github.com/[companyname]. Should we just use this url as value for webHook.gitHub.githubEnterpriseHosts[0] as we are not on enterprise github? Also, we use 2 factor auth, is that going to create any hurdles when we use github collector or webhook? I have also tried postman to post the github webhook payload along with adding a authorisation header that hygieia required and did manage to post it to hygiei. I can see the commit info on to the widget. |
@hammad-bbc just |
@caiohcl @matthewbeasley @rvema, Currently, I'm able to create a dashboard, but no widgets. I found the Thanks. |
Hey!!
I've been working on automate the creation of team dashboards through Hygieia API, calling the POST /dashboard/remoteCreate API.
I can successfully run and create the team dashboard on swagger. However, when I run the same curl code on my cmd, I get the following unauthorized message:
The curl command is the following:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "metaData": { "applicationName": "String new application", "componentName": "String new application", "owner": { "authType": "STANDARD", "username": "admin" }, "template": "testing", "title": "dash new application", "type": "team" } }' 'http://localhost:9080/api/dashboard/remoteCreate?api_key=$apiKey'
Have anyone faced the same problem? Did I forget to include some information?
The text was updated successfully, but these errors were encountered: