Fortinet white logo
Fortinet white logo
2.0.0

Azure DevOps v2.0.0

About the connector

Azure DevOps is a cloud-based service for managing software development projects. The Azure DevOps FortiSOAR connector integrates with Azure DevOps to automate the management of repositories, pipelines, work items, and more within FortiSOAR, enabling streamlined DevOps workflows and incident response.

This document provides information about the Azure DevOps connector, which facilitates automated interactions, with a Azure DevOps server using FortiSOAR™ playbooks. Add the Azure DevOps connector as a step in FortiSOAR™ playbooks and perform automated operations with Azure DevOps.

Version information

Connector Version: 2.0.0

FortiSOAR™ Version Tested on: 7.6.2-5507

Azure DevOps Version Tested on: 7.2

Authored By: Fortinet

Certified: Yes

Release Notes for version 2.0.0

Following enhancements have been made to the Azure DevOps connector in version 2.0.0:

  • Added the following actions and playbooks:
    • Create Repository
    • Update Repository
    • Create Branch
    • Delete Branch
    • Create File
    • Get File
    • Update File
    • Delete File
    • Get User List
    • Create Pull Request Comment
    • Get Pull Request Comment List
    • Push Changes
    • Create Merge Request
    • Execute an API Request
  • Added a new configuration parameter Principal Name.

Installing the connector

Use the Content Hub to install the connector. For the detailed procedure to install a connector, click here.

You can also use the yum command as a root user to install the connector:

yum install cyops-connector-azure-devops

Prerequisites to configuring the connector

  • You must have the credentials of Azure DevOps server to connect and perform automated operations.
  • The FortiSOAR™ server should have outbound connectivity to port 443 on the Azure DevOps server.

Minimum Permissions Required

To call the Azure DevOps API, to perform any action, you must be assigned specific permissions as defined in the following table:

Action Name Permission Type Permissions
Create Repository Delegate vso.code_manage
Access Token Code -> Read, write, & manage
Update Repository Delegate vso.code_manage
Access Token Code -> Read, write, & manage
Create Branch Delegate vso.code_write
Access Token Code -> Read & Write
Delete Branch Delegate vso.code_write
Access Token Code -> Read & Write
Create File Delegate vso.code_write
Access Token Code -> Read & Write
Get File Delegate vso.code
Access Token Code -> Read
Update File Delegate vso.code_write
Access Token Code -> Read & Write
Get User List Delegate vso.graph
Access Token Graph -> Read
Create Pull Request Comment Delegate vso.code_write, vso.threads_full
Access Token Code -> Read & Write, Pull Request Threads -> Read & Write
Get Pull Request Comment List Delegate vso.code, vso.threads_full
Access Token Code -> Read & Write, Pull Request Threads -> Read & Write
Push Changes Delegate vso.code_write
Access Token Code -> Read & Write
Create Merge Request Delegate vso.code_manage
Access Token Code -> Read, Write, & Manage
Execute an API Request Delegate Depends on the requested API
Access Token Depends on the requested API
Get Pipeline List Delegate vso.build
Access Token Build -> Read
Get Pipeline Run List Delegate vso.build
Access Token Build -> Read
Get Pipeline Run Details Delegate vso.build
Access Token Build -> Read
Get Project List Delegate vso.profile, vso.project
Access Token Project -> Read, Team -> Read
Get Repository List Delegate vso.code
Access Token Code -> Read
Get Branch List Delegate vso.code
Access Token Code -> Read
Get Commit Details Delegate vso.code
Access Token Code -> Read
Get Pull Request List Delegate vso.code
Access Token Code -> Read
Get Pull Request Details Delegate vso.code
Access Token Code -> Read
Create Pull Request Delegate vso.code_write, vso.identity
Access Token Code -> Read & Write, Identity -> Read
Update Pull Request Delegate vso.code_write
Access Token Code -> Read & Write
Get Pull Request Reviewer List Delegate vso.code
Access Token Code -> Read
Add Pull Request Reviewer Delegate vso.code_write, vso.identity
Access Token Code -> Read & Write, Identity -> Read
Get Pull Request Commit List Delegate vso.code
Access Token Code -> Read
Get Commit List Delegate vso.code
Access Token Code -> Read
Run Pipeline Delegate vso.build_execute
Access Token Build -> Read & Execute

Configuring the connector

For the procedure to configure a connector, click here

Configuration parameters

In FortiSOAR™, on the Connectors page, click the Azure DevOps connector row (if you are in the Grid view on the Connectors page) and in the Configurations tab enter the required configuration details:

Parameter Description
Server URL Specify the IP address or hostname of the Azure DevOps server to connect and perform automated operations.
Organization Name Specify the name of the organization created on Azure DevOps.
Principal Name Specify the primary email address associated with the Azure DevOps account.
Auth Type Select the authentication method to access the Azure DevOps Services REST APIs. You can choose from the following options:
  • Access Token: Select this and specify an access token in the Access Token field. For information on generating access tokens, refer to Creating PAT on Microsoft's Azure DevOps documentation.
  • On behalf of User - Delegate Permission: Select this option to use a delegated token and specify values in the following fields:
    • Tenant ID: Specify the ID of the tenant assigned to you by the Azure application registration portal.
    • Client ID: Specify the Unique Application ID of the Azure Active Directory application to create an authentication token required to access the API. For information on getting authentication tokens, see the Getting Authentication Tokens section.
    • Client Secret: Specify the Unique Client Secret of the Azure Active Directory application that is used to create an authentication token required to access the API. For information on how to get the secret key, see Get started with Azure DevOps OAuth on Microsoft's Azure DevOps documentation.
    • Authorization Code: Specify the authorization code that you acquired during the authorization step. For more information, see the Getting Access Tokens using the Delegate Permissions method section.
    • Redirect URL: The redirect_uri of your app, where authentication responses can be sent and received by your app. The redirect URL that you specify here must exactly match one of the redirect_uri's you have registered in your app registration portal.
API Version Specify the API version to use. By default it uses 7.1 api version.
Verify SSL Specifies whether the SSL certificate for the server is to be verified.
By default, this option is selected, i.e., set to true.

Actions supported by the connector

You can use the following automated operations in playbooks and also use the annotations to access operations:

Function Description Annotation and Category
Get Pipeline List Retrieves list of all pipelines within a project. list_pipelines
Investigation
Get Pipeline Run List Retrieves top 10000 runs for a specified pipeline. list_pipeline_runs
Investigation
Get Pipeline Run Details Retrieve details of a specific pipeline run. get_pipeline_run
Investigation
Get Project List Retrieve a list of all projects within the Azure DevOps organization. list_projects
Investigation
Get Repository List Retrieve a list of all repositories within a project. list_repositories
Investigation
Get Branch List Retrieves list of all branches within a specified repository. list_branches
Investigation
Get Commit Details Retrieve details of a specific commit. get_commit
Investigation
Get Pull Request List List all pull requests for a given repository or project. list_pull_requests
Investigation
Get Pull Request Details Retrieves details of a specific pull request. get_pull_requests_by_id
Investigation
Create Pull Request Creates a new pull request for code changes to be reviewed and merged. create_pull_request
Investigation
Update Pull Request Updates an existing pull request with new information such as status, title, description, and merge options. update_pull_request
Investigation
Get Pull Request Reviewer List Retrieve the list of reviewers for a specific pull request. list_pull_request_reviewers
Investigation
Add Pull Request Reviewer Add a reviewer to a pull request or cast a vote on a pull request in Azure DevOps. add_pull_request_reviewer
Investigation
Get Pull Request Commit List Retrieve the commits associated with a specific pull request in Azure DevOps. list_pull_request_commits
Investigation
Get Commit List Retrieve the commits for a specific repository in Azure DevOps. list_commits
Investigation
Run Pipeline Triggers a new run for a specified pipeline. run_pipeline
Investigation
Create Repository Creates a new repository within a project based on the input parameters you have specified. create_repository
Investigation
Update Repository Updates a repository within a project based on the input parameters you have specified. update_repository
Investigation
Push Changes Commits the local changes to a repository within a project based on the input parameters you have specified. push_changes
Investigation
Create Branch Creates a new branch within a repository based on the input parameters you have specified. create_branch
Investigation
Delete Branch Deletes a branch within a repository based on the input parameters you have specified. delete_branch
Investigation
Create Pull Request Comment Creates a new comment on a pull request thread based on the input parameters that you have specified. create_pull_request_comment
Investigation
Get Pull Request Comment List Retrieve all comments associated with a pull request or thread in a pull request based on the input parameters that you have specified. list_pull_request_comment
Investigation
Get User List Retrieve a list of all users in a given scope based on the input parameters you have specified. list_users
Investigation
Get File Retrieve information about a file within a repository based on the input parameters that you have specified. get_file_from_repository
Investigation
Create Merge Request Creates a new merge request on a repository based on the input parameters that you have specified. Currently it support merging only 2 commits. create_merge_request
Investigation
Create File Creates a new file within the repository based on the input parameters that you have specified. create_new_file_in_repository
Investigation
Update File Updates a file within the repository based on the input parameters that you have specified. update_file_in_repository
Investigation
Delete File Deletes a file within the repository based on the input parameters that you have specified. delete_existing_file_in_repository
Investigation
Execute an API Request Sends an API request to any Azure DevOps API endpoint based on specified HTTP method, endpoint, and other input parameters that you have specified, enabling flexible API interactions tailored to user needs. execute_an_api_request
Investigation

operation: Get Pipeline List

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its pipelines from Azure DevOps.
Sort Field (Optional) Specify the field based on which to sort the retrieved results from Azure DevOps. By default it is set to name.
Sort Order (Optional) Select the sort order to sort the retrieved results from Azure DevOps. You can choose from the following options:
  • ASC
  • DESC

NOTE: The selected sort order sorts the results only by the name field.

Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Limit (Optional) Specify the maximum number of records to be retrieved in this operation.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "_links": {
                "web": {
                    "href": ""
                },
                "self": {
                    "href": ""
                }
            },
            "folder": "",
            "revision": ""
        }
    ]
}

