Harness Resource Group

This contains APIs specific to the Harness Resource Group

Create a resource group

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema:

This contains the details required to create a Resource Group

required
object (ResourcegroupResourceGroup)

Contains information of Resource Group

Responses
400

Bad Request

500

Internal Server Error

default

Successfully created a Resource Group

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

Create Resource Group

Create a resource group

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema:

This contains the details required to create a Resource Group

required
object (ResourceGroupV2)

Contains information of Resource Group

Responses
400

Bad Request

500

Internal Server Error

default

Successfully created a Resource Group

post/resourcegroup/api/v2/resourcegroup
Request samples
{
  • "resourceGroup": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a resource group

SecurityApiKey
Request
path Parameters
identifier
required
string
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal Server Error

default

Successfully deleted a Resource Group

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

Delete Resource Group

Delete a resource group

SecurityApiKey
Request
path Parameters
identifier
required
string

Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal Server Error

default

Successfully deleted a Resource Group

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

Get a resource group by identifier

SecurityApiKey
Request
path Parameters
identifier
required
string

This is the Identifier of the Entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal Server Error

default

This returns a Resource Group specific to the Identifier

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

Get list of resource groups

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

searchTerm
string

Details of all the resource groups having this string in their name or identifier will be returned.

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

This contains a list of Resource Groups

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

Get Resource Group

Get a resource group by identifier

SecurityApiKey
Request
path Parameters
identifier
required
string

Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Responses
400

Bad Request

500

Internal Server Error

default

This returns a Resource Group specific to the Identifier

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

List Resource Groups

Get list of resource groups

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

searchTerm
string

Details of all the resource groups having this string in their name or identifier will be returned.

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

This contains a list of Resource Groups

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

List Resource Groups by filter

This fetches a filtered list of Resource Groups

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

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.

Request Body schema:

Filter Resource Groups based on multiple parameters

accountIdentifier
required
string

Filter by account identifier

orgIdentifier
string

Filter by organization identifier

projectIdentifier
string

Filter by project identifier

searchTerm
string

Filter resource group matching by identifier/name

identifierFilter
Array of strings unique

Filter by resource group identifiers

Array of objects (ResourceSelectorFilter) unique

Filter based on whether it has a particular resource

managedFilter
string

Filter based on whether the resource group is Harness managed

Enum: "NO_FILTER" "ONLY_MANAGED" "ONLY_CUSTOM"
Responses
400

Bad Request

500

Internal Server Error

default

This fetches the list of Resource Groups filtered by multiple fields.

post/resourcegroup/api/v2/resourcegroup/filter
Request samples
{
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "searchTerm": "string",
  • "identifierFilter": [
    ],
  • "resourceSelectorFilterList": [
    ],
  • "managedFilter": "NO_FILTER"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

This fetches a filtered list of Resource Groups

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

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.

Request Body schema:

Filter Resource Groups based on multiple parameters

accountIdentifier
required
string

Filter by account identifier

orgIdentifier
string

Filter by organization identifier

projectIdentifier
string

Filter by project identifier

searchTerm
string

Filter resource group matching by identifier/name

identifierFilter
Array of strings unique

Filter by resource group identifiers

Array of objects (ResourceSelectorFilter) unique

Filter based on whether it has a particular resource

managedFilter
string

Filter based on whether the resource group is Harness managed

Enum: "NO_FILTER" "ONLY_MANAGED" "ONLY_CUSTOM"
Responses
400

Bad Request

500

Internal Server Error

default

This fetches the list of Resource Groups filtered by multiple fields.

post/resourcegroup/api/resourcegroup/filter
Request samples
{
  • "accountIdentifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "searchTerm": "string",
  • "identifierFilter": [
    ],
  • "resourceSelectorFilterList": [
    ],
  • "managedFilter": "NO_FILTER"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a resource group

SecurityApiKey
Request
path Parameters
identifier
required
string

Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema:

This contains the details required to create a Resource Group

required
object (ResourcegroupResourceGroup)

Contains information of Resource Group

Responses
400

Bad Request

500

Internal Server Error

default

Successfully updated a Resource Group

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

Update Resource Group

Update a resource group

SecurityApiKey
Request
path Parameters
identifier
required
string

Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

Request Body schema:

This contains the details required to create a Resource Group

required
object (ResourceGroupV2)

Contains information of Resource Group

Responses
400

Bad Request

500

Internal Server Error

default

Successfully updated a Resource Group

put/resourcegroup/api/v2/resourcegroup/{identifier}
Request samples
{
  • "resourceGroup": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}