Skip to content

Latest commit

 

History

History
66 lines (56 loc) · 3.18 KB

Azure-DevOps-Demo-Generator-REST-API-Reference.md

File metadata and controls

66 lines (56 loc) · 3.18 KB

Welcome to the Azure DevOps Services REST API Reference


We have added API support to the Azure DevOps Demo Generator so that it can be invoked externally. This page has all the instructions that you need to know how to call the API.

Create a Project

POST https://azuredevopsdemogenerator.azurewebsites.net/api/environment/create

Sample Request Body

{
	"accessToken": "********************************",
	"organizationName": "DemoProjects",
	"templateName": "contososhuttle2",
	"users": [		
		{
			"email": "[email protected]",
			"ProjectName": "TestProject1"
		},
	{
			"email": "[email protected]",
			"ProjectName": "TestProject2"
		}
    	]
}

Parameters

Parameter Description
accessToken PAT for the Azure DevOps Org. Note that the projects will be created under the user name in which the PAT is created. The PAT should be created with the following scopes
  • read, write and manage projects and teams and
  • read and write permissions for Work Item, Code, Build, Wiki, Dashboard, Extensions, etc.,
  • Organization name Name of the Azure DevOps org in which the project will be created
    templatNameThe short name of the template
    usersUsers information. You can specify any number of users.
  • Email address of the user
  • Name of the project

    Sample Response

    Validation Messages

    Validation for account based on provided Organisation nameIf Organisation Name is empty, then message will be "Provide a valid Account name" with status code 402 Bad Request
    Validation for access tokenIf access token is empty, then message will be "Token of type Basic must be provided" with status code 402 Bad Request
    Validation for Project NameIf the Project Name is invalid, then message will be "Invalid Project name" with status code 402 Bad Request If the Project Name is same as reserved keywords, then message will be "Project name must not be a system-reserved name such as PRN, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, COM10, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, NUL, CON, AUX, SERVER, SignalR, DefaultCollection, or Web" with status code 402 Bad request
    Check for Duplicate Project Name in Request bodyIf the Project Name duplicate in the request body, then message will be "ProjectName must be unique" with status code 402 Bad Request
    Validation for TemplateNameIf templateName is empty, then message will be "Template Name should not be empty" with status code 402 Bad Request. If the given template name not found in the source, then message will be "Template Not Found!" with status code 402 Bad Request
    Validation for Email ID and Project Name"EmailId or ProjectName is not found" with status code 402 Bad Request