operation: Get Pipeline Run List

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its pipeline run list from Azure DevOps.
Pipeline ID Specify the ID of the pipeline whose runs are to be retrieved.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "_links": {
                "web": {
                    "href": ""
                },
                "self": {
                    "href": ""
                },
                "pipeline": {
                    "href": ""
                },
                "pipeline.web": {
                    "href": ""
                }
            },
            "result": "",
            "pipeline": {
                "id": "",
                "url": "",
                "name": "",
                "folder": "",
                "revision": ""
            },
            "createdDate": "",
            "finishedDate": "",
            "templateParameters": {}
        }
    ]
}

operation: Get Pipeline Run Details

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its pipeline run details from Azure DevOps.
Pipeline ID Specify the ID of the pipeline whose run details are to be retrieved.
Run ID Specify the ID of the run whose details are to be retrieved.

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "url": "",
    "name": "",
    "state": "",
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pipeline": {
            "href": ""
        },
        "pipeline.web": {
            "href": ""
        }
    },
    "result": "",
    "pipeline": {
        "id": "",
        "url": "",
        "name": "",
        "folder": "",
        "revision": ""
    },
    "resources": {
        "repositories": {
            "self": {
                "refName": "",
                "version": "",
                "repository": {
                    "id": "",
                    "type": ""
                }
            }
        }
    },
    "createdDate": "",
    "yamlDetails": {
        "rootYamlFile": {
            "ref": "",
            "yamlFile": "",
            "repoAlias": ""
        },
        "expandedYamlUrl": ""
    },
    "finishedDate": "",
    "templateParameters": {}
}

operation: Get Project List

Input parameters

Parameter Description
State (Optional) Select the state of the project to be retrieved from Azure DevOps. You can choose from the following options:
  • All
  • Create Pending
  • Deleted
  • Deleting
  • New
  • Unchanged
  • Well Formed (Default)
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Offset (Optional) Specify the number of records to be skipped when retrieving results.
Limit (Optional) Specify the maximum number of records to be retrieved.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        }
    ]
}

operation: Get Repository List

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its repositories from Azure DevOps.
Include Hidden Repositories (Optional) Select to include hidden repositories in the response. By default, this option is cleared, i.e., set to false.
Include All URLs (Optional) Select to include all remote URLs in the response. By default, this option is cleared, i.e., set to false.
Include Reference Links (Optional) Select to include reference links in the response. By default, this option is cleared, i.e., set to false.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "size": "",
            "sshUrl": "",
            "webUrl": "",
            "project": {
                "id": "",
                "url": "",
                "name": "",
                "state": "",
                "revision": "",
                "visibility": "",
                "description": "",
                "lastUpdateTime": ""
            },
            "remoteUrl": "",
            "isDisabled": "",
            "defaultBranch": "",
            "isInMaintenance": "",
            "validRemoteUrls": [],
            "_links": {
                "ssh": {
                    "href": ""
                },
                "web": {
                    "href": ""
                },
                "refs": {
                    "href": ""
                },
                "self": {
                    "href": ""
                },
                "items": {
                    "href": ""
                },
                "pushes": {
                    "href": ""
                },
                "commits": {
                    "href": ""
                },
                "project": {
                    "href": ""
                },
                "pullRequests": {
                    "href": ""
                }
            }
        }
    ]
}

operation: Get Branch List

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the branch list.
Repository Specify the ID or name of the repository whose branch list is to be retrieved.
Branch Name Filter (Contains) (Optional) Specify a substring to retrieve only those branch names that contain the specified string.
Branch Name Filter (Starts With) (Optional) Specify a prefix to retrieve only those branch names that start with the specified string. For example, heads/ma returns branches such as refs/heads/main and refs/heads/master.
Include My Branches (Optional) Select to include only those branches that the user owns, has marked as favorites, and the default branch. By default, this option is cleared, i.e., set to false.
Include Statuses (Optional) Select to include up to the first 1000 commit statuses for each ref. By default, this option is cleared, i.e., set to false.
Include Links (Optional) Select to include referenceLinks in the results. By default, this option is cleared, i.e., set to false.
Latest Statuses Only (Optional) Select to include only the tip commit status for each ref. Requires includeStatuses to be true. By default, this option is cleared, i.e., set to false.
Peel Tags (Optional) Select to use annotated tags to populate the PeeledObjectId property. By default, this option is cleared, i.e., set to false.
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Limit (Optional) Specify the maximum number of refs to return. Maximum value is 1000.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "name": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "repository": {
                    "href": ""
                }
            },
            "creator": {
                "id": "",
                "url": "",
                "_links": {
                    "avatar": {
                        "href": ""
                    }
                },
                "imageUrl": "",
                "descriptor": "",
                "uniqueName": "",
                "displayName": ""
            },
            "objectId": "",
            "statuses": []
        }
    ]
}

operation: Get Commit Details

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the commit details.
Repository Specify the ID or name of the repository whose commit is to be retrieved.
Commit ID Specify the ID of the commit to be retrieved.
Change Count (Optional) Specify the number of changes to include in the result.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "push": {
        "date": "",
        "pushId": "",
        "pushedBy": {
            "id": "",
            "url": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "descriptor": "",
            "uniqueName": "",
            "displayName": ""
        }
    },
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "changes": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "author": {
        "date": "",
        "name": "",
        "email": "",
        "imageUrl": ""
    },
    "treeId": "",
    "comment": "",
    "parents": [],
    "commitId": "",
    "committer": {
        "date": "",
        "name": "",
        "email": "",
        "imageUrl": ""
    },
    "remoteUrl": "",
    "changes": [
        {
            "item": {
                "url": "",
                "path": "",
                "commitId": "",
                "objectId": "",
                "gitObjectType": ""
            },
            "changeType": ""
        }
    ],
    "changeCounts": {
        "Add": "",
        "Edit": "",
        "Delete": ""
    }
}

operation: Get Pull Request List

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the list of pull requests (PR).
Repository Specify the ID or name of the repository to retrieve its list of PRs.
Status (Optional) Select the status of the pull requests to filter the retrieved results. You can choose from the following options:
  • All
  • Active
  • Abandoned
  • Completed
  • Not Set
Search Criteria (Optional) Specify the search criteria, as JSON, to retrieve the pull requests from Azure DevOps. For example:
{
                    "maxTime": "",
                    "minTime": "",
                    "creatorId": "",
                    "reviewerId": "",
                    "includeLinks": "",
                    "repositoryId": "",
                    "sourceRefName": "",
                    "targetRefName": "",
                    "queryTimeRangeType": "",
                    "sourceRepositoryId": ""
                  }
Offset (Optional) Specify the number of records to be skipped retrieved in this operation.
Limit (Optional) Specify the maximum number of records to be retrieved in this operation.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "title": "",
            "status": "",
            "isDraft": "",
            "mergeId": "",
            "createdBy": {
                "id": "",
                "url": "",
                "_links": {
                    "avatar": {
                        "href": ""
                    }
                },
                "imageUrl": "",
                "descriptor": "",
                "uniqueName": "",
                "displayName": ""
            },
            "reviewers": [
                {
                    "id": "",
                    "url": "",
                    "vote": "",
                    "_links": {
                        "avatar": {
                            "href": ""
                        }
                    },
                    "imageUrl": "",
                    "isFlagged": "",
                    "uniqueName": "",
                    "displayName": "",
                    "hasDeclined": "",
                    "reviewerUrl": ""
                }
            ],
            "closedDate": "",
            "repository": {
                "id": "",
                "url": "",
                "name": "",
                "project": {
                    "id": "",
                    "name": "",
                    "state": "",
                    "visibility": "",
                    "lastUpdateTime": ""
                }
            },
            "mergeStatus": "",
            "description": "",
            "codeReviewId": "",
            "creationDate": "",
            "pullRequestId": "",
            "sourceRefName": "",
            "targetRefName": "",
            "lastMergeCommit": {
                "url": "",
                "commitId": ""
            },
            "completionOptions": {
                "mergeStrategy": "",
                "mergeCommitMessage": "",
                "transitionWorkItems": "",
                "autoCompleteIgnoreConfigIds": []
            },
            "supportsIterations": "",
            "completionQueueTime": "",
            "lastMergeSourceCommit": {
                "url": "",
                "commitId": ""
            },
            "lastMergeTargetCommit": {
                "url": "",
                "commitId": ""
            }
        }
    ]
}

operation: Get Pull Request Details

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the pull request (PR) details.
Pull Request ID Specify the ID of the pull request which is to be retrieved for the specified project.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "title": "",
    "status": "",
    "isDraft": "",
    "mergeId": "",
    "createdBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "reviewers": [
        {
            "id": "",
            "url": "",
            "vote": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "isFlagged": "",
            "uniqueName": "",
            "displayName": "",
            "hasDeclined": "",
            "reviewerUrl": ""
        }
    ],
    "artifactId": "",
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "description": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    },
    "mergeStatus": "",
    "codeReviewId": "",
    "creationDate": "",
    "pullRequestId": "",
    "sourceRefName": "",
    "targetRefName": "",
    "lastMergeCommit": {
        "url": "",
        "author": {
            "date": "",
            "name": "",
            "email": ""
        },
        "comment": "",
        "commitId": "",
        "committer": {
            "date": "",
            "name": "",
            "email": ""
        }
    },
    "lastMergeSourceCommit": {
        "url": "",
        "commitId": ""
    },
    "lastMergeTargetCommit": {
        "url": "",
        "commitId": ""
    },
    "supportsIterations": "",
    "description": ""
}

operation: Create Pull Request

Input parameters

