REST API - Create Project Request

Updated by Stefenie Stockbridge

/api/v1/projects

Description

Creates a project from a template or without a template.

URL Structures

[Blueprint_URI]/api/v1/projects

Supported Methods

Request Body Parameters

The new project must be defined in the body of the request.

  • Name (required): Defines the name of the new project.
  • Description (optional): Defines the description of the new project.
  • Path (optional): Defines the location of the new project. This parameter must be the full path to an instance folder. If not provided, the newly-created project will be added to the root.
  • TemplateLocation (optional): Defines the template used for the new project. This parameter must be the full path of the template project. If not provided, the newly-created project will not be based off of an existing project.
  • IncludeContent(optional): Defines whether artifact contents of the template project should be copied into the new project. This parameter must be set to "true" or "false." If not provided, the newly-created project will not be created with artifact content from the template project.
IncludeContent is available only in Blueprint v12.5 and later. Use of IncludeContent is recommended only for projects with a small number of artifacts. Timeouts may occur when using on projects with larger amounts of data (many artifacts, or large volumes of data contained within artifacts).

HTTP Status Codes

  • 200: OK
  • 201: Successfully Created
  • 206: Partial Content
  • 400: Bad Request
    This error can occur for a variety of reasons:
    • At least one URI or request body parameter is invalid, such as one of the Filter, Traces, Offset or Limit parameters.
    • A required value has not been provided.
    • If you are submitting a POST or PATCH request and have not added the X-HTTP-Method-Override parameter to your request header.
    • If you have set IncludeContent to "true", but have not defined the TemplateLocation body parameter.
  • 401: Unauthorized
    • The Blueprint token is missing, invalid or expired.
  • 403: Forbidden
    • The applicable permissions are needed. For example, this error can occur when:
      • An Author or Collaborate license is needed for access.
      • Comment permissions are needed on the artifact.
      • Edit permissions are needed on the change summary job.
  • 404: NotFound
    • Item is not found in the project. For example, this error can occur when:
      • Artifact not found.
      • Artifact type not found.
      • Project not found.
      • ALM target not found.
      • Change summary job not found.
      • User does not have edit permissions for this artifact, project or ALM target.
  • 409: Conflict
    • Reason for failure can be found in the response body. Additional information may also be found in the log.
  • 411: Length Required
    • If the Content-Length header is missing in the request.
  • 413: Request Entity Too Large
    • If the provided file size is larger than allowed.
  • 415: Unsupported Media Type
    • If the provided media type is not of MIME Multipart Content "form-data."
  • 416: Request Range Not Satisfiable
    • If offset points to a part of a collection that is not available.
  • 500: Internal Server Error
  • 501: Not Implemented

Examples

XML Examples

Request URI

https://production.blueprintcloud.com/api/v1/projects

Request Body

<?xml version="1.0"?>
<CreateProjectRequest
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.blueprintsys.com/blueprint/api/v1">
<Description>This is my new Project.</Description>
<Name>New Project</Name>
<Path>/Blueprint</Path>
<TemplateLocation>/Blueprint/templates/DefaultProjectTemplate</TemplateLocation>
</CreateProjectRequest>

Response Body

<?xml version="1.0" ?>
<Project
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.blueprintsys.com/blueprint/api/v1">
<Description>This is my new project.</Description>
<Id>4344</Id>
<Location>/Blueprint/New Project</Location>
<Name>New Project</Name>
</Project>
JSON Example

Request URI

https://production.blueprintcloud.com/api/v1/projects

Request Body

[
{
"Name": "New Project",
"Description": "This is my new project.",
"Path": "/Blueprint",
"TemplateLocation": "/Blueprint/templates/DefaultProjectTemplate"
}
]

Response Body

[
{
"Id": 4344,
"Name": "New Project",
"Description": "This is my new project.",
"Location": "/Blueprint/New Project"
}
]


How did we do?