CreateProject
POST/gitpod.v1.ProjectService/CreateProject
Creates a new project with specified configuration.
Use this method to:
- Set up development projects
- Configure project environments
- Define project settings
- Initialize project content
Examples
-
Create basic project:
Creates a project with minimal configuration.
name: "Web Application" initializer: specs: - git: remoteUri: "https://github.com/org/repo" -
Create project with devcontainer:
Creates a project with custom development container.
name: "Backend Service" initializer: specs: - git: remoteUri: "https://github.com/org/backend" devcontainerFilePath: ".devcontainer/devcontainer.json" automationsFilePath: ".gitpod/automations.yaml"
Body ParametersJSON
automationsFilePath: optional string
automations_file_path is the path to the automations file relative to the repo root path must not be absolute (start with a /):
this.matches('^$|^[^/].*')CreateProject
curl https://app.gitpod.io/api/gitpod.v1.ProjectService/CreateProject \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GITPOD_API_KEY" \
-d '{
"initializer": {
"specs": [
{
"git": {
"remoteUri": "https://github.com/org/repo"
}
}
]
}
}'{
"project": {
"environmentClass": {
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"localRunner": true,
"order": 0
},
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"automationsFilePath": "automationsFilePath",
"desiredPhase": "PROJECT_PHASE_UNSPECIFIED",
"devcontainerFilePath": "devcontainerFilePath",
"environmentClasses": [
{
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"localRunner": true,
"order": 0
}
],
"initializer": {
"specs": [
{
"contextUrl": {
"url": "https://example.com"
},
"git": {
"checkoutLocation": "checkoutLocation",
"cloneTarget": "cloneTarget",
"remoteUri": "remoteUri",
"targetMode": "CLONE_TARGET_MODE_UNSPECIFIED",
"upstreamRemoteUri": "upstreamRemoteUri"
}
}
]
},
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"name": "x",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"prebuildConfiguration": {
"enabled": true,
"enableJetbrainsWarmup": true,
"environmentClassIds": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"executor": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"timeout": "+9125115.360s",
"trigger": {
"dailySchedule": {
"hourUtc": 23
}
}
},
"recommendedEditors": {
"editors": {
"foo": {
"versions": [
"string"
]
}
}
},
"technicalDescription": "technicalDescription",
"usedBy": {
"subjects": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
}
],
"totalSubjects": 0
}
}
}Returns Examples
{
"project": {
"environmentClass": {
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"localRunner": true,
"order": 0
},
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"automationsFilePath": "automationsFilePath",
"desiredPhase": "PROJECT_PHASE_UNSPECIFIED",
"devcontainerFilePath": "devcontainerFilePath",
"environmentClasses": [
{
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"localRunner": true,
"order": 0
}
],
"initializer": {
"specs": [
{
"contextUrl": {
"url": "https://example.com"
},
"git": {
"checkoutLocation": "checkoutLocation",
"cloneTarget": "cloneTarget",
"remoteUri": "remoteUri",
"targetMode": "CLONE_TARGET_MODE_UNSPECIFIED",
"upstreamRemoteUri": "upstreamRemoteUri"
}
}
]
},
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"name": "x",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"prebuildConfiguration": {
"enabled": true,
"enableJetbrainsWarmup": true,
"environmentClassIds": [
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
],
"executor": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"timeout": "+9125115.360s",
"trigger": {
"dailySchedule": {
"hourUtc": 23
}
}
},
"recommendedEditors": {
"editors": {
"foo": {
"versions": [
"string"
]
}
}
},
"technicalDescription": "technicalDescription",
"usedBy": {
"subjects": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
}
],
"totalSubjects": 0
}
}
}