Organization

This contains APIs related to Organization as defined in Harness

Get the Organization by accountIdentifier and orgIdentifier

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

Updates the Organization

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

View of Organization entity 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": [
    ]
}

Deletes the Organization corresponding to the specified Organization ID.

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

Get the list of Organizations satisfying the criteria (if any) in the request

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

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

Returns list of Organizations

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

Creates an Organization

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

Request Body schema:

Details of the Organization to create

required
object (Organization)

View of Organization entity 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": [
    ]
}