Parameter Description
Project Name Specify the Azure DevOps project associated with the repository under which the PR is to be created.
Repository Select the ID or name of the repository under which the PR is to be created.
Pull Request Title Specify a title for the pull request being created.
Source Branch Name Specify the name of the source branch for creating the PR.
Target Branch Name Specify the name of the target branch for creating the PR.
Pull Request Description (Optional) Specify a description for the pull request.
Reviewers (Optional) Specify IDs, display names, or email IDs as comma-separated values to add as reviewers for this pull request.
Supports Iterations (Optional) Select to enable reviewing of subsequent pushes individually.
Additional Inputs (Optional) Specify any other parameters, as JSON, of this pull request to be created. For example, { "isDraft": true }

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "title": "",
    "_links": {
        "self": {
            "href": ""
        },
        "statuses": {
            "href": ""
        },
        "createdBy": {
            "href": ""
        },
        "workItems": {
            "href": ""
        },
        "repository": {
            "href": ""
        },
        "sourceBranch": {
            "href": ""
        },
        "sourceCommit": {
            "href": ""
        },
        "targetBranch": {
            "href": ""
        },
        "targetCommit": {
            "href": ""
        }
    },
    "labels": [],
    "status": "",
    "isDraft": "",
    "mergeId": "",
    "createdBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "reviewers": [],
    "artifactId": "",
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "description": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    },
    "mergeStatus": "",
    "codeReviewId": "",
    "creationDate": "",
    "pullRequestId": "",
    "sourceRefName": "",
    "targetRefName": "",
    "lastMergeSourceCommit": {
        "url": "",
        "commitId": ""
    },
    "lastMergeTargetCommit": {
        "url": "",
        "commitId": ""
    },
    "supportsIterations": "",
    "description": ""
}

operation: Update Pull Request

Input parameters

Parameter Description
Project Name Specify the Azure DevOps project associated with the repository under which the PR is to be updated.
Repository Select the ID or name of the repository under which the PR is to be updated.
Pull Request ID Specify the ID of the pull request to update.
Pull Request Title Specify a title for the pull request to update.
Pull Request Description (Optional) Specify a new description for the pull request (up to 4000 characters).
Pull Request Status (Optional) Select the new status of the pull requests to update. You can choose from the following options:
  • Active
  • Abandoned
  • Completed
  • Not Set
Target Branch Name (Optional) Specify a different name of the target branch to update, if changing the target for the PR.
Additional Inputs Specify any other parameters, as JSON, of this pull request to be created. For example, { "isDraft": true }

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "title": "",
    "_links": {
        "self": {
            "href": ""
        },
        "statuses": {
            "href": ""
        },
        "createdBy": {
            "href": ""
        },
        "workItems": {
            "href": ""
        },
        "iterations": {
            "href": ""
        },
        "repository": {
            "href": ""
        },
        "sourceBranch": {
            "href": ""
        },
        "sourceCommit": {
            "href": ""
        },
        "targetBranch": {
            "href": ""
        },
        "targetCommit": {
            "href": ""
        }
    },
    "status": "",
    "isDraft": "",
    "mergeId": "",
    "createdBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "reviewers": [],
    "artifactId": "",
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "description": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    },
    "mergeStatus": "",
    "codeReviewId": "",
    "creationDate": "",
    "pullRequestId": "",
    "sourceRefName": "",
    "targetRefName": "",
    "lastMergeCommit": {
        "url": "",
        "author": {
            "date": "",
            "name": "",
            "email": ""
        },
        "comment": "",
        "commitId": "",
        "committer": {
            "date": "",
            "name": "",
            "email": ""
        }
    },
    "lastMergeSourceCommit": {
        "url": "",
        "commitId": ""
    },
    "lastMergeTargetCommit": {
        "url": "",
        "commitId": ""
    },
    "supportsIterations": "",
    "description": ""
}

operation: Get Pull Request Reviewer List

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository whose PR reviewers are to be retrieved.
Repository Specify the ID or name of the repository where the pull request exists.
Pull Request ID Specify the ID of the pull request whose reviewers you want to retrieve.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "vote": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "isFlagged": "",
            "uniqueName": "",
            "displayName": "",
            "hasDeclined": "",
            "reviewerUrl": ""
        }
    ]
}

operation: Add Pull Request Reviewer

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository where PR reviewers are to be added.
Repository Specify the ID or name of the repository where the pull request exists.
Pull Request ID Specify the ID of the pull request to which the reviewer is to be added.
Reviewer Specify the ID, display name, or email address of the reviewer to be added to the pull request.
Required Reviewer (Optional) Select to mark the reviewer as required.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "vote": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "isFlagged": "",
            "uniqueName": "",
            "displayName": "",
            "hasDeclined": "",
            "reviewerUrl": ""
        }
    ]
}

operation: Get Pull Request Commit List

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository whose PR commit list is to be retrieved. Specify the name of the Azure DevOps project associated with the repository.
Repository Specify the ID or name of the repository where the pull request exists.
Pull Request ID Specify the ID of the pull request for which the commits are to be listed.
Limit (Optional) Specify the maximum number of commits to return.
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "comment": "",
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ]
}

operation: Get Commit List

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository whose commits are to be retrieved.
Repository Specify the ID or name of the repository whose commit list is to be retrieved.
Search Options (Optional) Select the criteria to filter search results. You can choose from the following options:
  • Commit IDs: Select this option to specify exact commit IDs as comma-separated values in the Commit IDs field.
  • Other: Select to use additional filtering options by specifying values in the following fields:
    • Committer: (Optional) Specify the alias or display name of the committer.
    • From Commit ID: (Optional) Specify the lower bound commit ID for filtering commits.
    • To Commit ID: (Optional) Specify the upper bound commit ID for filtering commits.
    • From Date: (Optional) Specify the start date to include history entries created after this date.
    • To Date: (Optional) Specify the end date to include history entries created before this date.
    • Commit Author: (Optional) Specify the alias or display name of the author.
    • Exclude Deletes: (Optional) Specify whether to exclude delete entries for the specified path.
    • History Mode: (Optional) Specify the Git history mode to use.
    • Include Push Data: (Optional) Specify whether to include push information.
    • Show Oldest Commits First: (Optional) Specify whether to show the oldest commits first.
    • Search Criteria: Specify the search criteria to retrieve the commits from Azure DevOps. For example, you can include parameters like `fromCommitId`, `toCommitId`, `author`, and `fromDate`.
    • Offset: (Optional) Specify the number of records to skip.
    • Limit: (Optional) Specify the maximum number of commits to retrieve.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "comment": "",
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            },
            "remoteUrl": "",
            "changeCounts": {
                "Add": "",
                "Edit": "",
                "Delete": ""
            },
            "commentTruncated": ""
        }
    ]
}

operation: Run Pipeline

Input parameters

Parameter Description
Project Name Specify the name of the project under which the pipeline is to be run.
Pipeline ID Specify the ID of the pipeline to run.
Stages to Skip (Optional) Specify the pipeline stage names as comma-separated values that are to be skipped during execution.
Pipeline Version (Optional) Specify the pipeline version being run.
Preview Run (Optional) Select to return the final YAML document after parsing templates as a run preview.
Resources (Optional) Specify the resources required for the run.

Output

The output contains the following populated JSON schema:

Output schema when you choose Preview Run as false:

{
    "id": "",
    "url": "",
    "name": "",
    "state": "",
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pipeline": {
            "href": ""
        },
        "pipeline.web": {
            "href": ""
        }
    },
    "pipeline": {
        "id": "",
        "url": "",
        "name": "",
        "folder": "",
        "revision": ""
    },
    "resources": {
        "repositories": {
            "self": {
                "refName": "",
                "version": "",
                "repository": {
                    "id": "",
                    "type": ""
                }
            }
        }
    },
    "createdDate": "",
    "templateParameters": {}
}

Output schema when you choose Preview Run as true:

{
    "id": "",
    "url": "",
    "name": "",
    "state": "",
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pipeline": {
            "href": ""
        },
        "pipeline.web": {
            "href": ""
        }
    },
    "pipeline": {
        "id": "",
        "url": "",
        "name": "",
        "folder": "",
        "revision": ""
    },
    "finalYaml": "",
    "templateParameters": {}
}

operation: Create Repository

Input parameters

Parameter Description
Project ID Specify the ID of the project within which to create the repository.
Repository Name Specify the name of the repository to create.
Parent Repository ID (Optional) Specify the ID of the parent repository from which to create a fork.
Source Ref (Optional) Specify the source ref to create a fork syncing only the provided refs. For example: refs/heads/main

Note: The value specified in this parameter takes effect only when a Parent Repository ID is specified.

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "url": "",
    "name": "",
    "size": "",
    "_links": {
        "ssh": {
            "href": ""
        },
        "web": {
            "href": ""
        },
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "items": {
            "href": ""
        },
        "pushes": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "project": {
            "href": ""
        },
        "pullRequests": {
            "href": ""
        },
        "forkSyncOperation": {
            "href": ""
        }
    },
    "isFork": "",
    "sshUrl": "",
    "webUrl": "",
    "project": {
        "id": "",
        "url": "",
        "name": "",
        "state": "",
        "revision": "",
        "visibility": "",
        "lastUpdateTime": ""
    },
    "remoteUrl": "",
    "isDisabled": "",
    "creationDate": "",
    "isInMaintenance": ""
}

operation: Update Repository

Input parameters

Parameter Description
Repository ID Specify the ID of the repository whose details are to be updated.
Repository Name (Optional) Specify a name to be updated as the new name of the repository.
Default Branch (Optional) Specify the branch name to be updated as the default branch for this repository.
Disable Repository (Optional) Select whether to enable or disable the repository. You can select from the following options:
  • True
  • False

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "url": "",
    "name": "",
    "size": "",
    "sshUrl": "",
    "webUrl": "",
    "project": {
        "id": "",
        "url": "",
        "name": "",
        "state": "",
        "revision": "",
        "visibility": "",
        "lastUpdateTime": ""
    },
    "remoteUrl": "",
    "isDisabled": "",
    "creationDate": "",
    "defaultBranch": "",
    "isInMaintenance": ""
}

operation: Push Changes

Input parameters

Parameter Description
Project Specify the ID of the project in which to push the changes.
Repository ID Specify the ID of the repository in which to push the changes.
Branch Name Specify the name of the branch in which to push the changes.
Previous Commit ID Specify the previous commit ID after which to push the changes.
Commit Message Specify the commit message to be used for pushing the changes.
Cloned Repository Path Specify the path to the cloned repository where you want to push the latest changes.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Create Branch

Input parameters

Parameter Description
Project Specify the ID of the project within which to create a new branch.
Repository ID Specify the ID of the repository within which to create a new branch.
Branch Name Specify the name of the branch to be created.
Commit Message Specify the commit message to be used for creating a branch.
Previous Commit ID (Optional) Specify the previous commit SHA as reference from which to create the branch.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Delete Branch

