I'm creating a JavaScript app for a Smart TV to show dashboards on the tv. I get the list of dashboards with the JIRA REST API. The url I use for this is:
jira/rest/api/2/dashboard?startAt=&maxResults=
afterwards I create a wallboard as followed to show them on the tv:
jira/plugins/servlet/Wallboard/?dashboardId=&os_username=&os_password=
because of the os_username
and os_password
, JIRA knows i'm authenticated and gets the right list. this list is the one i need from the beginning but because i call the url above with the parameters os_username
and os_password
it does get the right list
but on start up of the tv/the first time i get the list of dashboards with JIRA there is no one authenticated so it takes a random list, not the one i need to get.
there is some way to authenticate in JIRA with the command below:
curl -D- -u fred:fred -X GET -H "Content-Type: application/json" http://example.com/rest/api/2/issue/createmeta
but i don't know how to use that command in JavaScript.
So can anyone tell me how i can authenticate in JIRA with basic authentication and very important IT HAS TO BE JAVASCRIPT.