Hosts

This contains APIs related to Hosts as defined in Harness

Gets the list of hosts filtered by accountIdentifier and connectorIdentifier

SecurityApiKey
Request
query Parameters
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.

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
string

Connector Identifier

Request Body schema:

Details of the filters applied

type
string
Enum: "All" "HostNames" "HostAttributes"
filter
string
Responses
400

Bad Request

500

Internal server error

default

Returns the list of hosts filtered by accountIdentifier and connectorIdentifier

post/ng/api/hosts/filter
Request samples
{
  • "type": "All",
  • "filter": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Validates hosts connectivity credentials

SecurityApiKey
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

identifier
required
string

Secret Identifier

Request Body schema: application/json

List of SSH or WinRm hosts to validate, and Delegate tags (optional)

hosts
required
Array of strings

Hosts to be validated

tags
Array of strings

Delegate tags (optional)

Responses
400

Bad Request

500

Internal server error

default

Returns validation response

post/ng/api/hosts/validate
Request samples
application/json
{
  • "hosts": [
    ],
  • "tags": [
    ]
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}