Input parameters

Parameter Description
Project Specify the ID or name of the project that contains the branch that is to be deleted.
Repository Specify the ID or name of the repository that contains the branch that is to be deleted.
Branch Name Specify the name of the branch to delete.
Previous Commit ID Specify the previous commit SHA of the branch to be deleted.

Output

The output contains the following populated JSON schema:

{
    "value": [
        {
            "repositoryId": "",
            "name": "",
            "oldObjectId": "",
            "newObjectId": "",
            "isLocked": "",
            "updateStatus": "",
            "success": ""
        }
    ],
    "count": ""
}

operation: Create Pull Request Comment

Input parameters

Parameter Description
Repository ID Specify the ID of the repository within which to create a new pull request comment.
Pull Request ID Specify the ID of the pull request in which to create the comment.
Content Specify the content of the comment to add in the pull request.
Thread ID (Optional) Specify the ID of the thread in which to insert the comment.
Parent Comment ID (Optional) Specify the ID of the parent comment to send this comment as reply.

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "_links": {
        "self": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "status": "",
    "comments": [
        {
            "id": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "threads": {
                    "href": ""
                },
                "repository": {
                    "href": ""
                },
                "pullRequests": {
                    "href": ""
                }
            },
            "author": {
                "id": "",
                "url": "",
                "_links": {
                    "avatar": {
                        "href": ""
                    }
                },
                "imageUrl": "",
                "descriptor": "",
                "uniqueName": "",
                "displayName": ""
            },
            "content": "",
            "commentType": "",
            "publishedDate": "",
            "lastUpdatedDate": "",
            "parentCommentId": "",
            "lastContentUpdatedDate": ""
        }
    ],
    "isDeleted": "",
    "identities": "",
    "properties": "",
    "publishedDate": "",
    "threadContext": "",
    "lastUpdatedDate": "",
    "pullRequestThreadContext": ""
}

operation: Get Pull Request Comment List

Input parameters

Parameter Description
Repository ID Specify the ID of the repository whose pull request (PR) comments are to be retrieved.
Pull Request ID Specify the ID of the pull request from which to retrieve comments.
Thread ID (Optional) Specify the ID of the comment thread to retrieve comments.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "repository": {
                    "href": ""
                }
            },
            "status": "",
            "comments": [
                {
                    "id": "",
                    "_links": {
                        "self": {
                            "href": ""
                        },
                        "threads": {
                            "href": ""
                        },
                        "repository": {
                            "href": ""
                        },
                        "pullRequests": {
                            "href": ""
                        }
                    },
                    "author": {
                        "id": "",
                        "url": "",
                        "_links": {
                            "avatar": {
                                "href": ""
                            }
                        },
                        "imageUrl": "",
                        "descriptor": "",
                        "uniqueName": "",
                        "displayName": ""
                    },
                    "content": "",
                    "usersLiked": [],
                    "commentType": "",
                    "publishedDate": "",
                    "lastUpdatedDate": "",
                    "parentCommentId": "",
                    "lastContentUpdatedDate": ""
                }
            ],
            "isDeleted": "",
            "identities": "",
            "properties": "",
            "publishedDate": "",
            "threadContext": "",
            "lastUpdatedDate": "",
            "pullRequestThreadContext": ""
        }
    ]
}

operation: Get User List

Input parameters

Parameter Description
Scope (Optional) Specify a non-default scope (collection, project) in which to search for users.
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Subject Subtypes (Optional) Specify a comma separated list of user subject subtypes to filter the retrieved results. For example: msa, aad, svc (service identity), imp (imported identity), etc.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "subjectKind": "",
            "metaType": "",
            "domain": "",
            "principalName": "",
            "mailAddress": "",
            "origin": "",
            "originId": "",
            "displayName": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "memberships": {
                    "href": ""
                },
                "membershipState": {
                    "href": ""
                },
                "storageKey": {
                    "href": ""
                },
                "avatar": {
                    "href": ""
                }
            },
            "url": "",
            "descriptor": ""
        }
    ]
}

operation: Get File

Input parameters

Parameter Description
Repository Specify the name or ID of the repository from to retrieve the file.
Branch Name Specify the name of the branch from to retrieve the file.
File Path Specify the path from to retrieve the file.
Include Content (Optional) Select to include file content. Default is false.
Include Content Metadata (Optional) Select to include content metadata. Default is false.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "path": "",
    "_links": {
        "blob": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "content": "",
    "commitId": "",
    "objectId": "",
    "gitObjectType": "",
    "contentMetadata": {
        "vsLink": "",
        "encoding": "",
        "fileName": "",
        "extension": "",
        "contentType": ""
    }
}

operation: Create Merge Request

Input parameters

Parameter Description
Project Specify the name or ID of the project in which to create the merge request.
Repository Specify the name or ID of the repository in which to create the merge request.
Parent Commit ID Specify the parent commit IDs as a list of the branches being merged, to create the merge commit. For example: <commit-sha>, <commit-sha>
Comment Specify the comment or message to add while creating the merge request.

Output

The output contains the following populated JSON schema:

{
    "mergeOperationId": "",
    "status": "",
    "detailedStatus": {},
    "parents": [],
    "comment": ""
}

operation: Create File

Input parameters

Parameter Description
Project Specify the name or ID of the project within which to create the file.
Repository Specify the name or ID of the repository within which to create the file.
Branch Name Specify the name of the branch in which to create the file.
Previous Commit ID Specify the previous commit ID of the branch in which to create the file.
File Path Specify the full path in which to create the file.
Content Specify the contents to add to the file being created.
Commit Message Specify the commit message to add while creating the file.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Update File

Input parameters

Parameter Description
Project Specify the name or ID of the project in which the file is to be updated.
Repository Specify the name or ID of the repository in which the file is to be updated.
Branch Name Specify the name of the branch in which to update the file.
Previous Commit ID Specify the previous commit ID of the branch in which to update the file.
File Path Specify the full path of the file to be updated.
Content Specify the contents to update in the file being updated.
Operation Select the operation you want to perform. You can select from the following options:
  • Append
  • Overwrite
Commit Message Specify the commit message for updating the file.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Delete File

Input parameters

Parameter Description
Project Specify the name or ID of the project in which the file is to be deleted.
Repository Specify the name or ID of the repository in which the file is to be deleted.
Branch Name Specify the name of the branch in which the file is to be deleted.
Previous Commit ID Specify the previous commit ID of the branch in which the file is to be deleted.
File Path Specify the full path of the file to be deleted.
Commit Message Specify the commit message for deleting the file.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Execute an API Request

Input parameters

Parameter Description
HTTP Method Select an HTTP action for the request. You can select from the following options:
  • DELETE
  • GET
  • PATCH
  • POST
  • PUT
Endpoint Specify the target API URL path for the request. For example, if the website is https://example.com and URL path is https://example.com/images/pic.jpg, the endpoint would be /images/pic.jpg.
Query Parameters (Optional) Specify any optional parameters to add to the URL and refine the request.
Request Payload (Optional) Specify data, as JSON, to be sent as the request payload (typically for POST or PUT requests).

Output

The output contains a non-dictionary value.

Included playbooks

The Sample - Azure DevOps - 2.0.0 playbook collection comes bundled with the Azure DevOps connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Azure DevOps connector.

  • Add Pull Request Reviewer
  • Create Branch
  • Create File
  • Create Merge Request
  • Create Pull Request
  • Create Pull Request Comment
  • Create Repository
  • Delete Branch
  • Delete File
  • Execute an API Request
  • Get Branch List
  • Get Commit Details
  • Get Commit List
  • Get File
  • Get Pipeline List
  • Get Pipeline Run Details
  • Get Pipeline Run List
  • Get Project List
  • Get Pull Request Comment List
  • Get Pull Request Commit List
  • Get Pull Request Details
  • Get Pull Request List
  • Get Pull Request Reviewer List
  • Get Repository List
  • Get User List
  • Push Changes
  • Run Pipeline
  • Update File
  • Update Pull Request
  • Update Repository

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.

Getting Access Tokens

You can get authentication tokens to access the Azure DevOps APIs using two methods:

Getting Access Tokens using the On behalf of the User – Delegate Permission method

  1. Register your app. To register an app refer to Register your app on Microsoft's Azure DevOps documentation.
  2. Ensure that the required permissions are granted for the registration of the application. Select API Permissions > Add permission > Azure DevOps > Delegated Permissions.

    NOTE: The API Permission that should be granted to the registered application is mentioned in the Minimum permissions section required for the 'Delegate-type' permission table available in the Minimum Permissions section of this document.

  3. The Redirect URL can be directed to any web application in which you want to receive responses from Azure DevOps. If you are unsure about what to set as a redirect URL, you can use https://localhost/myapp.
  4. Copy the following URL and replace the TENANT_ID, CLIENT_ID, and REDIRECT_URI with your tenant ID, client ID, and the following redirect URL:

    https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize?client_id= CLIENT_ID& response_type=code&redirect_uri=REDIRECT_URL&response_mode=query&scope=https://app.vssps.visualstudio.com/.default%20offline_access

  5. Enter the above link with the replaced values and you will be prompted to grant permissions for your Azure Service Management. You will be automatically redirected to a link with the following structure:
    REDIRECT_URI?code=AUTH_CODE&session_state=SESSION_STATE
  6. Copy the AUTH_CODE (without the "code=" prefix) and paste it into your instance configuration in the Authorization Code parameter.
  7. Enter your client ID in the Client ID field.
  8. Enter your client secret in the Client Secret field.
  9. Enter your redirect URL in the Redirect URL field. By default, it is set to https://localhost/myapp.
  10. Enter your API version in the API Version field.
Previous
Next

Azure DevOps v2.0.0

About the connector

Azure DevOps is a cloud-based service for managing software development projects. The Azure DevOps FortiSOAR connector integrates with Azure DevOps to automate the management of repositories, pipelines, work items, and more within FortiSOAR, enabling streamlined DevOps workflows and incident response.

