Projects¶
All project routes must be preceded by your base Cascade instance with /api/project/v5 appended.
For example, https://ID.ab.contegix.com/api/project/v5/projects for fetch all projects.
-
GET
/projects
¶ List all projects
Status Codes: - 200 OK – List of projects
- 401 Unauthorized – Invalid token
- 403 Forbidden – No project access
Sample response:
{
"_embedded": {
"projectResources": [
{
"_id": "60a3834a80f068497a54f313",
"name": "ProjectAB",
"type": "DRUPAL_8",
"status": "AWAITING_INITIAL_DEPLOYMENT",
"domain": "projecta",
...
},
...
]
}
}
-
GET
/projects/{projectId}
¶ Info for a specific project
Parameters: - projectId (string) – The id of the project to retrieve
Status Codes: - 200 OK – Expected response to a valid request
- 401 Unauthorized – Invalid token
- 403 Forbidden – No project access
Sample response:
{
"_id": "60a3834a80f068497a54f313",
"name": "ProjectAB",
"type": "DRUPAL_8",
"status": "AWAITING_INITIAL_DEPLOYMENT",
"domain": "projecta",
"hasCode": true,
"hasDatabases": true,
"hasAssets": true,
"codeRepository": {
"gitHost": "ID-gitlab.ab.contegix.com",
"group": "projecta",
"name": "projecta",
"repositoryId": "242",
"gitProvider": "GITLAB",
"importRepository": null,
"sshrepoUrl": "git@ID-gitlab.ab.contegix.com:projecta/projecta.git"
},
"projectEnvironments": [
{
"environmentId": "5fd2b05363a8bb4271799bee",
"order": 0,
"projectEnvironmentAssets": {
"deploymentTargetGroupId": "5fd2b05363a8bb4271799bea",
"assetGroups": [
{
"id": "60a3832379076a51bdd9b80e",
"path": "/var/www/cascade/production/projecta/assets/sites/default/files/",
"title": "Assets",
"associationId": 2,
"symLinkId": "60a3832379076a51bdd9b80f"
},
...
],
"initialized": null
},
"projectEnvironmentCode": {
"branch": {
"name": "master",
"guarded": false
},
"currentTag": "1624460161724",
"deploymentTargetGroupId": "5fd2b05363a8bb4271799be9",
"webroot": "/var/www/cascade/production/projecta/htdocs",
"webServer": "APACHE_HTTPD",
"initialized": null,
"importBranchOrTag": null,
"latestDeploymentPaths": [],
"deploymentsToKeep": 3
},
"projectEnvironmentDatabases": {
"deploymentTargetGroupId": "5fd2b05363a8bb4271799beb",
"databases": [
{
"name": "projecta",
"associationId": 1,
"databaseType": "MYSQL",
"username": "projecta",
"password": "bb1yy2iwo89l5l38",
"allowedIP": null
}
],
"initialized": false
},
"symLinks": [
{
"id": "60a3832379076a51bdd9b80f",
"to": "/var/www/cascade/production/projecta/assets/sites/default/files",
"from": "/var/www/cascade/production/projecta/htdocs/sites/default/files",
"assetGroupId": "60a3832379076a51bdd9b80e"
},
...
]
},
...
]
}