How to Extract Jira test results data using azure data factory..? - azure-data-factory

I am facing the issue with extrct projects test results data from Jira using API in azure data factory.
Please help me on this..

I don't have experience using XRAY API, but I have made other API calls via ADF. Based on Xray documentation you would need to make two API calls in ADF.
Get Access Token/API Key
Use Access Token to Get Test Results
Theoretically it would look something like this using these links:
https://docs.getxray.app/display/XRAYCLOUD/Authentication+-+REST
https://docs.getxray.app/display/XRAY/Tests+-+REST#TestsREST-GettingallTestsstatuses
Step 1: Get Access Token (refer to link and screenshot here)
Step 2: Use Access Token to get Test Results (refer to link and screenshot)
This should be pretty close to what you need, but I am unable to test since I don't use xray, but I hope this helps.

Related

Azure data factory and Log analytics

I want to perform some validation checks in ADF on my input data and any validation failures want to capture into Azure log analytics.
Can someone guide me how to capture the custom logs into log analytics through Azure Data Factory please.
Any example dataflow/pipeline would be very helpful.
Thanks,
Kumar
If I understand correctly you want to be able to get the Azure Monitor logs for ADF and query/store these logs?
Well the good news is most of the information you would want to see is already collected through Azure Monitor.
One of the simple methods to pull the information is to use the Azure Monitor REST API. You can then store the response into a file or table, or you can just query the api for specific pipelines or triggers etc.
Here is a link with example of Authorization and using the Azure Monitor API:
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/rest-api-walkthrough#authenticating-azure-monitor-requests
This is an example of the HTTP URL using the Azure Monitor REST API to get Activity Run data (Dynamic content syntax):
#{concat('https://management.azure.com/subscriptions/', linkedService().SubscriptionID, '/resourceGroups/', linkedService().ResourceGroupName, '/providers/Microsoft.DataFactory/factories/', linkedService().DataFactoryName, '/pipelineruns/', linkedService().RunID, '/queryActivityruns?api-version=2018-06-01')}
Here are all the different ADF Metrics that can be pulled from Azure Monitor:
https://learn.microsoft.com/en-us/azure/data-factory/monitor-using-azure-monitor#data-factory-metrics
Here is an example of a REST Linked service in ADF that can be used to call the rest api:
You could then create a dataset that will pass all the values to the linked service so that you can call the API, and copy the response to a DB, like here:
This particular example is getting the status of a specific Pipeline RunID, but it can be much more broad than that.
Here is what the request body looks like so that I could filter to just failed pipelines in the last day:
I'm looking into this myself, as far as I can tell you would have to use a REST or HTTP connector to send a POST request to the HTTP Data Collector API in Log Analytics. More details here: https://learn.microsoft.com/en-gb/azure/azure-monitor/logs/data-collector-api

How to use zapi for zephyr jira

I want to create an automated process for my tests. I am using jira and zapi. I want to try interacting with my tests in zephyr-jira using postman api. The thing is there isn't much documentation on how to use zapi.
First thing, what is the url? Is it test.atlassian.net/jira/?/?/?/apifunction?
Second thing, I can generate an access key and secret key but it seems like I also need an authorization jwt token, how can I generate one that I can use via postman?
Any help would be appriciated.
The apiary documentation is here https://getzephyr.docs.apiary.io/#
That will help you assemble the requests. What the requests and responses actually represent is still confusing (to me, anyway).
In postman: https://{{JiraHost}}/rest/zapi/latest/
some examples:
https://{{JiraHost}}/rest/zapi/latest/cycle/830
https://{{JiraHost}}/rest/zapi/latest/cycle?versionId=21689

Azure Custom Connector for 3rd Party API with Oauth 2.0 access token

I am trying to get data from a 3rd party API into an Azure SQL DB using Azure Data Factory with out using SSIS.
This lead me down a rabbit hole and I have been searching for 3 days now and cannot find a solution.I must be missing something.
I have tried using Azure Data Factory and the copy data controls.
I then tried using power apps and cant find anything that helps.
I then tried custom connector, from scrach, from postman and from OpenAPI
I cannot get any of it to work!
I really thought this would be easier than this?
I have read almost all of the standard MicroSoft documentation and none of it helps with my specific scenario.
I have a third party web site that I get an authorisation token from using a username and password with grant-type=password
Using this token I then get JSON data from the site.
I want to get this data into my SQL DB in Azure.
Thats it!
Any help would be greatly appreciated.
Thanks...
PS:Next step is the same thing but API returns XML, rabbit hole 2...
Here is a official guide that import data from Azure Storage to Azure SQL Database using pipeline.
I think this guide will be helpful for you. Before you follow this guide to meet your requirement, you should import your JSON data from 3rd party API first. So you can use Azure logic App to finish this process quickly.
I have finished this process , it is easy and just few steps :
1. Getting access token from 3rd party identity provider(here I use Azure AD as identity provider, just for demo) using http request action:
2. Generally , we can get an access token from step1 , use this auth info to call your 3rd API to fetch json data using http request action directly:
The API I am using is a sample demo one, just reply a json as :
{
"name": "stan",
"id": "123"
}
Using create blob action to create a blob file with the json content from previous step (you should create a storage account with a blob container first , so that you can store files, here I name the json file with guid)
Run this logic App you can see that a json file has been created in Azure storage account with the json data from API :
So the steps left , you can just refer to the official guide to import data to your SQL, just selecting json as resource format in Configure source section.
If you have anything unclear , pls feel free to let me know. Hope it helps : )

How to grab all the issues inside a jira structureboard using REST api

I have been researching Jira REST api in order to grab all the test cases inside my structures but I haven't had any luck. The closes I have been to getting inside a structure is using the URL $baseUrl/rest/structure/2.0/structure. From there I tried to manipulate the url into giving me all the information about a specific structure.
For example, I used $baseUrl/rest/structure/2.0/structure/$id but I only got back
{"id":135,"name":"TEST PLAN 1","description":""}
There is hardly any information in this REST api call. IS there a way to have it list out all the issue keys(test cases) in the structure i pick?
Information Regarding JIRA Structure REST API is posted here https://wiki.almworks.com/display/structure/Forest+Resource

Tableau - API Call to Show Everything a User Has Access To

is there an API call, or a link of API calls in which I can show the following structure
Sites User Has Access To
- Projects User Has Access To
-- Workbooks User Has Access to
--- Views User Has Access To (Including Thumbnails)
I'm currently using a mix of the API and directly accessing (not strictly true but that's another story) the PostgreSQL DB. It works and it s pretty neat hack, but I'd rather avoid hacks
I was using 8.3 but now on the latest v9 release
Thanks
I'm using Tableau API to do this, it seems pretty straightforward, but maybe I'm missing something.
Following API reference:
Tableau REST API reference
Sign in and impersonate, use retrieved token in following API calls
Query sites
For each site query workbooks
For each workbook query views
For each view download preview image
Sign out