This document provides information about the Azure DevOps connector, which facilitates automated interactions, with a Azure DevOps server using FortiSOAR™ playbooks. Add the Azure DevOps connector as a step in FortiSOAR™ playbooks and perform automated operations with Azure DevOps.

Version information

Connector Version: 2.0.0

FortiSOAR™ Version Tested on: 7.6.2-5507

Azure DevOps Version Tested on: 7.2

Authored By: Fortinet

Certified: Yes

Release Notes for version 2.0.0

Following enhancements have been made to the Azure DevOps connector in version 2.0.0:

Installing the connector

Use the Content Hub to install the connector. For the detailed procedure to install a connector, click here.

You can also use the yum command as a root user to install the connector:

yum install cyops-connector-azure-devops

Prerequisites to configuring the connector

Minimum Permissions Required

To call the Azure DevOps API, to perform any action, you must be assigned specific permissions as defined in the following table:

Action Name Permission Type Permissions
Create Repository Delegate vso.code_manage
Access Token Code -> Read, write, & manage
Update Repository Delegate vso.code_manage
Access Token Code -> Read, write, & manage
Create Branch Delegate vso.code_write
Access Token Code -> Read & Write
Delete Branch Delegate vso.code_write
Access Token Code -> Read & Write
Create File Delegate vso.code_write
Access Token Code -> Read & Write
Get File Delegate vso.code
Access Token Code -> Read
Update File Delegate vso.code_write
Access Token Code -> Read & Write
Get User List Delegate vso.graph
Access Token Graph -> Read
Create Pull Request Comment Delegate vso.code_write, vso.threads_full
Access Token Code -> Read & Write, Pull Request Threads -> Read & Write
Get Pull Request Comment List Delegate vso.code, vso.threads_full
Access Token Code -> Read & Write, Pull Request Threads -> Read & Write
Push Changes Delegate vso.code_write
Access Token Code -> Read & Write
Create Merge Request Delegate vso.code_manage
Access Token Code -> Read, Write, & Manage
Execute an API Request Delegate Depends on the requested API
Access Token Depends on the requested API
Get Pipeline List Delegate vso.build
Access Token Build -> Read
Get Pipeline Run List Delegate vso.build
Access Token Build -> Read
Get Pipeline Run Details Delegate vso.build
Access Token Build -> Read
Get Project List Delegate vso.profile, vso.project
Access Token Project -> Read, Team -> Read
Get Repository List Delegate vso.code
Access Token Code -> Read
Get Branch List Delegate vso.code
Access Token Code -> Read
Get Commit Details Delegate vso.code
Access Token Code -> Read
Get Pull Request List Delegate vso.code
Access Token Code -> Read
Get Pull Request Details Delegate vso.code
Access Token Code -> Read
Create Pull Request Delegate vso.code_write, vso.identity
Access Token Code -> Read & Write, Identity -> Read
Update Pull Request Delegate vso.code_write
Access Token Code -> Read & Write
Get Pull Request Reviewer List Delegate vso.code
Access Token Code -> Read
Add Pull Request Reviewer Delegate vso.code_write, vso.identity
Access Token Code -> Read & Write, Identity -> Read
Get Pull Request Commit List Delegate vso.code
Access Token Code -> Read
Get Commit List Delegate vso.code
Access Token Code -> Read
Run Pipeline Delegate vso.build_execute
Access Token Build -> Read & Execute

Configuring the connector

For the procedure to configure a connector, click here

Configuration parameters

In FortiSOAR™, on the Connectors page, click the Azure DevOps connector row (if you are in the Grid view on the Connectors page) and in the Configurations tab enter the required configuration details:

Parameter Description
Server URL Specify the IP address or hostname of the Azure DevOps server to connect and perform automated operations.
Organization Name Specify the name of the organization created on Azure DevOps.
Principal Name Specify the primary email address associated with the Azure DevOps account.
Auth Type Select the authentication method to access the Azure DevOps Services REST APIs. You can choose from the following options:
  • Access Token: Select this and specify an access token in the Access Token field. For information on generating access tokens, refer to Creating PAT on Microsoft's Azure DevOps documentation.
  • On behalf of User - Delegate Permission: Select this option to use a delegated token and specify values in the following fields:
    • Tenant ID: Specify the ID of the tenant assigned to you by the Azure application registration portal.
    • Client ID: Specify the Unique Application ID of the Azure Active Directory application to create an authentication token required to access the API. For information on getting authentication tokens, see the Getting Authentication Tokens section.
    • Client Secret: Specify the Unique Client Secret of the Azure Active Directory application that is used to create an authentication token required to access the API. For information on how to get the secret key, see Get started with Azure DevOps OAuth on Microsoft's Azure DevOps documentation.
    • Authorization Code: Specify the authorization code that you acquired during the authorization step. For more information, see the Getting Access Tokens using the Delegate Permissions method section.
    • Redirect URL: The redirect_uri of your app, where authentication responses can be sent and received by your app. The redirect URL that you specify here must exactly match one of the redirect_uri's you have registered in your app registration portal.
API Version Specify the API version to use. By default it uses 7.1 api version.
Verify SSL Specifies whether the SSL certificate for the server is to be verified.
By default, this option is selected, i.e., set to true.

Actions supported by the connector

You can use the following automated operations in playbooks and also use the annotations to access operations:

Function Description Annotation and Category
Get Pipeline List Retrieves list of all pipelines within a project. list_pipelines
Investigation
Get Pipeline Run List Retrieves top 10000 runs for a specified pipeline. list_pipeline_runs
Investigation
Get Pipeline Run Details Retrieve details of a specific pipeline run. get_pipeline_run
Investigation
Get Project List Retrieve a list of all projects within the Azure DevOps organization. list_projects
Investigation
Get Repository List Retrieve a list of all repositories within a project. list_repositories
Investigation
Get Branch List Retrieves list of all branches within a specified repository. list_branches
Investigation
Get Commit Details Retrieve details of a specific commit. get_commit
Investigation
Get Pull Request List List all pull requests for a given repository or project. list_pull_requests
Investigation
Get Pull Request Details Retrieves details of a specific pull request. get_pull_requests_by_id
Investigation
Create Pull Request Creates a new pull request for code changes to be reviewed and merged. create_pull_request
Investigation
Update Pull Request Updates an existing pull request with new information such as status, title, description, and merge options. update_pull_request
Investigation
Get Pull Request Reviewer List Retrieve the list of reviewers for a specific pull request. list_pull_request_reviewers
Investigation
Add Pull Request Reviewer Add a reviewer to a pull request or cast a vote on a pull request in Azure DevOps. add_pull_request_reviewer
Investigation
Get Pull Request Commit List Retrieve the commits associated with a specific pull request in Azure DevOps. list_pull_request_commits
Investigation
Get Commit List Retrieve the commits for a specific repository in Azure DevOps. list_commits
Investigation
Run Pipeline Triggers a new run for a specified pipeline. run_pipeline
Investigation
Create Repository Creates a new repository within a project based on the input parameters you have specified. create_repository
Investigation
Update Repository Updates a repository within a project based on the input parameters you have specified. update_repository
Investigation
Push Changes Commits the local changes to a repository within a project based on the input parameters you have specified. push_changes
Investigation
Create Branch Creates a new branch within a repository based on the input parameters you have specified. create_branch
Investigation
Delete Branch Deletes a branch within a repository based on the input parameters you have specified. delete_branch
Investigation
Create Pull Request Comment Creates a new comment on a pull request thread based on the input parameters that you have specified. create_pull_request_comment
Investigation
Get Pull Request Comment List Retrieve all comments associated with a pull request or thread in a pull request based on the input parameters that you have specified. list_pull_request_comment
Investigation
Get User List Retrieve a list of all users in a given scope based on the input parameters you have specified. list_users
Investigation
Get File Retrieve information about a file within a repository based on the input parameters that you have specified. get_file_from_repository
Investigation
Create Merge Request Creates a new merge request on a repository based on the input parameters that you have specified. Currently it support merging only 2 commits. create_merge_request
Investigation
Create File Creates a new file within the repository based on the input parameters that you have specified. create_new_file_in_repository
Investigation
Update File Updates a file within the repository based on the input parameters that you have specified. update_file_in_repository
Investigation
Delete File Deletes a file within the repository based on the input parameters that you have specified. delete_existing_file_in_repository
Investigation
Execute an API Request Sends an API request to any Azure DevOps API endpoint based on specified HTTP method, endpoint, and other input parameters that you have specified, enabling flexible API interactions tailored to user needs. execute_an_api_request
Investigation

operation: Get Pipeline List

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its pipelines from Azure DevOps.
Sort Field (Optional) Specify the field based on which to sort the retrieved results from Azure DevOps. By default it is set to name.
Sort Order (Optional) Select the sort order to sort the retrieved results from Azure DevOps. You can choose from the following options:
  • ASC
  • DESC

NOTE: The selected sort order sorts the results only by the name field.

Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Limit (Optional) Specify the maximum number of records to be retrieved in this operation.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "_links": {
                "web": {
                    "href": ""
                },
                "self": {
                    "href": ""
                }
            },
            "folder": "",
            "revision": ""
        }
    ]
}

operation: Get Pipeline Run List

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its pipeline run list from Azure DevOps.
Pipeline ID Specify the ID of the pipeline whose runs are to be retrieved.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "_links": {
                "web": {
                    "href": ""
                },
                "self": {
                    "href": ""
                },
                "pipeline": {
                    "href": ""
                },
                "pipeline.web": {
                    "href": ""
                }
            },
            "result": "",
            "pipeline": {
                "id": "",
                "url": "",
                "name": "",
                "folder": "",
                "revision": ""
            },
            "createdDate": "",
            "finishedDate": "",
            "templateParameters": {}
        }
    ]
}

operation: Get Pipeline Run Details

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its pipeline run details from Azure DevOps.
Pipeline ID Specify the ID of the pipeline whose run details are to be retrieved.
Run ID Specify the ID of the run whose details are to be retrieved.

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "url": "",
    "name": "",
    "state": "",
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pipeline": {
            "href": ""
        },
        "pipeline.web": {
            "href": ""
        }
    },
    "result": "",
    "pipeline": {
        "id": "",
        "url": "",
        "name": "",
        "folder": "",
        "revision": ""
    },
    "resources": {
        "repositories": {
            "self": {
                "refName": "",
                "version": "",
                "repository": {
                    "id": "",
                    "type": ""
                }
            }
        }
    },
    "createdDate": "",
    "yamlDetails": {
        "rootYamlFile": {
            "ref": "",
            "yamlFile": "",
            "repoAlias": ""
        },
        "expandedYamlUrl": ""
    },
    "finishedDate": "",
    "templateParameters": {}
}

