Skip to main content
Create a git repository in a team project. Required Permissions:
  • vso.code_manage
External DocumentationTo learn more, visit the Azure DevOps documentation.

Basic Parameters

ParameterDescription
NameThe name of the repository to create.
OrganizationThe name of the organization.
ProjectThe project ID or project name.
Team Project Reference IDThe ID of the Team Project Reference in which to create the repository.

To include additional project properties (for example, description), use Additional Parameters in the Advanced section.

Example:

{
“project”: {
“description”: “The project’s description”
}
}

For more information about the Team Project Reference object, visit Repositories documentation.

Advanced Parameters

ParameterDescription
Additional ParametersA JSON object for additional body parameters. Values specified in this parameter will override equivalent parameters.

For example:
{
“first_key”: 12345,
“second_key”: “some_value”
}
The object must follow the vendor’s structure as defined in the API documentation.
Parent RepositoryThe parent repository object when creating a fork.

For Example:
{
“id”: “57a09b16-c635-4ec9-bd6b-d501fec4eb7b”,
“project”: {
“id”: “3b046b6a-d070-4cd5-ad59-2eace5d05b90”
}
}
For more information about the Parent Repository Object parameter, visit Repositories documentation.
Source RefThe source refs to use while creating a fork repository.

Example Output

{
	"id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
	"name": "AnotherRepository",
	"url": "https://dev.azure.com/fabrikam/_apis/git/repositories/5febef5a-833d-4e14-b9c0-14cb638f91e6",
	"project": {
		"id": "6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c",
		"name": "Fabrikam-Fiber-Git",
		"url": "https://dev.azure.com/fabrikam/_apis/projects/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c",
		"state": "wellFormed"
	},
	"remoteUrl": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_git/AnotherRepository"
}

Workflow Library Example

Create Repository with Azure Devops and Send Results Via Email
Workflow LibraryPreview this Workflow on desktop