I need to get the changes of a particular job (not the build) through rest api.
I am able to get the changes relates to a build but unable to find the rest api to get the changes of a particular job.
I have used "http://jenkis_url:port/job/job_name/changes/api/json". This does not get display any useful data that I need but throws 404 error.
I can get changes of a build using the "http://jenkis_url:port/job/job_name/build_no/api/json".
Please suggest me the REST API to get the changes of a job.
Related
I am working on a GitHub automation using github APIs. As a part of this automation, I want to get the status of "Code Scanning".
https://api.github.com/repos/{Org}/{repo}/code-scanning/analyses
I have tried with above API endpoint but it's not giving me whether the code scanning is enabled or not. Its only retrieving the executions of code scanning. Therefore, if a user enabled the code scanning and then disabled it, then the above endpoint will retrieve result set for previous executions.
I checked the Graphql documentation as well, but I couldn't find any resource to retrieve this. Following is the field I want to retrieve using an API call.
GitHub code scanning field
I want to extract status report from coverity using rest api calls for particular report name. Is there a way to extract the reports via api.
I tried multiple api calls and went through their api webservice documentation but did not find anything. Like:https:///doc/en/api/cov_platform_web_service_api_ref.html#Overview
api call: https://:/api/viewContents/projects/v1/All%20Projects?projectId=*
Columns enabled for All Projects.
All Project Column Settings
This is how We want to pull data via API call:
Status Report
The requirement is to fetch all the work items between different releases and create a report. The list of work items can be fetched using below API call.
https://vsrm.dev.azure.com/{organizationName}/{projectName}/_apis/release/releases/{currentReleaseId}/workitems??api-version=6.0&baseReleaseId={baseReleaseId}
Now, for each of this work item, we also need to know the build version when it is delivered. I'm not able to find any entries related to build/release in the work item data fetched using
https://dev.azure.com/{organizationName}/_apis/wit/workItems/{ID}
Is there any relationship between work item tasks and respective build or release definition ID when it was delivered?
Is it possible to retrieve build definition ID related to a work item using Azure DevOps REST API?
The answer is yes.
You could use the REST API Work Items - Get Work Item with $expand to get the commit links:
Get https://dev.azure.com/{org name}/{project name}/_apis/wit/workitems/{id}?$expand=relations&api-version=6.0
Then you would see the commits in relations part of the response body:
Then we could use the REST API Statuses API for Commit. It seems that when starting and ending build, the appropriate status is posted.
So when we call
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/statuses?api-version=6.0
We will get all last builds associated with the Commit and their statuses.
I am writing an application that monitors the status of a test plan run.
Given a plan and a suite id I've been able to get a lot of information. For instance I can see the overall status of the test point and know if it is ready/in progress/complete, etc. but I want to go a step deeper on steps that are in progress.
I've been unable to get to the level of seeing what the status is of the steps in a test point (i.e. pass/fail, etc.). Is there a rest API call to get this information?
Can you get the pass or fail status of a test step with the Azure DevOps rest api?
Yes, you can get it through Rest API.
You could try to use this Rest API: Results - Get to get the Test Result. And the result contains the test step status.
GET https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results/{testCaseResultId}?detailsToInclude=iterations&api-version=5.1
Note: You need to add parameters(detailsToInclude=iterations) to get the status of test steps
Result:
You could check the iterationDetails(The status of the overall test steps) and actionResults (The status of each test step) in the API Response.
In Azure Devops under the "Summary" tab associated with a build, there are a list of changes (Git hashes, etc.) associated with the build. I'm trying to figure out how to get these via the rest API.
I found this REST API to get the changes between the two builds.
It works if I have the previous build id in the pipeline, however in the situation I'm interested in, I have the current build id, I need to somehow use the REST API to find the previous id.
Is there a way to do this using the REST API, or a better way to accomplish what I'm trying to do here?
As far as I can see, there's a special REST API call for that. You pass the buildId as a part of the URL and get the collection of changes (Change[]) in response.