operation: Get Project List

Input parameters

Parameter Description
State (Optional) Select the state of the project to be retrieved from Azure DevOps. You can choose from the following options:
  • All
  • Create Pending
  • Deleted
  • Deleting
  • New
  • Unchanged
  • Well Formed (Default)
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Offset (Optional) Specify the number of records to be skipped when retrieving results.
Limit (Optional) Specify the maximum number of records to be retrieved.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        }
    ]
}

operation: Get Repository List

Input parameters

Parameter Description
Project Name Specify the name of the project to retrieve its repositories from Azure DevOps.
Include Hidden Repositories (Optional) Select to include hidden repositories in the response. By default, this option is cleared, i.e., set to false.
Include All URLs (Optional) Select to include all remote URLs in the response. By default, this option is cleared, i.e., set to false.
Include Reference Links (Optional) Select to include reference links in the response. By default, this option is cleared, i.e., set to false.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "name": "",
            "size": "",
            "sshUrl": "",
            "webUrl": "",
            "project": {
                "id": "",
                "url": "",
                "name": "",
                "state": "",
                "revision": "",
                "visibility": "",
                "description": "",
                "lastUpdateTime": ""
            },
            "remoteUrl": "",
            "isDisabled": "",
            "defaultBranch": "",
            "isInMaintenance": "",
            "validRemoteUrls": [],
            "_links": {
                "ssh": {
                    "href": ""
                },
                "web": {
                    "href": ""
                },
                "refs": {
                    "href": ""
                },
                "self": {
                    "href": ""
                },
                "items": {
                    "href": ""
                },
                "pushes": {
                    "href": ""
                },
                "commits": {
                    "href": ""
                },
                "project": {
                    "href": ""
                },
                "pullRequests": {
                    "href": ""
                }
            }
        }
    ]
}

operation: Get Branch List

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the branch list.
Repository Specify the ID or name of the repository whose branch list is to be retrieved.
Branch Name Filter (Contains) (Optional) Specify a substring to retrieve only those branch names that contain the specified string.
Branch Name Filter (Starts With) (Optional) Specify a prefix to retrieve only those branch names that start with the specified string. For example, heads/ma returns branches such as refs/heads/main and refs/heads/master.
Include My Branches (Optional) Select to include only those branches that the user owns, has marked as favorites, and the default branch. By default, this option is cleared, i.e., set to false.
Include Statuses (Optional) Select to include up to the first 1000 commit statuses for each ref. By default, this option is cleared, i.e., set to false.
Include Links (Optional) Select to include referenceLinks in the results. By default, this option is cleared, i.e., set to false.
Latest Statuses Only (Optional) Select to include only the tip commit status for each ref. Requires includeStatuses to be true. By default, this option is cleared, i.e., set to false.
Peel Tags (Optional) Select to use annotated tags to populate the PeeledObjectId property. By default, this option is cleared, i.e., set to false.
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Limit (Optional) Specify the maximum number of refs to return. Maximum value is 1000.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "name": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "repository": {
                    "href": ""
                }
            },
            "creator": {
                "id": "",
                "url": "",
                "_links": {
                    "avatar": {
                        "href": ""
                    }
                },
                "imageUrl": "",
                "descriptor": "",
                "uniqueName": "",
                "displayName": ""
            },
            "objectId": "",
            "statuses": []
        }
    ]
}

operation: Get Commit Details

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the commit details.
Repository Specify the ID or name of the repository whose commit is to be retrieved.
Commit ID Specify the ID of the commit to be retrieved.
Change Count (Optional) Specify the number of changes to include in the result.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "push": {
        "date": "",
        "pushId": "",
        "pushedBy": {
            "id": "",
            "url": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "descriptor": "",
            "uniqueName": "",
            "displayName": ""
        }
    },
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "changes": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "author": {
        "date": "",
        "name": "",
        "email": "",
        "imageUrl": ""
    },
    "treeId": "",
    "comment": "",
    "parents": [],
    "commitId": "",
    "committer": {
        "date": "",
        "name": "",
        "email": "",
        "imageUrl": ""
    },
    "remoteUrl": "",
    "changes": [
        {
            "item": {
                "url": "",
                "path": "",
                "commitId": "",
                "objectId": "",
                "gitObjectType": ""
            },
            "changeType": ""
        }
    ],
    "changeCounts": {
        "Add": "",
        "Edit": "",
        "Delete": ""
    }
}

operation: Get Pull Request List

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the list of pull requests (PR).
Repository Specify the ID or name of the repository to retrieve its list of PRs.
Status (Optional) Select the status of the pull requests to filter the retrieved results. You can choose from the following options:
  • All
  • Active
  • Abandoned
  • Completed
  • Not Set
Search Criteria (Optional) Specify the search criteria, as JSON, to retrieve the pull requests from Azure DevOps. For example:
{
                    "maxTime": "",
                    "minTime": "",
                    "creatorId": "",
                    "reviewerId": "",
                    "includeLinks": "",
                    "repositoryId": "",
                    "sourceRefName": "",
                    "targetRefName": "",
                    "queryTimeRangeType": "",
                    "sourceRepositoryId": ""
                  }
Offset (Optional) Specify the number of records to be skipped retrieved in this operation.
Limit (Optional) Specify the maximum number of records to be retrieved in this operation.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "title": "",
            "status": "",
            "isDraft": "",
            "mergeId": "",
            "createdBy": {
                "id": "",
                "url": "",
                "_links": {
                    "avatar": {
                        "href": ""
                    }
                },
                "imageUrl": "",
                "descriptor": "",
                "uniqueName": "",
                "displayName": ""
            },
            "reviewers": [
                {
                    "id": "",
                    "url": "",
                    "vote": "",
                    "_links": {
                        "avatar": {
                            "href": ""
                        }
                    },
                    "imageUrl": "",
                    "isFlagged": "",
                    "uniqueName": "",
                    "displayName": "",
                    "hasDeclined": "",
                    "reviewerUrl": ""
                }
            ],
            "closedDate": "",
            "repository": {
                "id": "",
                "url": "",
                "name": "",
                "project": {
                    "id": "",
                    "name": "",
                    "state": "",
                    "visibility": "",
                    "lastUpdateTime": ""
                }
            },
            "mergeStatus": "",
            "description": "",
            "codeReviewId": "",
            "creationDate": "",
            "pullRequestId": "",
            "sourceRefName": "",
            "targetRefName": "",
            "lastMergeCommit": {
                "url": "",
                "commitId": ""
            },
            "completionOptions": {
                "mergeStrategy": "",
                "mergeCommitMessage": "",
                "transitionWorkItems": "",
                "autoCompleteIgnoreConfigIds": []
            },
            "supportsIterations": "",
            "completionQueueTime": "",
            "lastMergeSourceCommit": {
                "url": "",
                "commitId": ""
            },
            "lastMergeTargetCommit": {
                "url": "",
                "commitId": ""
            }
        }
    ]
}

operation: Get Pull Request Details

Input parameters

Parameter Description
Project Name Specify the name of the project from which to retrieve the pull request (PR) details.
Pull Request ID Specify the ID of the pull request which is to be retrieved for the specified project.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "title": "",
    "status": "",
    "isDraft": "",
    "mergeId": "",
    "createdBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "reviewers": [
        {
            "id": "",
            "url": "",
            "vote": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "isFlagged": "",
            "uniqueName": "",
            "displayName": "",
            "hasDeclined": "",
            "reviewerUrl": ""
        }
    ],
    "artifactId": "",
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "description": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    },
    "mergeStatus": "",
    "codeReviewId": "",
    "creationDate": "",
    "pullRequestId": "",
    "sourceRefName": "",
    "targetRefName": "",
    "lastMergeCommit": {
        "url": "",
        "author": {
            "date": "",
            "name": "",
            "email": ""
        },
        "comment": "",
        "commitId": "",
        "committer": {
            "date": "",
            "name": "",
            "email": ""
        }
    },
    "lastMergeSourceCommit": {
        "url": "",
        "commitId": ""
    },
    "lastMergeTargetCommit": {
        "url": "",
        "commitId": ""
    },
    "supportsIterations": "",
    "description": ""
}

operation: Create Pull Request

Input parameters

Parameter Description
Project Name Specify the Azure DevOps project associated with the repository under which the PR is to be created.
Repository Select the ID or name of the repository under which the PR is to be created.
Pull Request Title Specify a title for the pull request being created.
Source Branch Name Specify the name of the source branch for creating the PR.
Target Branch Name Specify the name of the target branch for creating the PR.
Pull Request Description (Optional) Specify a description for the pull request.
Reviewers (Optional) Specify IDs, display names, or email IDs as comma-separated values to add as reviewers for this pull request.
Supports Iterations (Optional) Select to enable reviewing of subsequent pushes individually.
Additional Inputs (Optional) Specify any other parameters, as JSON, of this pull request to be created. For example, { "isDraft": true }

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "title": "",
    "_links": {
        "self": {
            "href": ""
        },
        "statuses": {
            "href": ""
        },
        "createdBy": {
            "href": ""
        },
        "workItems": {
            "href": ""
        },
        "repository": {
            "href": ""
        },
        "sourceBranch": {
            "href": ""
        },
        "sourceCommit": {
            "href": ""
        },
        "targetBranch": {
            "href": ""
        },
        "targetCommit": {
            "href": ""
        }
    },
    "labels": [],
    "status": "",
    "isDraft": "",
    "mergeId": "",
    "createdBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "reviewers": [],
    "artifactId": "",
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "description": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    },
    "mergeStatus": "",
    "codeReviewId": "",
    "creationDate": "",
    "pullRequestId": "",
    "sourceRefName": "",
    "targetRefName": "",
    "lastMergeSourceCommit": {
        "url": "",
        "commitId": ""
    },
    "lastMergeTargetCommit": {
        "url": "",
        "commitId": ""
    },
    "supportsIterations": "",
    "description": ""
}

