Harness Resource Group

This contains APIs specific to the Harness Resource Group

List Resource Groups

Get list of resource groups

Securityx-api-key
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.

pageToken
string

Page Token of the next results to fetch.Default Value: ''

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": [
    ]
}

Create Resource Group

Create a resource group

Securityx-api-key
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:
required

This contains the details required to create a Resource Group

required
object (ResourcegroupResourceGroupV2)

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": [
    ]
}

Get Resource Group

Get a resource group by identifier

Securityx-api-key
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": [
    ]
}

Update Resource Group

Update a resource group

Securityx-api-key
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:
required

This contains the details required to create a Resource Group

required
object (ResourcegroupResourceGroupV2)

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": [
    ]
}

Delete Resource Group

Delete a resource group

Securityx-api-key
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": [
    ]
}

List Resource Groups by filter

This fetches a filtered list of Resource Groups

Securityx-api-key
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.

pageToken
string

Page Token of the next results to fetch.Default Value: ''

Request Body schema:
required

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 (ResourcegroupResourceSelectorFilter) 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": [
    ]
}