Organization

This contains APIs related to Organization as defined in Harness

Create an Organization

Creates a new Organization.

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:

Details of the Organization to create

required
object (Organization)

This has details of the Organization as defined in Harness.

Responses
400

Bad Request

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

Delete an Organization

Deletes Organization for the given ID.

SecurityApiKey
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

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

List Organization details

Lists Organization details using an Account and Organization ID.

SecurityApiKey
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

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

List Organizations by filter

List all Organizations matching the given search criteria.

SecurityApiKey
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.

Responses
400

Bad Request

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

Update an Organization

Updates Organization settings.

SecurityApiKey
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:

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

required
object (Organization)

This has details of the Organization as defined in Harness.

Responses
400

Bad Request

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