operation: Update Pull Request

Input parameters

Parameter Description
Project Name Specify the Azure DevOps project associated with the repository under which the PR is to be updated.
Repository Select the ID or name of the repository under which the PR is to be updated.
Pull Request ID Specify the ID of the pull request to update.
Pull Request Title Specify a title for the pull request to update.
Pull Request Description (Optional) Specify a new description for the pull request (up to 4000 characters).
Pull Request Status (Optional) Select the new status of the pull requests to update. You can choose from the following options:
  • Active
  • Abandoned
  • Completed
  • Not Set
Target Branch Name (Optional) Specify a different name of the target branch to update, if changing the target for the PR.
Additional Inputs Specify any other parameters, as JSON, of this pull request to be created. For example, { "isDraft": true }

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "title": "",
    "_links": {
        "self": {
            "href": ""
        },
        "statuses": {
            "href": ""
        },
        "createdBy": {
            "href": ""
        },
        "workItems": {
            "href": ""
        },
        "iterations": {
            "href": ""
        },
        "repository": {
            "href": ""
        },
        "sourceBranch": {
            "href": ""
        },
        "sourceCommit": {
            "href": ""
        },
        "targetBranch": {
            "href": ""
        },
        "targetCommit": {
            "href": ""
        }
    },
    "status": "",
    "isDraft": "",
    "mergeId": "",
    "createdBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "reviewers": [],
    "artifactId": "",
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "description": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    },
    "mergeStatus": "",
    "codeReviewId": "",
    "creationDate": "",
    "pullRequestId": "",
    "sourceRefName": "",
    "targetRefName": "",
    "lastMergeCommit": {
        "url": "",
        "author": {
            "date": "",
            "name": "",
            "email": ""
        },
        "comment": "",
        "commitId": "",
        "committer": {
            "date": "",
            "name": "",
            "email": ""
        }
    },
    "lastMergeSourceCommit": {
        "url": "",
        "commitId": ""
    },
    "lastMergeTargetCommit": {
        "url": "",
        "commitId": ""
    },
    "supportsIterations": "",
    "description": ""
}

operation: Get Pull Request Reviewer List

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository whose PR reviewers are to be retrieved.
Repository Specify the ID or name of the repository where the pull request exists.
Pull Request ID Specify the ID of the pull request whose reviewers you want to retrieve.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "vote": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "isFlagged": "",
            "uniqueName": "",
            "displayName": "",
            "hasDeclined": "",
            "reviewerUrl": ""
        }
    ]
}

operation: Add Pull Request Reviewer

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository where PR reviewers are to be added.
Repository Specify the ID or name of the repository where the pull request exists.
Pull Request ID Specify the ID of the pull request to which the reviewer is to be added.
Reviewer Specify the ID, display name, or email address of the reviewer to be added to the pull request.
Required Reviewer (Optional) Select to mark the reviewer as required.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "url": "",
            "vote": "",
            "_links": {
                "avatar": {
                    "href": ""
                }
            },
            "imageUrl": "",
            "isFlagged": "",
            "uniqueName": "",
            "displayName": "",
            "hasDeclined": "",
            "reviewerUrl": ""
        }
    ]
}

operation: Get Pull Request Commit List

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository whose PR commit list is to be retrieved. Specify the name of the Azure DevOps project associated with the repository.
Repository Specify the ID or name of the repository where the pull request exists.
Pull Request ID Specify the ID of the pull request for which the commits are to be listed.
Limit (Optional) Specify the maximum number of commits to return.
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "comment": "",
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ]
}

operation: Get Commit List

Input parameters

Parameter Description
Project Name Specify the name of the Azure DevOps project associated with the repository whose commits are to be retrieved.
Repository Specify the ID or name of the repository whose commit list is to be retrieved.
Search Options (Optional) Select the criteria to filter search results. You can choose from the following options:
  • Commit IDs: Select this option to specify exact commit IDs as comma-separated values in the Commit IDs field.
  • Other: Select to use additional filtering options by specifying values in the following fields:
    • Committer: (Optional) Specify the alias or display name of the committer.
    • From Commit ID: (Optional) Specify the lower bound commit ID for filtering commits.
    • To Commit ID: (Optional) Specify the upper bound commit ID for filtering commits.
    • From Date: (Optional) Specify the start date to include history entries created after this date.
    • To Date: (Optional) Specify the end date to include history entries created before this date.
    • Commit Author: (Optional) Specify the alias or display name of the author.
    • Exclude Deletes: (Optional) Specify whether to exclude delete entries for the specified path.
    • History Mode: (Optional) Specify the Git history mode to use.
    • Include Push Data: (Optional) Specify whether to include push information.
    • Show Oldest Commits First: (Optional) Specify whether to show the oldest commits first.
    • Search Criteria: Specify the search criteria to retrieve the commits from Azure DevOps. For example, you can include parameters like `fromCommitId`, `toCommitId`, `author`, and `fromDate`.
    • Offset: (Optional) Specify the number of records to skip.
    • Limit: (Optional) Specify the maximum number of commits to retrieve.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "comment": "",
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            },
            "remoteUrl": "",
            "changeCounts": {
                "Add": "",
                "Edit": "",
                "Delete": ""
            },
            "commentTruncated": ""
        }
    ]
}

operation: Run Pipeline

Input parameters

Parameter Description
Project Name Specify the name of the project under which the pipeline is to be run.
Pipeline ID Specify the ID of the pipeline to run.
Stages to Skip (Optional) Specify the pipeline stage names as comma-separated values that are to be skipped during execution.
Pipeline Version (Optional) Specify the pipeline version being run.
Preview Run (Optional) Select to return the final YAML document after parsing templates as a run preview.
Resources (Optional) Specify the resources required for the run.

Output

The output contains the following populated JSON schema:

Output schema when you choose Preview Run as false:

{
    "id": "",
    "url": "",
    "name": "",
    "state": "",
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pipeline": {
            "href": ""
        },
        "pipeline.web": {
            "href": ""
        }
    },
    "pipeline": {
        "id": "",
        "url": "",
        "name": "",
        "folder": "",
        "revision": ""
    },
    "resources": {
        "repositories": {
            "self": {
                "refName": "",
                "version": "",
                "repository": {
                    "id": "",
                    "type": ""
                }
            }
        }
    },
    "createdDate": "",
    "templateParameters": {}
}

Output schema when you choose Preview Run as true:

{
    "id": "",
    "url": "",
    "name": "",
    "state": "",
    "_links": {
        "web": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pipeline": {
            "href": ""
        },
        "pipeline.web": {
            "href": ""
        }
    },
    "pipeline": {
        "id": "",
        "url": "",
        "name": "",
        "folder": "",
        "revision": ""
    },
    "finalYaml": "",
    "templateParameters": {}
}

operation: Create Repository

Input parameters

Parameter Description
Project ID Specify the ID of the project within which to create the repository.
Repository Name Specify the name of the repository to create.
Parent Repository ID (Optional) Specify the ID of the parent repository from which to create a fork.
Source Ref (Optional) Specify the source ref to create a fork syncing only the provided refs. For example: refs/heads/main

Note: The value specified in this parameter takes effect only when a Parent Repository ID is specified.

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "url": "",
    "name": "",
    "size": "",
    "_links": {
        "ssh": {
            "href": ""
        },
        "web": {
            "href": ""
        },
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "items": {
            "href": ""
        },
        "pushes": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "project": {
            "href": ""
        },
        "pullRequests": {
            "href": ""
        },
        "forkSyncOperation": {
            "href": ""
        }
    },
    "isFork": "",
    "sshUrl": "",
    "webUrl": "",
    "project": {
        "id": "",
        "url": "",
        "name": "",
        "state": "",
        "revision": "",
        "visibility": "",
        "lastUpdateTime": ""
    },
    "remoteUrl": "",
    "isDisabled": "",
    "creationDate": "",
    "isInMaintenance": ""
}

operation: Update Repository

Input parameters

Parameter Description
Repository ID Specify the ID of the repository whose details are to be updated.
Repository Name (Optional) Specify a name to be updated as the new name of the repository.
Default Branch (Optional) Specify the branch name to be updated as the default branch for this repository.
Disable Repository (Optional) Select whether to enable or disable the repository. You can select from the following options:
  • True
  • False

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "url": "",
    "name": "",
    "size": "",
    "sshUrl": "",
    "webUrl": "",
    "project": {
        "id": "",
        "url": "",
        "name": "",
        "state": "",
        "revision": "",
        "visibility": "",
        "lastUpdateTime": ""
    },
    "remoteUrl": "",
    "isDisabled": "",
    "creationDate": "",
    "defaultBranch": "",
    "isInMaintenance": ""
}

operation: Push Changes

Input parameters

Parameter Description
Project Specify the ID of the project in which to push the changes.
Repository ID Specify the ID of the repository in which to push the changes.
Branch Name Specify the name of the branch in which to push the changes.
Previous Commit ID Specify the previous commit ID after which to push the changes.
Commit Message Specify the commit message to be used for pushing the changes.
Cloned Repository Path Specify the path to the cloned repository where you want to push the latest changes.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Create Branch

Input parameters

Parameter Description
Project Specify the ID of the project within which to create a new branch.
Repository ID Specify the ID of the repository within which to create a new branch.
Branch Name Specify the name of the branch to be created.
Commit Message Specify the commit message to be used for creating a branch.
Previous Commit ID (Optional) Specify the previous commit SHA as reference from which to create the branch.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Delete Branch

Input parameters

Parameter Description
Project Specify the ID or name of the project that contains the branch that is to be deleted.
Repository Specify the ID or name of the repository that contains the branch that is to be deleted.
Branch Name Specify the name of the branch to delete.
Previous Commit ID Specify the previous commit SHA of the branch to be deleted.

Output

The output contains the following populated JSON schema:

{
    "value": [
        {
            "repositoryId": "",
            "name": "",
            "oldObjectId": "",
            "newObjectId": "",
            "isLocked": "",
            "updateStatus": "",
            "success": ""
        }
    ],
    "count": ""
}

