Project

This contains APIs related to Project as defined in Harness

Create a Project

Creates a new Harness Project.

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string
Default: "default"

Organization identifier for the Project. If left empty, the Project is created under Default Organization

Request Body schema:

Details of the Project to create

required
object (Project)

This is the Project Entity details defined in Harness

Responses
400

Bad Request

500

Internal server error

default

Returns created Project

post/ng/api/projects
Request samples
{
  • "project": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a Project

Deletes a Project corresponding to the given ID.

SecurityApiKey
Request
path Parameters
identifier
required
string

Project Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string
Default: "default"

This is the Organization Identifier for the Project. By default, the Default Organization's Identifier is considered.

header Parameters
If-Match
string

Version number of Project

Responses
400

Bad Request

500

Internal server error

default

It returns true if the Project is deleted successfully and false if the Project is not deleted

delete/ng/api/projects/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List all Projects for a user

Lists all Projects the user is a member of by using the user's API key token.

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

hasModule
boolean
Default: true

This boolean specifies whether to Filter Projects which has the Module of type passed in the module type parameter or to Filter Projects which does not has the Module of type passed in the module type parameter

identifiers
Array of strings

This is the list of Project IDs. Details specific to these IDs would be fetched.

moduleType
string

Filter Projects by module type

Enum: "CD" "CI" "CV" "CF" "CE" "STO" "CORE" "PMS" "TEMPLATESERVICE" "GOVERNANCE" "CHAOS"
searchTerm
string

This would be used to filter Projects. Any Project having the specified string in its Name, ID and Tag would be filtered.

pageIndex
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

Responses
400

Bad Request

500

Internal server error

default

Paginated list of Projects

get/ng/api/projects
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List Project details

Lists a Project's details for the given ID.

SecurityApiKey
Request
path Parameters
identifier
required
string

Project Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string
Default: "default"

Organization identifier for the project. If left empty, Default Organization is assumed

Responses
400

Bad Request

500

Internal server error

default

Returns Project having ID as specified in request

get/ng/api/projects/{identifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List user's project with support to filter by multiple organizations

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifiers
Array of strings unique

List of Organization Identifiers for the Entities.

hasModule
boolean
Default: true

This boolean specifies whether to Filter Projects which has the Module of type passed in the module type parameter or to Filter Projects which does not has the Module of type passed in the module type parameter

identifiers
Array of strings

This is the list of Project Identifiers. Details specific to these IDs would be fetched.

moduleType
string

Filter Projects by module type

Enum: "CD" "CI" "CV" "CF" "CE" "STO" "CORE" "PMS" "TEMPLATESERVICE" "GOVERNANCE" "CHAOS"
searchTerm
string

Filter Projects by searching for this word in Name, Id, and Tag

pageIndex
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

pageSize
integer <int32> <= 100
Default: 50

Results per page(max 100)Default Value: 50

Array of objects (SortOrder)

Sort criteria for the elements.

Responses
400

Bad Request

500

Internal server error

default

Paginated list of Projects

get/ng/api/projects/list
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a Project

Updates Project details for the given ID.

SecurityApiKey
Request
path Parameters
identifier
required
string

Project Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string
Default: "default"

Organization identifier for the Project. If left empty, Default Organization is assumed

header Parameters
If-Match
string

Version number of Project

Request Body schema:

This is the updated Project. Please provide values for all fields, not just the fields you are updating

required
object (Project)

This is the Project Entity details defined in Harness

Responses
400

Bad Request

500

Internal server error

default

Returns updated Project details

put/ng/api/projects/{identifier}
Request samples
{
  • "project": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}