Promote a project
Promotes a project version to the next promotion level when further promotion levels are available. An initial version must be created before the project can be promoted.
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": 120 }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": 238 }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": 356 }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": 174 }75 }76 ]77}
| Status | Meaning | Description | ||
|---|---|---|---|---|
| 201 | Created | The new version was created, or the version was promoted. | Headers | Schema |
| 400 | Bad Request | The specific project exists, but there is no initial version, or the project has been promoted to the highest level that this application supports. | Schema | |
| 401 | Unauthorized | The request is not authenticated. | Schema | |
| 403 | Forbidden | The project has already been promoted to the maximum permitted level. | Schema | |
| 404 | Not Found | The specified project does not exist. | Schema | |
| 409 | Conflict | The specified project with the specified version and promotion level already exists, or the project is locked by another user and cannot be promoted at this time, or the project has changes that must be saved first. | Schema | |
| 410 | Gone | The specified project cannot be promoted to the specified version and level because it has not been promoted to the previous version or level. | Schema | |
| 500 | Internal Server Error | An internal error has occurred during project versioning. See the application logs for more details. | Schema | |
| 503 | Service Unavailable | Functionality for project packages is not enabled, or functionality for project versions is not enabled. | Schema |