Create a new project version

post/projects/{projectName}/versions

Creates a new version of a project. For example, creates a new version with version 1.

Request Samples

1

Response Samples

1{
2 "projectName": "a_project_name",
3 "versions": [
4 {
5 "operation": "CREATE_VERSION",
6 "version": 1,
7 "level": 1,
8 "createdOn": 1682074612,
9 "createdByName": "a_user",
10 "createdByEmail": "a_user@company.com",
11 "commitDetails": {
12 "type": "MAJOR_VERSION",
13 "notes": "Creating a new version",
14 "tags": [
15 "tag1",
16 "tag2"
17 ],
18 "version": 1,
19 "level": 1
20 }
21 },
22 {
23 "operation": "PROMOTE_LEVEL",
24 "version": 1,
25 "level": 2,
26 "createdOn": 1682074613,
27 "createdByName": "a_user",
28 "createdByEmail": "a_user@company.com",
29 "commitDetails": {
30 "type": "PROMOTE",
31 "notes": "Promoting a project version to Test",
32 "tags": [
33 "tag1",
34 "tag2"
35 ],
36 "version": 1,
37 "level": 2
38 }
39 },
40 {
41 "operation": "PROMOTE_LEVEL",
42 "version": 1,
43 "level": 3,
44 "createdOn": 1682074614,
45 "createdByName": "a_user",
46 "createdByEmail": "a_user@company.com",
47 "commitDetails": {
48 "type": "PROMOTE",
49 "notes": "Promoting a project version to Production",
50 "tags": [
51 "tag1",
52 "tag2"
53 ],
54 "version": 1,
55 "level": 3
56 }
57 },
58 {
59 "operation": "CREATE_VERSION",
60 "version": 2,
61 "level": 1,
62 "createdOn": 1682074616,
63 "createdByName": "a_user",
64 "createdByEmail": "a_user@company.com",
65 "commitDetails": {
66 "type": "MAJOR_VERSION",
67 "notes": "Creating a new version",
68 "tags": [
69 "tag1",
70 "tag2"
71 ],
72 "version": 2,
73 "level": 1
74 }
75 }
76 ]
77}

Path Parameters

NameTypeRequiredDescription
projectName
string
true

The project name.

Request Body

A representation for creating a new project version.

NameTypeRequiredDescription
notes
string
false

The notes for the commit.

tags
array [string]
false

The tags for the commit.

Responses

StatusMeaningDescription
201Created

The new version was created, or the version was promoted.

HeadersSchema
400Bad Request

The specific project exists, but the specified version or promotion level does not.

Schema
401Unauthorized

The request is not authenticated.

Schema
403Forbidden

The user did not have the necessary permissions.

Schema
404Not Found

The specified project does not exist.

Schema
409Conflict

The project is locked by another user and cannot be versioned at this time, or the project has changes that must be saved first.

Schema
500Internal Server Error

An internal error has occurred during project versioning. See the application logs for more details.

Schema
503Service Unavailable

Functionality for project packages is not enabled, or functionality for project versions is not enabled.

Schema