Create Project with Default Configuration - POST /projects (v8.6.0 to v8.7.0)
Create a new project with default preset and configuration settings. To retrieve the id of the project owning team (owningTeam) use GET/auth/teams. To change the projects preset and configuration settings once the project has been created use POST/sast/scanSettings.
Usage:
- GET /auth/teams and get details of all teams
- POST /projects and create new project with default configuration settings
- POST /sast/scanSettings and define the scan settings
URL
/cxrestapi/projects
Method:
POST
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
cxOrigin: {request_origin}
Parameters
Required:
Project=[body] – Project details
name=[string] – Specifies the name of the project
owningTeam=[string] – Specifies the id of the team that owns the project
isPublic=[boolean] – Specifies whether the project is public or not
Success Response:
Code: 201 Created
Error Response:
Code: 400 Bad Request
Sample Response:
{
"id": 43,
"link": {
"rel": "self",
"uri": "/projects/43"
}
}
Notes:
Creates a new project with default preset and configuration settings. This creates a new project without a scan. If the request fails, it returns an error response.
Read more: