Triggers

This contains APIs related to Triggers.

Activates or deactivate trigger for pipeline with target pipeline identifier.

Request
Security:
ApiKey (readwrite)
path Parameters
triggerIdentifier
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
required
string
projectIdentifier
required
string
targetIdentifier
required
string

Identifier of the target pipeline under which trigger resides

status
required
boolean
Responses
400

Bad Request

500

Internal server error

default

Returns the response status.

put/pipeline/api/triggers/{triggerIdentifier}/status
Request samples
curl -i -X PUT \
  'https://app.harness.io/gateway/pipeline/api/triggers/:triggerIdentifier/status?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&targetIdentifier=string&status=true' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets the trigger by accountIdentifier, orgIdentifier, projectIdentifier, targetIdentifier and triggerIdentifier.

Request
Security:
ApiKey (readwrite)
path Parameters
triggerIdentifier
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
required
string
projectIdentifier
required
string
targetIdentifier
required
string

Identifier of the target pipeline under which trigger resides

Responses
400

Bad Request

500

Internal server error

default

Returns the trigger with the accountIdentifier, orgIdentifier, projectIdentifier, targetIdentifier and triggerIdentifier.

get/pipeline/api/triggers/{triggerIdentifier}
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/triggers/:triggerIdentifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&targetIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Updates trigger for pipeline with target pipeline identifier.

Request
Security:
ApiKey (readwrite)
path Parameters
triggerIdentifier
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
required
string
projectIdentifier
required
string
targetIdentifier
required
string

Identifier of the target pipeline under which trigger resides

header Parameters
If-Match
string
Request Body schema:
string
Responses
400

Bad Request

500

Internal server error

default

Returns the updated trigger

put/pipeline/api/triggers/{triggerIdentifier}
Request samples
"string"
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Deletes Trigger by identifier.

Request
Security:
ApiKey (readwrite)
path Parameters
triggerIdentifier
required
string
query Parameters
accountIdentifier
required
string
orgIdentifier
required
string
projectIdentifier
required
string
targetIdentifier
required
string

Identifier of the target pipeline under which trigger resides.

header Parameters
If-Match
string
Responses
400

Bad Request

500

Internal server error

default

Returns the boolean status.

delete/pipeline/api/triggers/{triggerIdentifier}
Request samples
curl -i -X DELETE \
  'https://app.harness.io/gateway/pipeline/api/triggers/:triggerIdentifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&targetIdentifier=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": [
    ]
}

Gets the paginated list of triggers for accountIdentifier, orgIdentifier, projectIdentifier, targetIdentifier.

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

Identifier of the target pipeline

filter
string
page
integer <int32>
Default: 0
size
integer <int32>
Default: 25
sort
Array of strings
searchTerm
string
Responses
400

Bad Request

500

Internal server error

default

Returns the paginated list of triggers for accountIdentifier, orgIdentifier, projectIdentifier, targetIdentifier.

get/pipeline/api/triggers
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/triggers?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&targetIdentifier=string&filter=string&page=0&size=25&sort=string&searchTerm=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Creates Trigger for triggering target pipeline identifier.

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

Identifier of the target pipeline

Request Body schema:
string
Responses
400

Bad Request

500

Internal server error

default

Returns details of the created Trigger.

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

Gets the list of triggers for accountIdentifier, orgIdentifier, projectIdentifier, targetIdentifier.

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

Identifier of the target pipeline

query Parameters
accountIdentifier
required
string
orgIdentifier
required
string
projectIdentifier
required
string
targetIdentifier
required
string
Responses
400

Bad Request

500

Internal server error

default

Returns the list of triggers for accountIdentifier, orgIdentifier, projectIdentifier, targetIdentifier.

get/pipeline/api/triggers/{triggerIdentifier}/details
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/triggers/:triggerIdentifier/details?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&targetIdentifier=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Generates random webhook token for new triggers.

Request
Security:
ApiKey (readwrite)
Responses
400

Bad Request

500

Internal server error

default

Returns random webhook token.

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