Organization

Create and manage organizations in your account. You use organizations to group together related projects. For example, you can use an organization to group together projects within a business unit or division.

Create an organization [Beta]

Creates a new organization.

Securityx-api-key
Request
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema:
required

Post the necessary fields for the API to create an organization.

required
object (Organization)

Organization model

Responses
201

Organization response

post/v1/orgs
Request samples
{
  • "org": {
    }
}
Response samples
{
  • "org": {
    },
  • "created": 1234567890,
  • "updated": 1234567890,
  • "harness_managed": true
}

List organizations [Beta]

Retrieves the information of the organizations.

Securityx-api-key
Request
query Parameters
org
Array of strings

Identifier field of the organizations the resource is scoped to

search_term
string

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

page
integer
Default: 0

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

limit
integer <= 1000
Default: 20

Number of items to return per page.

sort
string

Parameter on the basis of which sorting is done.

Enum: "name" "identifier" "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. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Organization list response

get/v1/orgs
Request samples
Response samples
[
  • {
    }
]

Retrieve an organization [Beta]

Retrieves the information of the organization with the matching organization identifier.

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. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Organization response

get/v1/orgs/{org}
Request samples
Response samples
{
  • "org": {
    },
  • "created": 1234567890,
  • "updated": 1234567890,
  • "harness_managed": true
}

Update an organization [Beta]

Updates the information of the organization with the matching organization identifier.

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. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema:
required

Put the necessary fields for the API to update a organization.

required
object (Organization)

Organization model

Responses
200

Organization response

put/v1/orgs/{org}
Request samples
{
  • "org": {
    }
}
Response samples
{
  • "org": {
    },
  • "created": 1234567890,
  • "updated": 1234567890,
  • "harness_managed": true
}

Delete an organization [Beta]

Deletes the information of the organization with the matching organization identifier.

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. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Organization response

delete/v1/orgs/{org}
Request samples
Response samples
{
  • "org": {
    },
  • "created": 1234567890,
  • "updated": 1234567890,
  • "harness_managed": true
}

List Organizations by filter

List all Organizations matching the given search criteria.

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

identifiers
Array of strings

This is the list of Org Key IDs. Details specific to these IDs would be fetched.

searchTerm
string

This would be used to filter Organizations. Any Organization having the specified string in its Name, ID and Tag would be filtered.

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

404

Not Found

500

Internal server error

default

Returns list of Organizations

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

Create an Organization

Creates a new Organization.

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:
required

Details of the Organization to create

required
object (Organization1)

This has details of the Organization as defined in Harness.

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns created Organization details

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

List Organization details

Lists Organization details using an Account and Organization ID.

Securityx-api-key
Request
path Parameters
identifier
required
string

Organization Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns the Organization details with the passed Account Identifier and Org Identifier

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

Update an Organization

Updates Organization settings.

Securityx-api-key
Request
path Parameters
identifier
required
string

Organization Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

header Parameters
If-Match
string

Version number of the Organization

Request Body schema:
required

This is the updated Organization. Please provide values for all fields, not just the fields you are updating

required
object (Organization1)

This has details of the Organization as defined in Harness.

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

Returns the updated Organization details

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

Delete an Organization

Deletes Organization for the given ID.

Securityx-api-key
Request
path Parameters
identifier
required
string

Organization Identifier for the Entity.

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

header Parameters
If-Match
string

Version number of the Organization

Responses
400

Bad Request

404

Not Found

500

Internal server error

default

It returns true if the Organization is deleted successfully and false if the Organization is not deleted.

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