Get All Project Details - GET /projects (v8.9.0 and up)

Get details of all visible projects. The retrieval of project details is performed after creating a project. To create a project use the POST/projects API.

Usage:

  1. POST/projects and create new project with default configuration settings
  2. GET /projects and get details of all projects

URL

http://localhost/cxrestapi/projects

Method:

GET

Media Type (header):

Authorization: Bearer <access token value>
Accept: application/json;v=2.0

Parameters

Optional:

projectName=[string] – Unique name of a specific project or projects
teamId=[string] – Unique Id of a specific team or teams.

Curl Sample:

curl -X POST --header 'Content-Type: application/json;v=1.0' --header 'Accept:
application/json' --header 'Authorization: Bearer <access token> -d '{ \
   "name": "Project 5", \
   "owningTeam": 1, \
   "isPublic": true \
 }' 'http://localhost/cxrestapi/projects'

Query String

Optional (example only):

/projects?projectName=myProject&teamId=00000000-1111-1111-b111-989c9070eb11

Sample Response:

Includes the following fields:

  • isBranched (boolean, optional): Indicates whether project was branched from another project
  • originalProjectId (string, optional): Original project (in case IsBranched is false, this value is empty)
  • branchedOnScanId (string, optional): The scan Id of original project used to branch (in case Is branched is false, this value is empty)
  • relatedProjects (Array[integer], optional): IDs of branched projects, where the project is the source of branched projects


Success Response:

Code: 200 OK

Error Response:

Code: 400 Bad Request

Notes:

Retrieves details of all visible projects. If values for both parameters (projectName and teamId) are provided, the response is filtered according to the defined parameters. If no parameter values are provided full results are returned in the response. If the request fails, it returns an error response. Project Id (id) can be used to get details of a specific project using GET/projects/{id}. Team Id (id) can be used to create a new project with default configuration setting using POST /projects.