operation: Create Pull Request Comment

Input parameters

Parameter Description
Repository ID Specify the ID of the repository within which to create a new pull request comment.
Pull Request ID Specify the ID of the pull request in which to create the comment.
Content Specify the content of the comment to add in the pull request.
Thread ID (Optional) Specify the ID of the thread in which to insert the comment.
Parent Comment ID (Optional) Specify the ID of the parent comment to send this comment as reply.

Output

The output contains the following populated JSON schema:

{
    "id": "",
    "_links": {
        "self": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "status": "",
    "comments": [
        {
            "id": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "threads": {
                    "href": ""
                },
                "repository": {
                    "href": ""
                },
                "pullRequests": {
                    "href": ""
                }
            },
            "author": {
                "id": "",
                "url": "",
                "_links": {
                    "avatar": {
                        "href": ""
                    }
                },
                "imageUrl": "",
                "descriptor": "",
                "uniqueName": "",
                "displayName": ""
            },
            "content": "",
            "commentType": "",
            "publishedDate": "",
            "lastUpdatedDate": "",
            "parentCommentId": "",
            "lastContentUpdatedDate": ""
        }
    ],
    "isDeleted": "",
    "identities": "",
    "properties": "",
    "publishedDate": "",
    "threadContext": "",
    "lastUpdatedDate": "",
    "pullRequestThreadContext": ""
}

operation: Get Pull Request Comment List

Input parameters

Parameter Description
Repository ID Specify the ID of the repository whose pull request (PR) comments are to be retrieved.
Pull Request ID Specify the ID of the pull request from which to retrieve comments.
Thread ID (Optional) Specify the ID of the comment thread to retrieve comments.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "id": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "repository": {
                    "href": ""
                }
            },
            "status": "",
            "comments": [
                {
                    "id": "",
                    "_links": {
                        "self": {
                            "href": ""
                        },
                        "threads": {
                            "href": ""
                        },
                        "repository": {
                            "href": ""
                        },
                        "pullRequests": {
                            "href": ""
                        }
                    },
                    "author": {
                        "id": "",
                        "url": "",
                        "_links": {
                            "avatar": {
                                "href": ""
                            }
                        },
                        "imageUrl": "",
                        "descriptor": "",
                        "uniqueName": "",
                        "displayName": ""
                    },
                    "content": "",
                    "usersLiked": [],
                    "commentType": "",
                    "publishedDate": "",
                    "lastUpdatedDate": "",
                    "parentCommentId": "",
                    "lastContentUpdatedDate": ""
                }
            ],
            "isDeleted": "",
            "identities": "",
            "properties": "",
            "publishedDate": "",
            "threadContext": "",
            "lastUpdatedDate": "",
            "pullRequestThreadContext": ""
        }
    ]
}

operation: Get User List

Input parameters

Parameter Description
Scope (Optional) Specify a non-default scope (collection, project) in which to search for users.
Continuation Token (Optional) Specify the continuation token from a previous request to retrieve the next page of results.
Subject Subtypes (Optional) Specify a comma separated list of user subject subtypes to filter the retrieved results. For example: msa, aad, svc (service identity), imp (imported identity), etc.

Output

The output contains the following populated JSON schema:

{
    "count": "",
    "value": [
        {
            "subjectKind": "",
            "metaType": "",
            "domain": "",
            "principalName": "",
            "mailAddress": "",
            "origin": "",
            "originId": "",
            "displayName": "",
            "_links": {
                "self": {
                    "href": ""
                },
                "memberships": {
                    "href": ""
                },
                "membershipState": {
                    "href": ""
                },
                "storageKey": {
                    "href": ""
                },
                "avatar": {
                    "href": ""
                }
            },
            "url": "",
            "descriptor": ""
        }
    ]
}

operation: Get File

Input parameters

Parameter Description
Repository Specify the name or ID of the repository from to retrieve the file.
Branch Name Specify the name of the branch from to retrieve the file.
File Path Specify the path from to retrieve the file.
Include Content (Optional) Select to include file content. Default is false.
Include Content Metadata (Optional) Select to include content metadata. Default is false.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "path": "",
    "_links": {
        "blob": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "content": "",
    "commitId": "",
    "objectId": "",
    "gitObjectType": "",
    "contentMetadata": {
        "vsLink": "",
        "encoding": "",
        "fileName": "",
        "extension": "",
        "contentType": ""
    }
}

operation: Create Merge Request

Input parameters

Parameter Description
Project Specify the name or ID of the project in which to create the merge request.
Repository Specify the name or ID of the repository in which to create the merge request.
Parent Commit ID Specify the parent commit IDs as a list of the branches being merged, to create the merge commit. For example: <commit-sha>, <commit-sha>
Comment Specify the comment or message to add while creating the merge request.

Output

The output contains the following populated JSON schema:

{
    "mergeOperationId": "",
    "status": "",
    "detailedStatus": {},
    "parents": [],
    "comment": ""
}

operation: Create File

Input parameters

Parameter Description
Project Specify the name or ID of the project within which to create the file.
Repository Specify the name or ID of the repository within which to create the file.
Branch Name Specify the name of the branch in which to create the file.
Previous Commit ID Specify the previous commit ID of the branch in which to create the file.
File Path Specify the full path in which to create the file.
Content Specify the contents to add to the file being created.
Commit Message Specify the commit message to add while creating the file.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Update File

Input parameters

Parameter Description
Project Specify the name or ID of the project in which the file is to be updated.
Repository Specify the name or ID of the repository in which the file is to be updated.
Branch Name Specify the name of the branch in which to update the file.
Previous Commit ID Specify the previous commit ID of the branch in which to update the file.
File Path Specify the full path of the file to be updated.
Content Specify the contents to update in the file being updated.
Operation Select the operation you want to perform. You can select from the following options:
  • Append
  • Overwrite
Commit Message Specify the commit message for updating the file.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Delete File

Input parameters

Parameter Description
Project Specify the name or ID of the project in which the file is to be deleted.
Repository Specify the name or ID of the repository in which the file is to be deleted.
Branch Name Specify the name of the branch in which the file is to be deleted.
Previous Commit ID Specify the previous commit ID of the branch in which the file is to be deleted.
File Path Specify the full path of the file to be deleted.
Commit Message Specify the commit message for deleting the file.

Output

The output contains the following populated JSON schema:

{
    "url": "",
    "date": "",
    "_links": {
        "refs": {
            "href": ""
        },
        "self": {
            "href": ""
        },
        "pusher": {
            "href": ""
        },
        "commits": {
            "href": ""
        },
        "repository": {
            "href": ""
        }
    },
    "pushId": "",
    "commits": [
        {
            "url": "",
            "author": {
                "date": "",
                "name": "",
                "email": ""
            },
            "treeId": "",
            "comment": "",
            "parents": [],
            "commitId": "",
            "committer": {
                "date": "",
                "name": "",
                "email": ""
            }
        }
    ],
    "pushedBy": {
        "id": "",
        "url": "",
        "_links": {
            "avatar": {
                "href": ""
            }
        },
        "imageUrl": "",
        "descriptor": "",
        "uniqueName": "",
        "displayName": ""
    },
    "refUpdates": [
        {
            "name": "",
            "newObjectId": "",
            "oldObjectId": "",
            "repositoryId": ""
        }
    ],
    "repository": {
        "id": "",
        "url": "",
        "name": "",
        "size": "",
        "sshUrl": "",
        "webUrl": "",
        "project": {
            "id": "",
            "url": "",
            "name": "",
            "state": "",
            "revision": "",
            "visibility": "",
            "lastUpdateTime": ""
        },
        "remoteUrl": "",
        "isDisabled": "",
        "isInMaintenance": ""
    }
}

operation: Execute an API Request

Input parameters

Parameter Description
HTTP Method Select an HTTP action for the request. You can select from the following options:
  • DELETE
  • GET
  • PATCH
  • POST
  • PUT
Endpoint Specify the target API URL path for the request. For example, if the website is https://example.com and URL path is https://example.com/images/pic.jpg, the endpoint would be /images/pic.jpg.
Query Parameters (Optional) Specify any optional parameters to add to the URL and refine the request.
Request Payload (Optional) Specify data, as JSON, to be sent as the request payload (typically for POST or PUT requests).

Output

The output contains a non-dictionary value.

Included playbooks

The Sample - Azure DevOps - 2.0.0 playbook collection comes bundled with the Azure DevOps connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Azure DevOps connector.

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.

Getting Access Tokens

You can get authentication tokens to access the Azure DevOps APIs using two methods:

Getting Access Tokens using the On behalf of the User – Delegate Permission method

  1. Register your app. To register an app refer to Register your app on Microsoft's Azure DevOps documentation.
  2. Ensure that the required permissions are granted for the registration of the application. Select API Permissions > Add permission > Azure DevOps > Delegated Permissions.

    NOTE: The API Permission that should be granted to the registered application is mentioned in the Minimum permissions section required for the 'Delegate-type' permission table available in the Minimum Permissions section of this document.

  3. The Redirect URL can be directed to any web application in which you want to receive responses from Azure DevOps. If you are unsure about what to set as a redirect URL, you can use https://localhost/myapp.
  4. Copy the following URL and replace the TENANT_ID, CLIENT_ID, and REDIRECT_URI with your tenant ID, client ID, and the following redirect URL:

    https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize?client_id= CLIENT_ID& response_type=code&redirect_uri=REDIRECT_URL&response_mode=query&scope=https://app.vssps.visualstudio.com/.default%20offline_access

  5. Enter the above link with the replaced values and you will be prompted to grant permissions for your Azure Service Management. You will be automatically redirected to a link with the following structure:
    REDIRECT_URI?code=AUTH_CODE&session_state=SESSION_STATE
  6. Copy the AUTH_CODE (without the "code=" prefix) and paste it into your instance configuration in the Authorization Code parameter.
  7. Enter your client ID in the Client ID field.
  8. Enter your client secret in the Client Secret field.
  9. Enter your redirect URL in the Redirect URL field. By default, it is set to https://localhost/myapp.
  10. Enter your API version in the API Version field.
Previous
Next