Harness Resource Group

This contains APIs specific to the Harness Resource Group

Get a resource group by identifier

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

Update a resource group

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

Delete a resource group

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

getFilterResourceGroupList

This fetches a filtered list of Resource Groups

Request
Security:
ApiKey (readwrite)
query Parameters
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.

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

Get list of resource groups

Request
Security:
ApiKey (readwrite)
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

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

This contains a list of Resource Groups

get/resourcegroup/api/resourcegroup
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/resourcegroup/api/resourcegroup?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&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": [
    ]
}

Create a resource group

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