Organization Resource Groups [Beta]

This contains APIs for Organization-scoped Resource Groups.

List Resource Groups

Returns a list of Resource Groups present in the Organization scope.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

query Parameters
page
integer
Default: 0

Pagination page number strategy: Specify the page number within the paginated collection related to the number of items on each page.

limit
integer <= 100
Default: 30

Pagination: Number of items to return.

search_term
string

This would be used to filter resources having attributes matching the search term.

sort
string

Parameter on the basis of which sorting is done.

Enum: "identifier" "name" "created" "updated"
order
string

Order on the basis of which sorting is done.

Enum: "ASC" "DESC"
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Responses
200

Resource Groups List response body

get/v1/orgs/{org}/resource-groups
Request samples
Response samples
[
  • {
    }
]

Create a Resource Group

Creates a custom Resource Group in the Organization scope.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Request Body schema:
required

Resource Group request body

identifier
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z_$]{0,127}$

Resource Group identifier

name
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z-_ ]{0,127}$

Resource Group name

color
string

Color associated with the Resource Group.

object <= 128 properties

Resource Group tags

description
string <= 1024 characters

Resource Group description

Array of objects (Resource Group Scope)

Included scopes for the resources belonging to the Resource Group.

Array of objects (Resource Filter)

Specifies the actual resources present in the Resource Group.

include_all_resources
boolean

Boolean value for including all resources in Resource Group.

Responses
201

Resource Group response body

post/v1/orgs/{org}/resource-groups
Request samples
{
  • "identifier": "example_resource_group",
  • "name": "Example Resource Group",
  • "color": "#0063F7",
  • "tags": {
    },
  • "description": "This is an Example Resource Group",
  • "included_scope": [
    ],
  • "resource_filter": [
    ],
  • "include_all_resources": false
}
Response samples
{
  • "identifier": "example_resource_group",
  • "name": "Example Resource Group",
  • "color": "#0063F7",
  • "tags": {
    },
  • "description": "This is an Example Resource Group",
  • "allowed_scope_levels": [
    ],
  • "included_scope": [
    ],
  • "resource_filter": [
    ],
  • "include_all_resources": false,
  • "harness_managed": true,
  • "created": 1234567890,
  • "updated": 1234567890
}

Retrieve a Resource Group

Retrieves a Resource Group from Organization scope.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

resource-group
required
string

Resource Group identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Responses
200

Resource Group response body

get/v1/orgs/{org}/resource-groups/{resource-group}
Request samples
Response samples
{
  • "identifier": "example_resource_group",
  • "name": "Example Resource Group",
  • "color": "#0063F7",
  • "tags": {
    },
  • "description": "This is an Example Resource Group",
  • "allowed_scope_levels": [
    ],
  • "included_scope": [
    ],
  • "resource_filter": [
    ],
  • "include_all_resources": false,
  • "harness_managed": true,
  • "created": 1234567890,
  • "updated": 1234567890
}

Update a Resource Group

Updates a Resource Group from Organization scope.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

resource-group
required
string

Resource Group identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Request Body schema:
required

Resource Group request body

identifier
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z_$]{0,127}$

Resource Group identifier

name
required
string [ 1 .. 128 ] characters ^[a-zA-Z_][0-9a-zA-Z-_ ]{0,127}$

Resource Group name

color
string

Color associated with the Resource Group.

object <= 128 properties

Resource Group tags

description
string <= 1024 characters

Resource Group description

Array of objects (Resource Group Scope)

Included scopes for the resources belonging to the Resource Group.

Array of objects (Resource Filter)

Specifies the actual resources present in the Resource Group.

include_all_resources
boolean

Boolean value for including all resources in Resource Group.

Responses
200

Resource Group response body

put/v1/orgs/{org}/resource-groups/{resource-group}
Request samples
{
  • "identifier": "example_resource_group",
  • "name": "Example Resource Group",
  • "color": "#0063F7",
  • "tags": {
    },
  • "description": "This is an Example Resource Group",
  • "included_scope": [
    ],
  • "resource_filter": [
    ],
  • "include_all_resources": false
}
Response samples
{
  • "identifier": "example_resource_group",
  • "name": "Example Resource Group",
  • "color": "#0063F7",
  • "tags": {
    },
  • "description": "This is an Example Resource Group",
  • "allowed_scope_levels": [
    ],
  • "included_scope": [
    ],
  • "resource_filter": [
    ],
  • "include_all_resources": false,
  • "harness_managed": true,
  • "created": 1234567890,
  • "updated": 1234567890
}

Delete a Resource Group

Deletes a custom Resource Group from Organization scope.

Securityx-api-key
Request
path Parameters
org
required
string

Organization identifier

resource-group
required
string

Resource Group identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to.

Responses
200

Resource Group response body

delete/v1/orgs/{org}/resource-groups/{resource-group}
Request samples
Response samples
{
  • "identifier": "example_resource_group",
  • "name": "Example Resource Group",
  • "color": "#0063F7",
  • "tags": {
    },
  • "description": "This is an Example Resource Group",
  • "allowed_scope_levels": [
    ],
  • "included_scope": [
    ],
  • "resource_filter": [
    ],
  • "include_all_resources": false,
  • "harness_managed": true,
  • "created": 1234567890,
  • "updated": 1234567890
}