Project

This contains APIs related to Project as defined in Harness

Gets a Project by ID

Request
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/projects/:identifier?accountIdentifier=string&orgIdentifier=default' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update Project by ID

Request
Security:
ApiKey (readwrite)
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": [
    ]
}

Deletes the Project corresponding to the specified Project ID.

Request
Security:
ApiKey (readwrite)
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
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/projects/:identifier?accountIdentifier=string&orgIdentifier=default' \
  -H 'If-Match: string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

List user's project

Request
Security:
ApiKey (readwrite)
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" "CORE" "PMS" "TEMPLATESERVICE"
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

Indicates the number of pages. Results for these pages will be retrieved.

pageSize
integer <int32>
Default: 50

The number of the elements to fetch

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
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/projects?accountIdentifier=string&orgIdentifier=string&hasModule=true&identifiers=string&moduleType=CD&searchTerm=string&pageIndex=0&pageSize=50&sortOrders=%5Bobject%20Object%5D' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Creates a Project

Request
Security:
ApiKey (readwrite)
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": [
    ]
}