SmtpConfig

This contains APIs related to SmtpConfig as defined in Harness

Checks whether other connectors exist with the same name

Request
Security:
ApiKey (readwrite)
query Parameters
name
string

The name of Config

accountId
required
string

Account Identifier for the Entity

Responses
400

Bad Request

500

Internal server error

default

Returns validation Result

post/ng/api/smtpConfig/validateName
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/smtpConfig/validateName?name=string&accountId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Tests the config's connectivity by sending a test email

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

Attribute uuid

accountId
required
string

Account Identifier for the Entity

to
required
string
subject
required
string
body
required
string
Responses
400

Bad Request

500

Internal server error

default

Returns validation Result

post/ng/api/smtpConfig/validate-connectivity
Request samples
curl -i -X POST \
  'https://app.harness.io/gateway/ng/api/smtpConfig/validate-connectivity?identifier=string&accountId=string&to=string&subject=string&body=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets Smtp config by accountId

Request
Security:
ApiKey (readwrite)
query Parameters
accountId
string

Account Identifier for the Entity

Responses
400

Bad Request

500

Internal server error

default

returns the SmtpConfig having accountId as specified in request

get/ng/api/smtpConfig
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/smtpConfig?accountId=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Updates the Smtp Config

Request
Security:
ApiKey (readwrite)
Request Body schema: application/json
uuid
string
accountId
string
name
string
object (SmtpConfig)

This is the view of SmtpConfig entity defined in Harness

Responses
400

Bad Request

500

Internal server error

default

Returns updated config

put/ng/api/smtpConfig
Request samples
application/json
{
  • "uuid": "string",
  • "accountId": "string",
  • "name": "string",
  • "value": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Creates SMTP config

Request
Security:
ApiKey (readwrite)
Request Body schema: application/json
uuid
string
accountId
string
name
string
object (SmtpConfig)

This is the view of SmtpConfig entity defined in Harness

Responses
400

Bad Request

500

Internal server error

default

Returns created config

post/ng/api/smtpConfig
Request samples
application/json
{
  • "uuid": "string",
  • "accountId": "string",
  • "name": "string",
  • "value": {
    }
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete Smtp Config by identifier

Request
Security:
ApiKey (readwrite)
path Parameters
identifier
required
string

Config identifier

Responses
400

Bad Request

500

Internal server error

default

Boolean status whether request was successful or not

delete/ng/api/smtpConfig/{identifier}
Request samples
curl -i -X DELETE \
  https://app.harness.io/gateway/ng/api/smtpConfig/:identifier \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}